A.3. Kernel Build File Hierarchy

Upstream storage of all the available kernel source code is one thing, while representing and using the code on your host development system is another. Conceptually, you can think of the kernel source repositories as all the source files necessary for all the supported Yocto Linux kernels. As a developer, you are just interested in the source files for the kernel on which you are working. And, furthermore, you need them available on your host system.

Kernel source code is available on your host system several different ways:

The temporary kernel source files resulting from a build using BitBake have a particular hierarchy. When you build the kernel on your development system, all files needed for the build are taken from the source repositories pointed to by the SRC_URI variable and gathered in a temporary work area where they are subsequently used to create the unique kernel. Thus, in a sense, the process constructs a local source tree specific to your kernel from which to generate the new kernel image.

The following figure shows the temporary file structure created on your host system when you build the kernel using Bitbake. This Build Directory contains all the source files used during the build.

Again, for additional information on the Yocto Project kernel's architecture and its branching strategy, see the "Yocto Linux Kernel Architecture and Branching Strategies" section. You can also reference the "Using devtool to Patch the Kernel" and "Using Traditional Kernel Development to Patch the Kernel" sections for detailed example that modifies the kernel.