1. Host Setup

Refer the link for host setup details :Host Setup

2. Build Setup

2.1. Initialization

$ repo init -u https://code.rdkcentral.com/r/rdkcmf/manifests -m rdkc-nosrc.xml -b dunfell
						         ( or )
$ repo init -u https://code.rdkcentral.com/r/rdkcmf/manifests -m rdkc-extsrc.xml -b dunfell

2.2. Download/Sync

$ repo sync -j `nproc` --no-clone-bundle --no-tags

2.3. Layer Cherrypick

This is the temporary steps,once the changes get merged in rdk-next then we will remove this cherry pick details

Below changes are needed for libcamera

cd meta-cmf-raspberrypi
1. git fetch https://code.rdkcentral.com/r/rdk/components/generic/rdk-oe/meta-cmf-raspberrypi refs/changes/96/77096/2 && git cherry-pick FETCH_HEAD
2. git fetch https://code.rdkcentral.com/r/rdk/components/generic/rdk-oe/meta-cmf-raspberrypi refs/changes/77/76077/4 && git cherry-pick FETCH_HEAD

cd meta-cmf-camera
1. git fetch https://code.rdkcentral.com/r/components/generic/rdk-oe/meta-cmf-camera refs/changes/98/77098/1 && git cherry-pick FETCH_HEAD

2.4. Environment Setup

    Environment Setup
    $ MACHINE=raspberrypi3-rdk-camera source meta-cmf-raspberrypi/setup-environment
    Environment Setup
    $ MACHINE=raspberrypi0-rdk-camera source meta-cmf-raspberrypi/setup-environment

    2.5. Building

    $ bitbake rdk-generic-camera-image
    

    2.6. Source Code Cherrypick

    This is the temporary steps,once the changes get merged in rdk-next then we will remove this cherry pick details

    
    

    3. Flash Procedure

    $ bzcat "Image Name" | sudo dd of="Device Name" bs=4M iflag=fullblock oflag=direct conv=fsync
     
    Example:
    bzcat rdk-generic-camera-image_default_20201127105606.rootfs.wic.bz2 | sudo dd of=/dev/sdc bs=4M iflag=fullblock oflag=direct conv=fsync
    • No labels

    14 Comments

    1. These paths for the manifests are wrong. Some digging around indicates it might be that https://code.rdkcentral.com/r/manifests has moved to https://code.rdkcentral.com/r/rdkcmf/manifests

    2. Can the difference between rdkc-extsrc.xml and rdkc-nosrc.xml be documented please? What is the distinction between them ?

      1. Z-Savidha E Are you able to clarify the distinction of these two options please? Should I prefer extsrc or nosrc ?

        1. For extsrc , Generic code will be fetch only once during repo sync and other components will be fetch and compiled during bitbake.
          if you don't make any modification in generic component, then we can go for extsrc.

          Please find generic component list in this inc file : https://code.rdkcentral.com/r/plugins/gitiles/rdk/components/generic/rdk-oe/meta-cmf/+/refs/heads/rdk-next/conf/distro/include/rdk-external-src.inc


          with nosrc, All component will be fetched and compiled during build time (bitbake rdk-genric-camera-image)


          For development activity, we can go with nosrc manifest.

    3. Did you tried with this build instruction?

      As we are able to compile this build with this instruction.

      repo init -u https://code.rdkcentral.com/r/manifests -m rdkc-nosrc.xml -b dunfell

      repo sync -j `nproc` --no-clone-bundle --no-tags

      MACHINE=raspberrypi3-rdk-camera source meta-cmf-raspberrypi/setup-environment

      bitbake rdk-generic-camera-image

      1. I'm building on Ubuntu 22.04 - and Dunfell looks like it has much older requirements. I'll set up a dockerised build to get the correct deps.
        But https://code.rdkcentral.com/r/manifests is not readable to me. Can you confirm that this is the correct manifest address?

    4. code.rdkcentral credential is needed for to access this https://code.rdkcentral.com/r/manifests manifests, but for this https://code.rdkcentral.com/r/rdkcmf/manifests manifests no need any credential..


      We can do the compilation with this manifests also..

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


      As we checked build with below build instruction as well.

      $ repo init -u https://code.rdkcentral.com/r/rdkcmf/manifests -m rdkc-nosrc.xml -b dunfell

      $ repo sync -j `nproc` --no-clone-bundle --no-tags

      $ MACHINE=raspberrypi3-rdk-camera source meta-cmf-raspberrypi/setup-environment

      $ bitbake rdk-generic-camera-image

    5. I believe https://code.rdkcentral.com/r/rdkcmf/manifests is also unavailable without credentials. But at least my credentials can access that one. I expect now I can access the manifest, I should be able to build once I have an ubuntu 18.04 VM set up. (I believe the compiler errors I faced are likely due to having host components that are 'too new', and not supported by Dunfell).

      1. https://code.rdkcentral.com/r/rdkcmf/manifests This manifest we can access without credential as well, please use below URL to view in browser page.

        https://code.rdkcentral.com/r/plugins/gitiles/rdkcmf/manifests

        1. Thanks, I've just repeated this again now - yes I can confirm I can access

            repo init -u https://code.rdkcentral.com/r/rdkcmf/manifests -m rdkc-nosrc.xml -b dunfell

          without entering credentials. I expect the 404 when accessing the url directly has thrown me off.


          Can that link be the default for the build documentation?

          Or separate the Initialization section with a tab to split for both internal/external users please?

    6. Hi Z-Kieran Bingham 

      Thanks for your information!!!

      Few days back only , this manifests got opensourced to this rdkcmf/manifests  path.

      I have updated rdkcmf/manifests  path in this build instruction(repo init).



    7. Hi Z-Kieran Bingham 

      Did you able to setup this camera build in your environment?

      Please use this link for host environment setup How to Build#SettinguptheHostEnvironment

      As of now , we did this build setup in 18.04 and 20.04, If possible please try to do this build in these linux version supported system.

      1. Yes, thanks Z-Savidha E  I was able to create a clean ubuntu 18.04 environment with docker, and build inside that in the end.

    8. Nope, seems something wrong with it at the moment

      Configuration files have been created for the following configuration:

       DISTRO: 
       MACHINE: raspberrypi3-rdk-camera

      meta-rdk/setup-environment:205: no matches found: ../*/conf/machine/sky-setup.sh
      ERROR: Unable to start bitbake server (None)
      ERROR: Server log for this session (/home/dingo/RDK-C3/build-raspberrypi3-rdk-camera/bitbake-cookerdaemon.log):
      --- Starting bitbake server pid 361964 at 2023-02-03 06:35:18.311466 ---
      ERROR: ParseError at /home/dingo/RDK-C3/build-raspberrypi3-rdk-camera/conf/local.conf:247: Could not include required file conf/distro/include/##RDK_FLAVOR##.inc