Enabling New Profile Support for Local Full Build

From Tizen Wiki
Jump to: navigation, search

Introduction

This document provides information about how to enable new profile support for local full build.

  • Note: tizen_common is taken as an example here, the instructions apply to all the profiles.

Prerequisites

Ensure tizen_common branch is created before getting started.

Related Projects

All Related projects include the following:

Enabling New Profile Support

The procedure of enabling new profile support is as follows:

1. Update scm/manifest and submit to gerrit

2. Update scm/meta/build-config and submit to gerrit.

3. Update scm/meta/gbs-config and submit to gerrit.

4. Update pre-built/toolchain-x86 and submit to gerrit.

Updating scm/manifest

To update scm/manifest, perform the following procedure:

1. Create a new directory named common and add common.xml.

  A sample xml file is shown below:
  **Note:** Ensure the value of "revision" is "accepted/tizen_<Profile_Name>".
      <?xml version="1.0" encoding="UTF-8"?>
      <manifest>
        <include name="_remote.xml" />
        <default revision="accepted/tizen_common"
                 remote="tizen-gerrit"
                 sync-j="4" />
        <include name="common/metadata.xml" />
        <include name="common/prebuilt.xml" />
        <include name="common/projects.xml" />
      </manifest>

2. Add metadata.xml, prebuilt.xml, projects.xml under common dir.

  • metadata.xml
        <?xml version="1.0" encoding="UTF-8"?>
        <manifest>
          <project name="scm/meta/build-config" path="scm/meta/build-config" groups="meta" revision="tizen_common"/>
          <project name="scm/meta/gbs-config" path="scm/meta/gbs-config" groups="meta" revision="tizen_common">
             <copyfile src="gbs.conf" dest=".gbs.conf" />
          </project>
        </manifest>
    **Note:** Ensure the value of "revision" is identical to the target profile.
  • prebuilt.xml
        <?xml version="1.0" encoding="UTF-8"?>
        <manifest>
          <project name="pre-built/toolchain-arm" path="pre-built/toolchain-arm" groups="prebuilts" revision="tizen_common"/>
          <project name="pre-built/toolchain-x86" path="pre-built/toolchain-x86" groups="prebuilts" revision="tizen_common"/>
        </manifest>
  • projects.xml: projects.xml is based on the latest repo.
    To prepare projects.xml, perform the following procedure:
    1. Download the base from repo, example:
       http://download.tizen.org/releases/daily/tizen/common/common-wayland-ia32/tizen_20140522.1/builddata/manifest/tizen_20140522.1_ia32.xml
    2. Remove the superfluous lines below:
       <remote fetch="ssh://review.tizen.org" name="tizen-gerrit" review="https://review.tizen.org/gerrit"/>
       <default remote="tizen-gerrit"/>
    3. Modify every project line, change revision="..." to groups="common" with the following command: 
       perl -i -pne 's/revision=".*"/groups="common"/' projects.xml
       The final projects.xml content looks like:
           <project name="apps/core/preloaded/bt-syspopup" path="apps/core/preloaded/bt-syspopup" groups="common"/>
           <project name="apps/core/preloaded/calculator" path="apps/core/preloaded/calculator" groups="common"/>
           <project name="apps/core/preloaded/libslp-memo" path="apps/core/preloaded/libslp-memo" groups="common"/>
           <project name="apps/core/preloaded/menu-screen" path="apps/core/preloaded/menu-screen" groups="common"/>
           <project name="apps/core/preloaded/minicontrol" path="apps/core/preloaded/minicontrol" groups="common"/>
           ...
   Once all files added using the following command to submit:
       $ git add common.xml common
       $ git commit -a -m "support common profile"
       $ git push tizen:scm/manifest HEAD:refs/for/tizen
       # then pending for that to be merged

Updating scm/meta/build-config

Create build.conf based on the one on latest repo and commit to tizen_common branch.

http://download.tizen.org/releases/daily/tizen/common/common-wayland-ia32/tizen_20140522.1/builddata/417a6af7c9f1053eb4a6728b0d34c5b39601321d6370d70eac37eee630b4f9bc-build.conf

Once build.conf added using the following command to submit:

   $ git add build.conf
   $ git commit -a -m "support common profile"
   $ git push tizen:scm/meta/build-config HEAD:refs/for/tizen_common
   # then pending for that to be merged

Updating scm/meta/gbs-config

Create gbs.conf based on the sample below and commit to tizen_common branch.

   [general]
   tmpdir=/var/tmp/
   profile = profile.tizen3.0_common
   work_dir=.
   [repo.tizen3.0_x86]
   url=${work_dir}/pre-built/toolchain-x86/
   [profile.tizen3.0_common]
   repos=repo.tizen3.0_x86
   buildconf=${work_dir}/scm/meta/build-config/build.conf

Once gbs.conf added using the following command to submit:

   $ git add gbs.conf
   $ git commit -a -m "support common profile"
   $ git push tizen:scm/meta/gbs-config HEAD:refs/for/tizen_common
   # then pending for that to be merged

Updating pre-built/toolchain-x86

Follow instructions in prjplan/gbs/design/pre-built.rst to get the binaries for x86 and commit to tizen_common branch.

Once all binaries added using the following command to submit:

   $ git add *
   $ git commit -a -m "support common profile"
   $ git push tizen:pre-built/toolchain-x86 HEAD:refs/for/tizen_common
   # then pending for that to be merged
 **Note** Updating of toolchain-arm is also required when adding arm support.

New profile testing

Upon successful enabling, which means all realted projects changes have been merged to gerrit. Then developer can follow the documents below to clone Tizen sources and build packages for testing.

  • prjplan/misc/source.tizen.org/Cloning_Tizen_Source.rst
  • prjplan/misc/source.tizen.org/Building_Packages_Locally_with_GBS.rst