Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • 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

...

Creating packages for building images

  • Create a custom package-group for the SoC/OEM which shall list all the recipes that are required for

...

  • meta-rdk-soc-broadcom/meta-brcm/recipes-core/packagegroups/packagegroup-rdk-mediaserver.bbappend 

    Code BlockRDEPENDS_packagegroup-rdk-generic-mediaserver += "\     gstqamtunersrc-brcm \ "the image. 
  • Create a custom image for generating RFS for required SoC/OEM.

...

  • meta-rdk-<soc>/recipes-core/images/<soc>-hybrid-image.bb

    Code BlockIMAGE_INSTALL += "\     packagegroup-rdk-baserootfs \     packagegroup-rdk-<soc/oem specific packages> \ " 

Bitbake work-flow

  • All the components are built using individual recipes. There shall be a main image recipe (example , rdk-generic-image) which includes all other required recipe and create the final RFS
  • Package groups recipe is one support a image recipe to select the set of packages
  • The recipes will be called in sequence
    (1) opensource components
    (2) Kernel
    (3) SDK
    (4) RDK
    (5) MSO
    (6) Packaging and create final image.
  • The final linux and RFS  image will be created under build_folder/tmp/deploy/images