1.3.9. Linux Kernel Configuration

You can find these files in the BSP Layer at:

     meta-bsp_root_name/recipes-kernel/linux/linux*.bbappend
     meta-bsp_root_name/recipes-kernel/linux/*.bb
            

Append files (*.bbappend) modify the main kernel recipe being used to build the image. The *.bb files would be a developer-supplied kernel recipe. This area of the BSP hierarchy can contain both these types of files, although in practice, it is likely that you would have one or the other.

For your BSP, you typically want to use an existing Yocto Project kernel recipe found in the Source Directory at meta/recipes-kernel/linux. You can append machine-specific changes to the kernel recipe by using a similarly named append file, which is located in the BSP Layer for your target device (e.g. the meta-bsp_root_name/recipes-kernel/linux directory).

Suppose you are using the linux-yocto_4.4.bb recipe to build the kernel. In other words, you have selected the kernel in your bsp_root_name.conf file by adding PREFERRED_PROVIDER and PREFERRED_VERSION statements as follows:

     PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
     PREFERRED_VERSION_linux-yocto ?= "4.4%"
            

Note

When the preferred provider is assumed by default, the PREFERRED_PROVIDER statement does not appear in the bsp_root_name.conf file.

You would use the linux-yocto_4.4.bbappend file to append specific BSP settings to the kernel, thus configuring the kernel for your particular BSP.

You can find more information on what your append file should contain in the "Creating the Append File" section in the Yocto Project Linux Kernel Development Manual.

An alternate scenario is when you create your own kernel recipe for the BSP. A good example of this is the Raspberry Pi BSP. If you examine the recipes-kernel/linux directory you see the following:

     linux-raspberrypi-dev.bb
     linux-raspberrypi.inc
     linux-raspberrypi_4.14.bb
     linux-raspberrypi_4.9.bb
            

The directory contains three kernel recipes and a common include file.