Overview of Bitbake Recipes and .bbappend Files
A Bitbake recipe is a set of instructions that the Bitbake build engine takes as input to generate packages. The .bb extension is used for recipe files in the Yocto Project. Inside the Poky directory, many meta-layers contain recipe files, each associated with a particular software package.
Yocto recipe provides the following information to Bitbake.
- Description of the package
- The license of the package ex: GPL, GPLv2, etc
- Which version to use and where to fetch the source files.
- What are the dependencies of other packages?
- Patch requirement
- Configuration or any extra flag requirement
- How to compile the code.
- Install the package.
What is the command to compile and build the recipe?
- Bitbake reads the recipe files and executes tasks defined in the recipe files and classes (.bbclass files) to generate the package.
$bitbake recipe_name
What is bbappend file?
- A file with the .bbappend extension is called a Bitbake append file. This file is used to modify a recipe file.
- The Yocto Project is an open-source project, and if you want to modify recipe files, it is recommended to create your layer and create a .bbappend file to modify the recipe.
- bbappend file name should be the same as the recipe package name.
- For example, if the recipe file name is busybox_1.32.0.bb and you want to modify the BusyBox software package, you need to create a busybox_%.bbappend file.