RDK Resources

[*RDK Preferred*]

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


Copyright 2016 RDK Management, LLC. All rights reserved. The contents of this document are RDK Management, LLC Proprietary and Confidential and may not be distributed or otherwise disclosed without prior written permission of RDK Management, LLC.

Host Setup

The OpenEmbedded build system should be able to run on any modern distribution with the following versions for Git, tar, and Python.

  • Git 1.7.8 or greater.

  • tar 1.24 or greater.

  • Python 2.7.3 or greater excluding Python 3.x, which is not supported.


Note: You should also have about 50 Gbytes of free disk space for building images.


Ubuntu and Debian


The essential packages you need for a supported Ubuntu or Debian distribution are shown in the following command

$ sudo apt-get install make gcc g++ diffstat texinfo chrpath gcc-multilib git gawk build-essential autoconf libtool libncurses-dev gettext gperf lib32z1 libc6-i386 g++-multilib python-git


Building

In order to use Yocto build system, the repo tool must be properly installed on the machine.


Repo setup

In order to install Repo make sure you have a /bin directory in your home directory and that it is included in your path

$ mkdir ~/bin

$ PATH=~/bin:$PATH

Download the repo tool and ensure that it is executable

$ curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo

$ chmod a+x ~/bin/repo


Note: it is also recommended to put credentials in .netrc when interacting with repo.


A sample .netrc file is illustrated below

machine code.rdkcentral.com

login YOUR_USERNAME

password YOUR_PASSWORD


Initilaizing the Build Environment


To build, follow below instructions


$ mkdir <workspace dir>

$ cd <workspace dir>

Example 1- for moty:

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

Example 2- for rdk-dev-1901:

$ repo init -u https://code.rdkcentral.com/r/manifests -b rdk-dev-1901 -m rdkb-extsrc.xml

$ repo sync -j4 --no-clone-bundle

$ source meta-cmf-raspberrypi/setup-environment (Select option raspberrypi-rdk-broadband.conf)

$ bitbake rdk-generic-broadband-image



Note. The kernel Image and root filesystem will be created under ./build-raspberrypi-rdk-mc/tmp/deploy/images/raspberrypi-rdk-broadband folder




  • No labels

11 Comments

  1. Hi,

     I am new to RDK-B.  In terms of licensing, as per RDK-licensing (I have email confirmation), it seems that license is only required for Video services. So, I did NOT sign the license agreement. 

    .

     To build RDK-B on Raspberry-Pi, I am using instructions from:  https://wiki.rdkcentral.com/pages/viewpage.action?pageId=49646131

     

    I want to access  RDK-B Manifest file using my user-name and Passwd. However, I am getting “permission denied”.


    Thanks

    -Praveen

  2. Running

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

    gives me the following error:

    error: Cannot checkout rdk/tools/tdk: ManifestInvalidRevisionError: revision master in rdk/tools/tdk not found
    error: in `sync -j4 --no-clone-bundle`: revision master in rdk/tools/tdk not found

    I checked out the repo by itself and the default branch is `rdk-next` and there is no master branch so this seems like a missmatch to me. Am I right?

  3. sumitdeveloper94@LAPTOP-LU0H43TS:~/rdkb$ repo init -u https://code.rdkcentral.com/r/manifests -m rdkb-raspberrypi.xml -b morty


    gpg: keyring `/home/sumitdeveloper94/.repoconfig/gnupg/secring.gpg' created
    gpg: keyring `/home/sumitdeveloper94/.repoconfig/gnupg/pubring.gpg' created
    gpg: /home/sumitdeveloper94/.repoconfig/gnupg/trustdb.gpg: trustdb created
    gpg: key 920F5C65: public key "Repo Maintainer <repo@android.kernel.org>" imported
    gpg: key 692B382C: public key "Conley Owens <cco3@android.com>" imported
    gpg: Total number processed: 2
    gpg: imported: 2 (RSA: 1)

    Get https://gerrit.googlesource.com/git-repo/clone.bundle
    Get https://gerrit.googlesource.com/git-repo
    remote: Finding sources: 100% (29/29)
    remote: Total 29 (delta 8), reused 29 (delta 8)
    Unpacking objects: 100% (29/29), done.
    From https://gerrit.googlesource.com/git-repo
    b466854..2ba5a1e master -> origin/master

    ... A new repo command ( 1.26) is available.
    ... You should upgrade soon:

    cp /home/sumitdeveloper94/rdkb/.repo/repo/repo /home/sumitdeveloper94/bin/repo

    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:03 --:--:-- 0
    curl: (22) The requested URL returned error: 404 Not Found
    Server does not provide clone.bundle; ignoring.
    Username for 'https://code.rdkcentral.com': sumitdeveloper94@gmail.com
    Password for 'https://sumitdeveloper94@gmail.com@code.rdkcentral.com':
    remote: Unauthorized
    fatal: Authentication failed for 'https://code.rdkcentral.com/r/manifests/'
    Username for 'https://code.rdkcentral.com': sumitdeveloper94
    Password for 'https://sumitdeveloper94@code.rdkcentral.com':
    remote: Unauthorized
    fatal: Authentication failed for 'https://code.rdkcentral.com/r/manifests/'
    fatal: cannot obtain manifest https://code.rdkcentral.com/r/manifests



    need help with this error. why cant i clone the bundle?

  4. Hi Sumit


    To clone the repo, you should be having the proper privileges attached to the account . Could you please share us the username you have used during the repo init? ( we see it is sumitdeveloper94@gmail.com from the logs, so just wanted to confirm )


    Thanks,

    Swamy

  5. HI All,

    I think that i have the same issue, i don't have privileges to get access and clone using repo. How can i do to get privileges?

    thanks.

    Edson

    1. Hi Edson dos Santos Sousa,

      You may sign-up for the RDK account to get privilaged access to restricted components

  6. Hello all,

         after downloading the repo I am trying to add a layer using "yocto-layer" command/script. Unfortunately that script doesn't exist in RaspberryPi based RDKB repos. Can anyone advise me on how to create a new layer in this environment?


    Thanks.

    1. Hi Mihir Sevak,

      If you want to add a new layer using "yocto-layer" script ,you need to first download the poky and put it in your rasberrypi code base and run the script to create a new folder.

      You can download poky from git using :

                        git clone https://github.com/seife/yocto-poky.git  

      Then you can execute the yocto-layer script to create the layers.

      See the below output :


              $/poky/yocto-poky/scripts/yocto-layer create new-layer

      Please enter the layer priority you'd like to use for the layer: [default: 6] 6
      Would you like to have an example recipe created? (y/n) [default: n] n
      Would you like to have an example bbappend file created? (y/n) [default: n] n
       
      New layer created in meta-new-layer.
       
      Don't forget to add it to your BBLAYERS (for details see meta-new-layer/README).




      1. HI Karthika A B ,

               Thanks for this input.

        I am running into couple other problems.

        First Problem:

        ==========

        I upgraded Linux kernel to a newer version. I am able to compile kernel, however, some drivers are failing due to older version of linux-libc-headers. When I checked linux-libc-headers.inc file there is a specific note that there is no need to upgrade libc headers. I tried to follow direction in that note to pick up latest kernel header files using STAGING_KERNLE_DIR variable but it still continue to fail. 

        Any insights about this? How to get drivers to compile properly with right libc and correct Linux headers?


        Second Problem:

        ============

        If I disable all complaining drivers from being built I am running into some error at the last packaging stage. Error doesn't say anything about what is failing. Can someone help me decode following error message?

        Thanks.


        ERROR: rdk-generic-broadband-image-1.0-r0 do_image_rpi_sdimg: Function failed: do_image_rpi_sdimg (log file is located at /home/mihir/Development/3_4_2020/build-raspberrypi-rdk-boot-time-broadband/tmp/work/raspberrypi_rdk_boot_time_broadband-rdk-linux-gnueabi/rdk-generic-broadband-image/1.0-r0/temp/log.do_image_rpi_sdimg.14423)
        ERROR: Logfile of failure stored in: /home/mihir/Development/3_4_2020/build-raspberrypi-rdk-boot-time-broadband/tmp/work/raspberrypi_rdk_boot_time_broadband-rdk-linux-gnueabi/rdk-generic-broadband-image/1.0-r0/temp/log.do_image_rpi_sdimg.14423
        Log data follows:
        | DEBUG: Executing python function set_image_size
        | DEBUG: Python function set_image_size finished
        | DEBUG: Executing shell function do_image_rpi_sdimg
        | Creating filesystem with Boot partition 40960 KiB and RootFS 335872 KiB
        | 0+0 records in
        | 0+0 records out
        | 0 bytes (0 B) copied, 0.000161036 s, 0.0 kB/s
        | Model: (file)
        | Disk /home/mihir/Development/3_4_2020/build-raspberrypi-rdk-boot-time-broadband/tmp/work/raspberrypi_rdk_boot_time_broadband-rdk-linux-gnueabi/rdk-generic-broadband-image/1.0-r0/deploy-rdk-generic-broadband-image-image-complete/rdkb-generic-broadband-boot-image_default_20200314212520.rootfs.rpi-sdimg: 390MB
        | Sector size (logical/physical): 512B/512B
        | Partition Table: msdos
        | Disk Flags:
        |
        | Number Start End Size Type File system Flags
        | 1 4194kB 46.1MB 41.9MB primary boot, lba
        | 2 46.1MB 390MB 344MB primary
        |
        | mkfs.fat: warning - lowercase labels might not work properly with DOS or Windows
        | mkfs.fat 4.0 (2016-05-06)
        | Total number of sectors (81920) not a multiple of sectors per track (63)!
        | Add mtools_skip_check=1 to your .mtoolsrc file to skip this test
        | Total number of sectors (81920) not a multiple of sectors per track (63)!
        | Add mtools_skip_check=1 to your .mtoolsrc file to skip this test
        | Total number of sectors (81920) not a multiple of sectors per track (63)!
        | Add mtools_skip_check=1 to your .mtoolsrc file to skip this test
        | Total number of sectors (81920) not a multiple of sectors per track (63)!
        | Add mtools_skip_check=1 to your .mtoolsrc file to skip this test
        | Total number of sectors (81920) not a multiple of sectors per track (63)!
        | Add mtools_skip_check=1 to your .mtoolsrc file to skip this test
        | Total number of sectors (81920) not a multiple of sectors per track (63)!
        | Add mtools_skip_check=1 to your .mtoolsrc file to skip this test
        | Total number of sectors (81920) not a multiple of sectors per track (63)!
        | Add mtools_skip_check=1 to your .mtoolsrc file to skip this test
        | WARNING: exit code 1 from a shell command.
        | ERROR: Function failed: do_image_rpi_sdimg (log file is located at /home/mihir/Development/3_4_2020/build-raspberrypi-rdk-boot-time-broadband/tmp/work/raspberrypi_rdk_boot_time_broadband-rdk-linux-gnueabi/rdk-generic-broadband-image/1.0-r0/temp/log.do_image_rpi_sdimg.14423)
        ERROR: Task (/home/mihir/Development/3_4_2020/meta-rdk/recipes-core/images/rdk-generic-broadband-image.bb:do_image_rpi_sdimg) failed with exit code '1'
        NOTE: Tasks Summary: Attempted 3703 tasks of which 3601 didn't need to be rerun and 1 failed.
        NOTE: Writing buildhistory

        Summary: 1 task failed:
        /home/mihir/Development/3_4_2020/meta-rdk/recipes-core/images/rdk-generic-broadband-image.bb:do_image_rpi_sdimg
        Summary: There were 4 WARNING messages shown.
        Summary: There was 1 ERROR message shown, returning a non-zero exit code.



  7. Hi

    I created a login on rdk central but it not letting me do a repo init. Do I need to get some other permissions?

    repo init -u https://code.rdkcentral.com/r/manifests -b rdk-dev-1901 -m rdkb-extsrc.xml
    Username for 'https://code.rdkcentral.com': sam-2000
    Password for 'https://sam-2000@code.rdkcentral.com':
    remote: Unauthorized
    fatal: Authentication failed for 'https://code.rdkcentral.com/r/manifests/'
    manifests:
    remote: Unauthorized
    fatal: Authentication failed for 'https://code.rdkcentral.com/r/manifests/