RDK Resources

[*ASP Wiki*]

Code Management Facility

Code Releases

RDK Forums

[RDK Conferences]

RDK Support

Archives

Papers & Presentations Archive

In the News!

Skip to end of metadata
Go to start of metadata

A tutorial to set up your environment and Download Source Code


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

$ repo init -u https://code.rdkcentral.com/r/manifests -m rdkb.xml -b rdkb-2019q3
$ repo sync -j4 --no-clone-bundle
  • The -m rdkb.xml in the build sequence above is important. If this is not specified, you will get an RDK-V tree by default.

Note : The above commands illustrate how to access the specific CMF iteration (snapshot) RDK-B_2019Q3. Substitute the latest iteration currently available in RDK-B Releases page.

If you want to get the very latest state of the code (i.e. current development), use rdk-next branch

$ repo init -u https://code.rdkcentral.com/r/manifests -b rdk-next -m rdkb-extsrc.xml
$ repo sync -j4 --no-clone-bundle

The first command will download the manifest, while the other command will fetch and checkout all the relevant git trees. Now you have a complete folder structure ready to build. 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.

For other details on how to set up your Environment refer to Getting Started with the Code

Build Source Code


Steps to build the Source code:
 
In order to build the source code, we need to follow two primary steps,
 
1. Source the environment setup file
2. Build the required image using bitbake
 
The build instructions are device specific (e.g Emulator, RaspberryPi) and we need to be careful in using the proper environment setup file. We will take example of raspberry-pi and emulator here for reference.

Building the Emulator Version

Building for RaspberryPi

  
For further details on download and build instructions please refer to the RDK-B Release manuals provided with every release.
  • No labels

13 Comments

  1. I can't download the source code, get the following error:

    Get https://gerrit-googlesource.lug.ustc.edu.cn/git-repo/clone.bundle

    Get https://gerrit-googlesource.lug.ustc.edu.cn/git-repo

    warning: redirecting to https://gerrit-googlesource.proxy.ustclug.org/git-repo/

    remote: Finding sources: 100% (13/13)

    remote: Total 13 (delta 0), reused 13 (delta 0)

    Unpacking objects: 100% (13/13), done.

    From https://gerrit-googlesource.lug.ustc.edu.cn/git-repo

       da40341..a6515fb  master     -> origin/master

    Get https://code.rdkcentral.com/r/manifests

      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current

                                     Dload  Upload   Total   Spent    Left  Speed

      0     0    0     0    0     0      0      0 --:--:--  0:00:02 --:--:--     0

    curl: (22) The requested URL returned error: 404 

    Server does not provide clone.bundle; ignoring.

    fatal: remote error: access not permitted

    fatal: remote error: access not permitted

    fatal: cannot obtain manifest https://code.rdkcentral.com/r/manifests

  2. Z-ZheLiu,

    It seems to be an licence issue. I think you need to be an RDK licensee to access the source code

  3. Hi I trying to build the image for Rasspberry PI but a have an error :

    ERRORParseError at /home/epanciera/wk/rdkb-rpi-master/meta-raspberrypi/recipes-rdk/westeros/westeros-soc-rpi.bb:1: Could not include required file recipes-graphics/westeros/westeros.inc

    Could you help us?


    I m using the master branch  → repo init -u https://code.rdkcentral.com/r/manifests -m rdkb.xml

    When I set the setupenviroment  (source meta-cmf-raspberrypi/setup-environment) , I'm using the option 9 (meta-cmf-raspberrypi/conf/machine/raspberrypi-rdk-broadband.conf)

    This is the output when I try to do bitbake: 


    $ bitbake rdk-generic-broadband-image

    WARNING: Variable key FILES_${PN} (${bindir}/* ${sbindir}/* ${libexecdir}/* ${libdir}/lib*${SOLIBS} ${sysconfdir} ${sharedstatedir} ${localstatedir} ${base_bindir}/* ${base_sbindir}/* ${base_libdir}/*${SOLIBS} ${base_prefix}/lib/udev/rules.d ${prefix}/lib/udev/rules.d ${datadir}/${BPN} ${libdir}/${BPN}/* ${datadir}/pixmaps ${datadir}/applications ${datadir}/idl ${datadir}/omf ${datadir}/sounds ${libdir}/bonobo/servers) replaces original key FILES_openjdk-6-jre ( ${JDK_HOME}/jre/bin/keytool         ${JDK_HOME}/jre/bin/orbd ${JDK_HOME}/jre/bin/pack200         ${JDK_HOME}/jre/bin/rmid ${JDK_HOME}/jre/bin/rmiregistry         ${JDK_HOME}/jre/bin/servertool ${JDK_HOME}/jre/bin/tnameserv         ${JDK_HOME}/jre/bin/unpack200${JDK_HOME}/jre/bin/policytool         ${JDK_HOME}/jre/bin/javaws        ).

    WARNING: Variable key FILES_${PN} (${bindir}/* ${sbindir}/* ${libexecdir}/* ${libdir}/lib*${SOLIBS} ${sysconfdir} ${sharedstatedir} ${localstatedir} ${base_bindir}/* ${base_sbindir}/* ${base_libdir}/*${SOLIBS} ${base_prefix}/lib/udev/rules.d ${prefix}/lib/udev/rules.d ${datadir}/${BPN} ${libdir}/${BPN}/* ${datadir}/pixmaps ${datadir}/applications ${datadir}/idl ${datadir}/omf ${datadir}/sounds ${libdir}/bonobo/servers) replaces original key FILES_openjdk-6-jre ( ${JDK_HOME}/jre/bin/keytool         ${JDK_HOME}/jre/bin/orbd ${JDK_HOME}/jre/bin/pack200         ${JDK_HOME}/jre/bin/rmid ${JDK_HOME}/jre/bin/rmiregistry         ${JDK_HOME}/jre/bin/servertool ${JDK_HOME}/jre/bin/tnameserv         ${JDK_HOME}/jre/bin/unpack200${JDK_HOME}/jre/bin/policytool         ${JDK_HOME}/jre/bin/javaws        ).

    WARNING: Variable key FILES_${PN} (${bindir}/* ${sbindir}/* ${libexecdir}/* ${libdir}/lib*${SOLIBS} ${sysconfdir} ${sharedstatedir} ${localstatedir} ${base_bindir}/* ${base_sbindir}/* ${base_libdir}/*${SOLIBS} ${base_prefix}/lib/udev/rules.d ${prefix}/lib/udev/rules.d ${datadir}/${BPN} ${libdir}/${BPN}/* ${datadir}/pixmaps ${datadir}/applications ${datadir}/idl ${datadir}/omf ${datadir}/sounds ${libdir}/bonobo/servers) replaces original key FILES_openjdk-6-jre ( ${JDK_HOME}/jre/bin/keytool         ${JDK_HOME}/jre/bin/orbd ${JDK_HOME}/jre/bin/pack200         ${JDK_HOME}/jre/bin/rmid ${JDK_HOME}/jre/bin/rmiregistry         ${JDK_HOME}/jre/bin/servertool ${JDK_HOME}/jre/bin/tnameserv         ${JDK_HOME}/jre/bin/unpack200${JDK_HOME}/jre/bin/policytool         ${JDK_HOME}/jre/bin/javaws        ).

    WARNING: Variable key FILES_${PN} (${bindir}/* ${sbindir}/* ${libexecdir}/* ${libdir}/lib*${SOLIBS} ${sysconfdir} ${sharedstatedir} ${localstatedir} ${base_bindir}/* ${base_sbindir}/* ${base_libdir}/*${SOLIBS} ${base_prefix}/lib/udev/rules.d ${prefix}/lib/udev/rules.d ${datadir}/${BPN} ${libdir}/${BPN}/* ${datadir}/pixmaps ${datadir}/applications ${datadir}/idl ${datadir}/omf ${datadir}/sounds ${libdir}/bonobo/servers) replaces original key FILES_openjdk-6-jre ( ${JDK_HOME}/jre/bin/keytool         ${JDK_HOME}/jre/bin/orbd ${JDK_HOME}/jre/bin/pack200         ${JDK_HOME}/jre/bin/rmid ${JDK_HOME}/jre/bin/rmiregistry         ${JDK_HOME}/jre/bin/servertool ${JDK_HOME}/jre/bin/tnameserv         ${JDK_HOME}/jre/bin/unpack200${JDK_HOME}/jre/bin/policytool         ${JDK_HOME}/jre/bin/javaws        ).

    WARNING: Variable key FILES_${PN} (${bindir}/* ${sbindir}/* ${libexecdir}/* ${libdir}/lib*${SOLIBS} ${sysconfdir} ${sharedstatedir} ${localstatedir} ${base_bindir}/* ${base_sbindir}/* ${base_libdir}/*${SOLIBS} ${base_prefix}/lib/udev/rules.d ${prefix}/lib/udev/rules.d ${datadir}/${BPN} ${libdir}/${BPN}/* ${datadir}/pixmaps ${datadir}/applications ${datadir}/idl ${datadir}/omf ${datadir}/sounds ${libdir}/bonobo/servers) replaces original key FILES_openjdk-7-jre ( ${JDK_HOME}/jre/bin/keytool         ${JDK_HOME}/jre/bin/orbd ${JDK_HOME}/jre/bin/pack200         ${JDK_HOME}/jre/bin/rmid ${JDK_HOME}/jre/bin/rmiregistry         ${JDK_HOME}/jre/bin/servertool ${JDK_HOME}/jre/bin/tnameserv         ${JDK_HOME}/jre/bin/unpack200${JDK_HOME}/jre/bin/policytool         ${JDK_HOME}/jre/bin/javaws        ).

    ERROR: ParseError at /home/epanciera/wk/rdkb-rpi-master/meta-raspberrypi/recipes-rdk/westeros/westeros-soc-rpi.bb:1: Could not include required file recipes-graphics/westeros/westeros.inc


    Summary: There were 5 WARNING messages shown.

    Summary: There was 1 ERROR message shown, returning a non-zero exit code.

  4. Eduardo Panciera


    At present,We are working with Morty branch(updated), please follow the below build instructions steps to build a rpi image,

               1. repo init -u https://code.rdkcentral.com/r/manifests -m rdkb-raspberrypi.xml -b morty

                2. repo sync --no-tags

                3. source meta-cmf-raspberrypi/setup-environment

                4. choose 9) meta-cmf-raspberrypi/conf/machine/raspberrypi-rdk-broadband.conf

                5. bitbake rdk-generic-broadband-image

  5. I have a problem compiling


    repo init -u https://code.rdkcentral.com/r/manifests -m rdkb.xml -b rdkb-2018q2


    0.61-r0/temp/log.do_compile.20918)
    ERROR: Logfile of failure stored in: /home/producto/repo/rdkb/build-qemux86broadband/tmp/work/x86_64-linux/quilt-native/0.61-r0/temp/log.do_compile.20918
    Log data follows:
    | DEBUG: Executing shell function do_compile
    | NOTE: make -j 4
    | /home/producto/repo/rdkb/build-qemux86broadband/tmp/work/x86_64-linux/quilt-native/0.61-r0/temp/run.do_compile.20918: line 140: make: command not found
    | ERROR: oe_runmake failed
    | WARNING: /home/producto/repo/rdkb/build-qemux86broadband/tmp/work/x86_64-linux/quilt-native/0.61-r0/temp/run.do_compile.20918:1 exit 1 from
    | exit 1
    | ERROR: Function failed: do_compile (log file is located at /home/producto/repo/rdkb/build-qemux86broadband/tmp/work/x86_64-linux/quilt-native/0.61-r0/temp/log.do_compile.20918)
    ERROR: Task 23 (/home/producto/repo/rdkb/openembedded-core/meta/recipes-devtools/quilt/quilt-native_0.61.bb, do_compile) failed with exit code '1'
    NOTE: Tasks Summary: Attempted 11 tasks of which 0 didn't need to be rerun and 1 failed.
    NOTE: Writing buildhistory
    Waiting for 0 running tasks to finish:

    Summary: 1 task failed:
    /home/producto/repo/rdkb/openembedded-core/meta/recipes-devtools/quilt/quilt-native_0.61.bb, do_compile
    Summary: There were 32 WARNING messages shown.
    Summary: There was 1 ERROR message shown, returning a non-zero exit code.

  6. Alfredo Aparicio,


    At present,We are working with Morty branch.So requested to use the below command for generating the RDK-B Emulator image,

    repo init -u https://code.rdkcentral.com/r/manifests -m rdkb.xml -b morty

  7. I'm getting an error when trying to get the source code.  (Tried both master and morty)

    Checking out project rdk/devices/intel-x86-pc/emulator/iarmmgrs
    Syncing work tree: 95% (146/153)Checking out project rdk/devices/raspberrypi/iarmmgrs
    Syncing work tree: 96% (147/153)Checking out project rdk/devices/raspberrypi/webpa-client
    Checking out project rdk/devices/raspberrypi/wifi
    Syncing work tree: 97% (149/153)Checking out project rdk/tools/tdk
    error: Cannot checkout rdk/tools/tdk: ManifestInvalidRevisionError: revision master in rdk/tools/tdk not found
    error: in `sync --no-clone-bundle`: revision master in rdk/tools/tdk not found


  8. I meet a problem for downloading the code

    I got the message "access not permitted" after I type the user name and password for"repo init -u https://code.rdkcentral.com/r/manifests -m rdkb.xml -b rdkb-2018q2"?

    how to access the code?

    1. Hi jhe wei, jhang


      We tried with the command you mentioned and it seems to work fine. Let us see if your account has some access issues.Could you please raise an issue at https://jira.rdkcentral.com/ on the same?


      Thanks,

      Swamy

  9. After I do the steps for "Building for RaspberryPi" on the page "RDK-B_2019Q3".

    I got the message "ERROR: Layer 'cmf-raspberrypi' depends on layer 'cmf-video', but this layer is not enabled in your configuration" for "bitbake rdk-generic-broadband-image" command.

    What is the best suggestion for solving this problem?

    1. Hi Wilson

      This error is mostly seen when we select an option with a video component included for a broadband build. Could you please let us know the option selected( the number too ) during step 3( the 'source' command )

      Thanks,

      Swamy

      1. the option are 23) meta-raspberrypi/conf/machine/raspberrypi3-64.conf and 24) meta-raspberrypi/conf/machine/raspberrypi3.conf

        My device is raspberrypi 3 model B and I have another problem.

        What is the difference with raspberrypi3-64-rdk-broadband.conf, raspberrypi3-64-rdk-broadband-musl.conf, raspberrypi3-64.conf
        and raspberrypi3.conf?

        Following content is my test result.

        case 1: choose the config raspberrypi3-64-rdk-broadband-musl.conf and build the code.

                    i got the error message "ucresolv/git+AUTOINC+996c3778b1-r1/git/./include/sys/resource.h:2:35: fatal error: resource/sys/resource.h: No such file or directory"

        case 2: choose the config raspberrypi3-64-rdk-broadband.conf and build the code.

                    After the device boot up, i find that the network interface don't link up. I have to type the commnad "ip link set eth0 up"...etc.

                    The lighttpd is not enable too. I use the command "lighttpd -f /etc/lighttpd.conf" to enable the gui feature.

                    what is the GUI default username and passoword? 

                    After I input the admin and password based on "RDK-B-RaspberryPi-UserGuide 2.0", I got the error message "Incorrect password for admin!"

                     I also find the error message like "swctl command not found" and more message in the /rdklogs/logs/Console.txt.0.

        case 3: raspberrypi3-64.conf&raspberrypi3.conf

                    i got the error message "ERROR: Layer 'cmf-raspberrypi' depends on layer 'cmf-video', but this layer is not enabled in your configuration"