RDK Resources
[*RDK Preferred*]
Code Management Facility
RDK Forums
[RDK Conferences]
RDK Support
Archives
Papers & Presentations Archive
This guide is intended to help developers understand the Yocto framework in RDK so they can extend the existing functionality.
Bitbake executes all the layers starting with a prefix ‘meta’. It parses the build classes, configuration files, and recipes and executes each task by creating a shell script on-the-fly.
TASK | DESCRIPTION | FUNCTION |
Build | Default task for a recipe - depends on all other normal tasks required to 'build' a recipe | do_build |
Init RAMFS | Combines an initial ramdisk image and kernel together to form a single image | do_bundle_initramfs |
Check URI | Validates the SRC_URI value | do_checkuri |
Clean | Removes all output files for a target | do_clean |
Clean all | Removes all output files, shared state cache, and downloaded source files for a target | do_cleanall |
Clean SSTATE | Removes all output files and shared state cache for a target | do_cleansstate |
Compile | Compiles the source in the compilation directory | do_compile |
Configure | Configures the source by enabling and disabling any build-time and configuration options for the software being built | do_configure |
Dev Shell | Starts a shell with the environment set up for development/debugging | do_devshell |
Fetch | Fetches the source code | do_fetch |
Install | Copies files from the compilation directory to a holding area | do_install |
List Tasks | Lists all defined tasks for a target | do_listtasks |
Package | Analyzes the content of the holding area and splits it into subsets based on available packages and files | do_package |
Package QA | Runs QA checks on packaged files | do_package_qa |
Write IPK | Creates the actual IPK packages and places them in the Package Feed area | do_package_write_ipk |
Patch | Locates patch files and applies them to the source code | do_patch |
Populate License | Writes license information for the recipe that is collected later when the image is constructed | do_populate_lic |
Populate SDK | Creates the file and directory structure for an installable SDK | do_populate_sdk |
Populate SYSROOT | Copies a subset of files installed by do_install into the sysroot in order to make them available to other recipes | do_populate_sysroot |
Root FS | Creates the root filesystem (file and directory structure) for an image | do_rootfs |
Unpack | Unpacks the source code into a working directory | do_unpack |
Configuration
Configuration (*.conf) comprises of global definition of variables. There are two types of configurations:
BSPs are layers that add machine settings and recipes. It contains extensions and customizations to base system. They are added to the BBLAYERS variable in build/conf/bblayers.conf
Machine settings are specified in a layer's conf/machine/xxx.conffile(s)
For Example:
../meta-rdk-bsp-emulator/conf/machine/qemux86hyb.conf
For Device:
../meta-rdk-oem-<OEM Name>-<SoCName>/conf/machine/<configuration_file_name>.conf
Recipes are the most basic metadata files which are denoted by the file extension*.bb. Recipes can build one or more packages from source code.
They provide:
Append files are identified by the extension *.bbappend. They are used to extend or override information in an existing recipe file. BitBake expects every append file to have a corresponding recipe (*.bb) file. A missing .bb file will be shown as an warning by the BitBake parser. The append file and corresponding recipe file must use the same root filename.
Example: devicesettings_git.bb & devicesettings_git.bbappend
These are set automatically by bitbake.
Build time package variables
Runtime package variables
Variables you commonly set
Patches can be applied to recipe files. Patch files extension *.patch. Place the patch file in subdirectory of recipe named (component) folder. The subdirectory should be preferably named as that of component or as ‘files’. Add the below line to the recipe file
SRC_URI += "file://temp.patch"
More information on patches can be found here
SSTATE ( shared state ) is the way OE speeds up builds. A much detailed conceptual description please read http://www.yoctoproject.org/docs/current/ref-manual/ref-manual.html#shared-state-cache
OE/Yocto has a feature called SSTATE(shared state) to deliver prebuilts amongst users. Shared state is currently configured with OE/Yocto projects.