This document describes how to add a new configuration in yocto.
Guideline to create OEM specific images
All the work needs be done only in the meta-rdk-oem layer
Write a recipe <oem>-image-tools-native.bb under recipes-tools to copy all the tools, binaries and scripts needed to create custom oem image to the staging binary directory
- This recipe should fetch all the sources from the GIT repo
- Example name space for the GIT repo where you should place all the tools like permission files, authentication keys etc - “rdk/devices/<OEM>/<OEM_device>/tools”
- Example namespace for the GIT repo to keep all the binaries (crcsum etc) - “rdk/devices/<OEM>/<OEM_device>/bin”
- This recipe will have only one task – do_install, which copies all the necessary files to create oem images to staging binary directory
- "inherit native" this class would short-circuit all the target build and strip tasks.
Write a bbclass - oem-image.bbclass
- Add oem-image-tools as DEPENDS
- In this class add a task "create_oem_image" to create the oem specific images - "addtask create_oem_image after do_rootfs before do_build"
- Copy all the tools and files needed from STAGING_BINDIR_NATIVE to working directory, which were copied by <oem>-image-tools-native.bb
- Once copied this task will have the logic to create the custom oem images
- After creating the custom oem images, copy them to DEPLOY_DIR_IMAGE
- In recipe add "create_oem_image[nostamp] = "1"", this allows task to run every-time on every run of bitbake.
- Add create_oem_image[depends] += "${PN}:do_rootfs" to make sure the do_rootfs task is re-run every time before executing the task - create_oem_image.
- Make this class inherit by all the rdk image recipes,
rdk-generic-mediaserver-image.bbappend: inherit oem-image,comcast-mediaclient-image.bbappend:inherit oem-image,comcast-hybrid-image.bbappend:inherit oem-image,rdk-generic-hybrid-image.bbappend:inherit oem-image, core-image-minimal.bbappend:inherit oem-image,rdk-generic-image.bbappend:inherit oem-image,rdk-generic-mediaclient-image.bbappend:inherit oem-image.
Adding a new SoC/OEM to RDK
Adding a new machine to the Yocto Project is a straightforward process which involves following steps:
- Create a new layer which will hold all the recipes and machine configurations for the new SoC/OEM.
- Adding the Machine Configuration File for the new SoC/OEM.
- Adding a Kernel for the Machine.
- Adding Recipe for SoC/OEM
- Creating packages for building images
...
The following kind of recipes can be added to SoC/OEM layer. The recipes shall be grouped as described in slide “BSP Reference Layer”
- recipes (.bb) to build Kernel
- recipes(.bb) to build SDK
- Kernel patches (SoC/OEM specific - if any)
- SDK patches (SoC/OEM specific - if any)
- Any SoC/OEM specific scripts or files which need to be installed in RFS
...