In order to contribute code, first-time users are requested to agree to the license at https://wiki.rdkcentral.com/signup.action.

RDK components are hosted at code.rdkcentral.com. You can submit your code changes for review via that site using the workflow outlined below.

Create a JIRA ticket

  • Refer to JIRA Guidelines for creating a JIRA before pushing your code changes in code.rdkcentral.com

Clone the Repository

Clone the component repository from the Gerrit server https://code.rdkcentral.com/r/ into a local workspace

Clone with commit-msg hook (to add Change-ID footer to commit messages)

git clone https://code.rdkcentral.com/r/<component-name> <component-name> -b <branch-name> 
cd <component-name>
gitdir=$(git rev-parse --git-dir); curl -o ${gitdir}/hooks/commit-msg https://code.rdkcentral.com/r/tools/hooks/commit-msg ; chmod +x ${gitdir}/hooks/commit-msg

Click here to find the details about <component-name> & <branch-name> for code submission .

Note: The commit-msg hook is installed in the local Git repository and is a prerequisite for Gerrit to accept commits. The inclusion of the unique Change-ID in the commit message allows Gerrit to automatically associate a new version of a change back to its original review.

Note: You may need to configure your Git identity on the cloned repository. The email address that your local Git uses should match the email address listed in Gerrit.

  • Cloning the code before login once to code.rdkcentral.com, user would get the Authentication error, even though the account is in good standing and has all the required access.
  • Please login to code.rdkcentral.com before attempting to clone.


Example commands to run are as follows:

$ git config user.name "John Doe"

$ git config user.email "john.doe@example.org"

Work on the change, commit to local clone

Each commit constitutes a change in Gerrit and must be approved separately. It is recommended to squash several commits into one that represents a change to the project.

If necessary, it is possible to squash a series of commits into a single commit before publishing them, using interactive rebase:

$ git rebase --interactive

It is important to preserve the Change-Id line when editing and there should only be one "pick" entry at the end of this process. The end result is to submit one change to Gerrit.

Push the new changes for Gerrit for review

Commits will be BLOCKED if the format of the commit message does not comply with the standard. You will see a warning as to why the commit was blocked.

Mandatory Information in Commit Message

  1. Associated JIRA ticket (Following the Guideline to create a JIRA)
  2. Reason for change information
  3. Test procedure by which change can be verified
  4. Possible risks of failure


$ git commit --amend


<Add your commit message in below format>

<JIRA TICKET #1>, <JIRA TICKET #2>, <JIRA TICKET #n> : <one line summary of change>
<empty line>
Reason for change: <explanation of change>
Test Procedure: < test procedure>
Risks: <side effects and other considerations> [Note: state None if there are no other considerations]
<empty line>
Signed-off-by: Your Name <your_name@email.com>


Submit your code changes for review

$ git push origin HEAD:refs/for/<branch>


When interfacing with Gerrit you push to a virtual branch /refs/for/<branch>, representing "code review before submission to branch". Gerrit will subsequently assign a unique URL for the change, to facilitate access and review via the web UI.

Notes: 

  • HEAD is a Git symbolic reference to the most recent commit on the current branch. When you change branches, HEAD is updated to refer to the new branch's latest commit.
  • The refspec in the git push operation takes the form source:destination (source is the local ref being pushed, destination is the remote ref being updated).


Review notifications and addition of new reviewers

Component owners/reviewers/approvers, defined as specific groups in Gerrit, will be added to the review by default. You may request additional feedback by specifically adding reviewers via the Gerrit web GUI. 

Scan and build on code submission

BlackDuck, copyright scanning and build jobs will be triggered automatically from CMF Jenkins. The output of these jobs is integrated into the Gerrit voting process via custom labels and will reflect any 'red flag' in a file that has new code changes, whether introduced in the new change/patch-set or not. Scans will post any findings as comments in the Gerrit review. Build jobs also do that, but in addition will upload the build log to the corresponding JIRA ticket (if there is one) as an attachment.

Code review and scoring process

Reviewers can comment on and score a given change.
The default set of rules for enabling a code change for submission requires:

  • a Code Review score of +2; this can only be provided by the component owner or an admin;
  • +1 score on any mandatory Gerrit labels configured for the project.

The result of the scoring process and validation rules is to enable the Submit action on the Gerrit Web UI and subsequent merge capability to the target branch.

Label: Code Review(Highlighted in yellow color)  For a change to be mergeable, the latest patch set must have a '+2' value approval in this category or label, and no '-2 Do not submit'. Thus -2 on any patch set can block a submit, while +2 on the latest patch set enables it for merging.

Labels: Blackduck/Copyright/Component-Build (Highlighted in yellow color) For a change to be mergeable, the change must have a '+1' score on these labels, and no '-1 Fails'. Thus, '-1 Fails' can block a submit, while '+1' enables a submit.

 Review input is generally referred to as labelling with a positive/negative score.

Submit code change

Only authorized users, i.e. component owners, component approvers or admins, can submit the change allowing Gerrit to merge it to the target branch as soon as possible. A change can be submitted, having satisfied the approval conditions described earlier, by clicking the 'Submit Patch Set n' button within the Gerrit UI. When a change has been Submitted, it is automatically merged to the target branch by Gerrit.

Abandon change

Depending on the review outcome, it might be decided to abandon the change. The component owner or an authorised user may abandon the change by clicking the "Abandon Change" button. The abandoned changes are not removed from the Gerrit database and can be restored at a later stage.

Submitted, Merge Pending

If a change depends on another change that is still in review, it will enter this state. It will be merged automatically by Gerrit once all its dependencies are submitted and merged.

Change needs to be reworked

If you need to rework a change, you need to push another commit with the same Change-ID as the original in its commit message.
This is the mechanism Gerrit uses to associate or link the two items. The `--amend` option to the Git commit command prevents a new Change-ID being generated by the commit-msg hook.

The basic steps are outlined below.

First, fetch the change. If you still have the checkout that was used to push the original change, you can skip this step.

$ git fetch https://user@code.rdkcentral.com/r/component1 refs/changes/02/2/1 && git checkout FETCH_HEAD

where the numbering scheme for fetching the changes is as follows:

refs/changes/<last two digits of change number> <change number> <patch set number>

Gerrit will specify this fetch URL via the web UI on the 'Download' link on the review page for the change in question, you just paste it into the command line.



Next, make any necessary source changes, and do:

$ git commit --amend
$ git push origin HEAD:refs/for/<branch>

A new patch set is now appended to the Gerrit review item, and this will go through the same review process as before.

  • The 'change number' referenced above is different to underlying Git commit ID.
  • Patch-sets are numbered (starting from 1) for each review, and incremented whenever a change is amended with another Git commit.
  • FETCH_HEAD is a Git symbolic reference and shorthand for the head of the last branch fetched and is valid only immediately after the fetch operation.

Gerrit merge failure as a result of a conflict

Essentially this means that the remote branch has evolved since this change was started and now software conflicts with changes in the remote branch. The developer must resolve the merge conflicts in their local clone and then push another patch-set.
The process is resumed at step 4, with the important distinction of committing with the --amend option, once the developer pulls the latest changes. Note: A summary of the steps involved, assuming the local branch still exists: 

Rebase the local branch to the latest state of origin/<branch>;Resolve all conflicts; Commit with the `--amend` option; Push changes to Gerrit for review. After this change a new patch set is created for the change.

Note: If the local branch no longer exists, the steps are as follows :

$ git fetch https://user@code.rdkcentral.com/r/rdk_component_1 refs/changes/58/58/2 && git checkout FETCH_HEAD
$ git rebase origin/<branch>
[Edit the conflicting file, cleaning up the <<<<, ==== >>> markers surrounding the conflicting lines]
$ git add <file>
$ git commit --amend
$ git push origin HEAD:refs/for/<branch>

RDK Components - Product Branch

Following RDK components are hosted at code.rdkcentral.com. Follow the Instructions to submit your code changes.

Example of how to use git clone for meta-rdk-ext component :  git clone https://code.rdkcentral.com/r/rdk/components/generic/rdk-oe/meta-rdk-ext -b rdk-next

ComponentProduct BranchLicense
components/opensource/rbusrdk-nextApache
components/opensource/rbuscorerdk-nextApache
components/opensource/v4l2testmasterApache
components/opensource/wayland-egl-icegdlmasterApache
components/opensource/waymetricmasterApache
components/opensource/westerosmasterApache
manifestsrdk-nextmanifests
rdk/components/generic/aampstable2Apache
rdk/components/generic/aampabrstable2Apache
rdk/components/generic/appmanagerrdk-nextApache
rdk/components/generic/audiocapturemgrrdk-nextApache
rdk/components/generic/bluetoothrdk-nextApache
rdk/components/generic/bluetooth_mgrrdk-nextApache
rdk/components/generic/breakpad_wrapperrdk-nextApache
rdk/components/generic/cobalt-wpemastercmf
rdk/components/generic/cpuprocanalyzerrdk-nextApache
rdk/components/generic/dcardk-nextApache
rdk/components/generic/dcmrdk-nextApache
rdk/components/generic/devicesettingsrdk-nextApache
rdk/components/generic/diagnosticsrdk-nextApache
rdk/components/generic/dtcprdk-nextApache
rdk/components/generic/dvb/dtv-testapprdk-nextApache
rdk/components/generic/dvb/siparserrdk-nextApache
rdk/components/generic/gst-plugins-rdkrdk-nextLGPL
rdk/components/generic/gst-plugins-rdk-aampstable2LGPL
rdk/components/generic/hdmicecrdk-nextApache
rdk/components/generic/hwselftestrdk-nextApache
rdk/components/generic/iarmbusrdk-nextApache
rdk/components/generic/iarmmgrsrdk-nextApache
rdk/components/generic/injectedbundlerdk-nextApache
rdk/components/generic/ledmgrrdk-nextApache
rdk/components/generic/libSyscallWrapperrdk-nextApache
rdk/components/generic/libusbctrlrdk-nextApache
rdk/components/generic/lxc-container-generatormasterApache
rdk/components/generic/media_utilsrdk-nextApache
rdk/components/generic/netmonitorrdk-nextApache
rdk/components/generic/netsrvmgrrdk-nextApache
rdk/components/generic/rdkappsrdk-nextApache
rdk/components/generic/rdkatrdk-nextApache
rdk/components/generic/rdkbrowserrdk-nextApache
rdk/components/generic/rdkbrowser2rdk-nextApache
rdk/components/generic/rdkmediaplayerrdk-nextApache
rdk/components/generic/rdmrdk-nextApache
rdk/components/generic/rfcrdk-nextApache
rdk/components/generic/rmf_tools/generate_si_cacherdk-nextApache
rdk/components/generic/rmf_tools/tenableHDCPrdk-nextApache
rdk/components/generic/rnerdk-nextApache
rdk/components/generic/sys_mon_tools/analyzers/scripts/hostrdk-nextApache
rdk/components/generic/sys_mon_tools/analyzers/scripts/targetrdk-nextApache
rdk/components/generic/sys_mon_tools/iarm_event_senderrdk-nextApache
rdk/components/generic/sys_mon_tools/iarm_query_powerstaterdk-nextApache
rdk/components/generic/sys_mon_tools/iarm_set_powerstaterdk-nextApache
rdk/components/generic/sys_mon_tools/key_simulatorrdk-nextApache
rdk/components/generic/sys_mon_tools/mfr_datardk-nextApache
rdk/components/generic/sys_mon_tools/mfr_utilsrdk-nextApache
rdk/components/generic/sys_mon_tools/rdklogctrlrdk-nextApache
rdk/components/generic/sys_mon_tools/si_cache_parserrdk-nextApache
rdk/components/generic/sys_mon_tools/sys_resourcerdk-nextApache
rdk/components/generic/sys_mon_tools/sys_utilsrdk-nextApache
rdk/components/generic/sys_mon_tools/udhcpc-opt43rdk-nextApache
rdk/components/generic/syslog_helperrdk-nextApache
rdk/components/generic/tr69hostifrdk-nextApache
rdk/components/generic/trmrdk-nextApache
rdk/components/generic/ttsenginerdk-nextApache
rdk/components/generic/wifirdk-nextApache
rdk/components/generic/xupnprdk-nextApache
rdk/components/opensource/oe/bitbakerdk/mortyoe-mirrors
rdk/components/opensource/oe/meta-openembeddedrdk/mortyoe-mirrors
rdk/components/opensource/oe/meta-qt5rdk/mortyoe-mirrors
rdk/components/opensource/oe/meta-raspberrypirdk/mortyoe-mirrors
rdk/components/opensource/oe/meta-virtualizationrdk/mortyoe-mirrors
rdk/devices/intel-x86-pc/emulator/devicesettingsrdk-nextApache
rdk/devices/intel-x86-pc/emulator/rdkbrowserrdk-nextApache
rdk/devices/intel-x86-pc/rdkemulator/gst-plugins-rdk/playersinkbinrdk-nextLGPL
rdk/devices/intel-x86-pc/rdkemulator/gst-plugins-rdk/qamtunersrcrdk-nextLGPL
rdk/devices/raspberrypi/devicesettingsrdk-nextApache
rdk/devices/raspberrypi/gst-plugins-rdk/playersinkbinrdk-nextLGPL
rdk/devices/raspberrypi/iarmmgrsrdk-nextApache
rdk/devices/raspberrypi/wifirdk-nextApache
rdk/tools/tdkrdk-nextApache
rdkb/components/generic/CcspLogAgentrdk-nextApache
rdkb/components/generic/harvesterrdk-nextApache
rdkb/components/generic/servicemanagerrdk-nextApache
rdkb/components/generic/ssordk-nextApache
rdkb/components/generic/startParodusrdk-nextApache
rdkb/components/opensource/ccsp/CcspCMAgentrdk-nextApache
rdkb/components/opensource/ccsp/CcspCommonLibraryrdk-nextApache
rdkb/components/opensource/ccsp/CcspCrrdk-nextApache
rdkb/components/opensource/ccsp/CcspDmClirdk-nextApache
rdkb/components/opensource/ccsp/CcspEPONAgentrdk-nextApache
rdkb/components/opensource/ccsp/CcspEthAgentrdk-nextApache
rdkb/components/opensource/ccsp/CcspHomeSecurityrdk-nextApache
rdkb/components/opensource/ccsp/CcspLMLiterdk-nextApache
rdkb/components/opensource/ccsp/CcspMoCArdk-nextApache
rdkb/components/opensource/ccsp/CcspMtaAgentrdk-nextApache
rdkb/components/opensource/ccsp/CcspPandMrdk-nextApache
rdkb/components/opensource/ccsp/CcspTr069Pardk-nextApache
rdkb/components/opensource/ccsp/CcspWifiAgentrdk-nextApache
rdkb/components/opensource/ccsp/CcspXDNSrdk-nextApache
rdkb/components/opensource/ccsp/FirmwareSanityrdk-nextApache
rdkb/components/opensource/ccsp/GwProvApprdk-nextApache
rdkb/components/opensource/ccsp/GwProvApp-ePONrdk-nextApache
rdkb/components/opensource/ccsp/GwProvApp-EthWanrdk-nextApache
rdkb/components/opensource/ccsp/halrdk-nextApache
rdkb/components/opensource/ccsp/halinterfacerdk-nextApache
rdkb/components/opensource/ccsp/hotspotrdk-nextApache
rdkb/components/opensource/ccsp/MeshAgentrdk-nextApache
rdkb/components/opensource/ccsp/PowerManagerrdk-nextApache
rdkb/components/opensource/ccsp/sysintrdk-nextApache
rdkb/components/opensource/ccsp/TestAndDiagnosticrdk-nextApache
rdkb/components/opensource/ccsp/Utopiardk-nextApache
rdkb/components/opensource/ccsp/webuirdk-nextApache
rdkb/components/opensource/ccsp/webui-bwgrdk-nextApache
rdkb/components/opensource/ccsp/Xconfrdk-nextApache
rdkb/devices/intel-x86-pc/emulator/sysintrdk-nextApache
rdkb/devices/intel-x86-pc/emulator/tdkbrdk-nextApache
rdkb/devices/raspberrypi/halrdk-nextApache
rdkb/devices/raspberrypi/sysintrdk-nextApache
rdkb/devices/raspberrypi/tdkbrdk-nextApache
rdkb/devices/rdkbemu/ccsp/rdkbrdk-nextApache
rdkb/devices/rdkbemu/rdkbemu_xb3rdk-nextApache
rdkb/tools/tdkbrdk-nextApache
rdkc/components/opensource/configMgrrdk-nextApache
rdkc/components/opensource/cvrrdk-nextApache
rdkc/components/opensource/httpClientsrdk-nextApache
rdkc/components/opensource/ledmgrrdk-nextApache
rdkc/components/opensource/pluginsrdk-nextApache
rdkc/components/opensource/rmsrdk-nextApache
rdkc/devices/raspberrypi/mediastreamerrdk-nextApache
rdkc/tools/tdkcrdk-nextApache
rdk/components/generic/rdk-oe/meta-cmfrdk-nextApache
rdk/components/generic/rdk-oe/meta-cmf-broadbandrdk-nextApache
rdk/components/generic/rdk-oe/meta-rdk-broadbandrdk-nextApache
rdk/components/generic/rdk-oe/meta-rdkrdk-nextApache
rdk/components/generic/rdk-oe/meta-rdk-extrdk-nextApache
rdk/components/generic/rdk-oe/meta-cmf-raspberrypirdk-nextApache
rdk/components/generic/rdk-oe/meta-cmf-meshrdk-nextApache
rdk/components/generic/rdk-oe/meta-rdk-videordk-nextApache
rdkb/components/opensource/ccsp/RdkCellularManagerrdk-nextApache




  • No labels