Access to CMF repository

Contact the support team at support@rdkcentral.com to get access to CMF repository 

Download source code

The RDK code can be obtained from the CMF Gerrit instance using the repo commands below :

$ repo init -u https://YOUR_USERNAME@code.rdkcentral.com/r/manifests -b 2.1-20150629 
$ repo sync --no-clone-bundle 

Note : The above commands illustrate how to access the specific CMF iteration (snapshot) RDK-2.1-20150629. Substitute the latest iteration currently available in RDKV-Releases page. If you want to get the very latest state of the code (i.e. current development), do not supply a branch, and master will be fetched: 

$ repo init -u https://YOUR_USERNAME@code.rdkcentral.com/r/manifests
$ repo sync --no-clone-bundle 


The Manifest file(manifest.xml or default.xml) defines which repositories the project uses and links to appropriate revisions of each git repository. After completing "repo init", manifest files will be downloaded in ".repo/manifests/" path. 

repo init command for RDK Emulator:

repo init -u https://code.rdkcentral.com/r/manifests -b 2.1-20160613 -m emulator.xml

Note : - Repo commands will not fetch any of the source code. Instead fetch the recipes which will have the URIs of source code repositories.

Building

To build a Yocto project, the following sample steps are necessary

$ cd <workspace dir>
$ source meta-cmf/setup-environment

The above step configures and sets up your directory to start an appropriate build for hybrid or media client. There are different kinds of builds listed. Please read the options and select the number of the build you need. It moves the user to a new build folder from where the bitbake command is executed. setup-enviornment is the script used to prepare the host for a bitbake build.

The build/ directory structure:

Note: build-<machine> (e.g. build-oem-platform) - This is the object/build directory, all objects and intermediate files for all components are stored in this folder. if you want to do a clean build you can delete this folder, then run ./meta-cmf/setup-environment and rebuild. The build will be very fast since it will reuse the sstate (prebuilts) during this build, assuming the sstate-cache directory was populated with previous builds already.

Build the image

bitbake <Image Name>

For Eg :

           bitbake rdk-generic-mediaclient-image (Image with all RDK components related to mediaclient)
           bitbake core-image-minimal (Basic image without any RDK components which just boot-up on board)