How to contribute to Tizen on Yocto Project

From Tizen Wiki
Jump to: navigation, search


At the moment it is possible to build from scratch Tizen:Common and other profiles based on it with two build systems: GBS and the Yocto project.

The current version of "Tizen on Yocto" is available in the Git repository scm/bb/tizen-distro. It is based on the of conversion of spec files to bb reipes using a Python tool called spec2yocto. Patches for improvements to the recipes should be submitted to Git repository scm/bb/meta-tizen, which will layer on top.

Getting ready to contribute

Before you start make sure that you have successfully set up developer environment following the instructions from this article. Upon success you should have configured Git, Gerrit and you should have SSH for Gerrit access.

Modifying and/or adding new recipes


Follow the steps below to modify or add new recipes to "Tizen on Yocto" and to submit them to the upstream:

  • Clone scm/bb/meta-tizen. You should do this in a gerrit-aware way so you will be able to push successfully (replace ME with your username):
git clone ssh://
  • Import the commit-msg hook that will generate a Change-Id whenever you commit your changes
cd meta-tizen
scp tizen:hooks/commit-msg .git/hooks/
  • Switch to the git branch that you are interested in, for example tizen.
git checkout tizen
  • Make changes and carefully test them.
  • Once you are happy with your changes and you are confident that they are working, you can commit them:
git commit -a -s

Make sure that the commit message is clear and useful. Include the relevant Jira Bug ID and a Signed-off-by: in the commit. Following DEP3 convention, the Bug ID should be last in your commit message (using the form Bug-Tizen: BTY-XXX), as the commit-msg hook uses it to find out where to add the required Change-Id: tag.

  • Replace <branch-name> with the appropriate name and execute the following command to push your changes:
git push origin HEAD:refs/for/<branch-name>

A four-digit Gerrit review ID will be issued and you can see it using where XXXX is that 4-digit ID.

Your changes will be reviewed and according to the rules of the Tizen project they will be merged when they have +2 code reviews. It may happen that you have to go through a few iterations of review and re-factoring of your changes before they get accepted. Follow the steps below to update your pending change request in Gerrit:

  • Consider the recommendations provided by code reviewers at Gerrit and apply corresponding measures to improve the recipes.
  • Carefully test all changes.
  • When your new changes are ready, amend your previous commit:
git commit -a --amend

Alternatively, if you want to modify not only recipes but also the comment in the Git git commit use:

git commit -a -c --amend
  • Push your new patch again to Gerrit for another code review:
git push origin HEAD:refs/for/<branch-name>

It is recommended to keep your local Git tree up to date with the upstream by pulling changes from it:

git pull


After merging changes in meta-tizen you have to update tizen-distro using the combo-layer script:

  • Clone scm/bb/tizen-distro. You should do this in a gerrit-aware way so you will be able to push successfully (replace ME with your username):
git clone ssh://$
# where $user is your account
  • Import the commit-msg hook that will generate a Change-Id whenever you commit your changes
cd tizen-distro
scp tizen:hooks/commit-msg .git/hooks/
  • Create conf/combo-layer-local.conf
cp conf/combo-layer-local-sample.conf conf/combo-layer-local.conf
  • Set local_repo_dir for each meta layer in conf/combo-layer-local.conf
  • Initialize repositories:
scripts/combo-layer init
  • Update meta-tizen into tizen-distro:
scripts/combo-layer update meta-tizen
  • Make sure that the Change-Id is in the footer (last paragraph) of all new commit messages.
  • Push your changes to Gerrit


If you experience any difficulties or have any suggestions about meta-tizen or tizen-distro please subscribe to the Tizen Dev mailing list and share your opinion.

  • tizen-distro: "A potential Change-Id was found, but it was not in the footer (last paragraph) of the commit message."

The following message appears because the combo-layer script has added a new line between Change-Id and Signed-off-by. Use Git rebase to edit each commit message and remove the new line.

Tips and Tricks

  • Optionally, if you prefer you can also configure the git hook for commit message as a system wide configuration too:
mkdir -p ~/.config/git/hooks 
scp ~/.config/git/hooks 
cat<<EOF>> ~/.gitconfig
        templatedir = ~/.config/git/

See also