Part 3 of 16 YoctoBitBake
Understanding BitBake
The ecosystem around BitBake, how one build target expands into a dependency tree, and the task lifecycle behind every recipe.
Yocto is not a single program
Another important concept is that Yocto is an ecosystem rather than one executable.
Several components work together.
The most important concepts are:
Almost everything you edit lives in metadata, which is why a change to a recipe can be reviewed like code.
Let’s look at these individually.
BitBake
BitBake is the task execution engine used by Yocto.
It reads recipes and configuration files and determines what needs to be built.
For example:
A recipe is a dependency list: everything the image contains is declared here, nothing is copied in by hand.
This tells BitBake to build the core-image-minimal image.
BitBake then determines the dependencies required to create that image.
BitBake builds the required components in the correct order.
Understanding the build process
One of the most useful things to understand is what happens internally.
A simplified recipe lifecycle looks like:
Every task is cached and skippable, which is why a second build only re-runs what actually changed.
Finally, packages can be combined into a root filesystem.
For example:
One recipe walks this path, and its output ends up inside the root filesystem of the final image.
Understanding this sequence is extremely useful when debugging Yocto.