1.1. BSP Layers

A BSP consists of a file structure inside a base directory. Collectively, you can think of the base directory, its file structure, and the contents as a BSP Layer. Although not a strict requirement, BSP layers in the Yocto Project use the following well-established naming convention:

     meta-bsp_root_name
        

The string "meta-" is prepended to the machine or platform name, which is bsp_root_name in the above form.

Tip

Because the BSP layer naming convention is well-established, it is advisable to follow it when creating layers. Technically speaking, a BSP layer name does not need to start with meta-. However, various scripts and tools in the Yocto Project development environment assume this convention.

To help understand the BSP layer concept, consider the BSPs that the Yocto Project supports and provides with each release. You can see the layers in the Yocto Project Source Repositories through a web interface at http://git.yoctoproject.org. If you go to that interface, you will find a list of repositories under "Yocto Metadata Layers".

Note

Layers that are no longer actively supported as part of the Yocto Project appear under the heading "Yocto Metadata Layer Archive."

Each repository is a BSP layer supported by the Yocto Project (e.g. meta-raspberrypi and meta-intel). Each of these layers is a repository unto itself and clicking on a layer reveals information that includes two links from which you can choose to set up a clone of the layer's repository on your local host system. Here is an example that clones the Raspberry Pi BSP layer:

     $ git clone git://git.yoctoproject.org/meta-raspberrypi
        

In addition to BSP layers, the meta-yocto-bsp layer is part of the shipped poky repository. The meta-yocto-bsp layer maintains several BSPs such as the Beaglebone, EdgeRouter, and generic versions of both 32-bit and 64-bit IA machines.

For information on the BSP development workflow, see the "Developing a Board Support Package (BSP)" section. For more information on how to set up a local copy of source files from a Git repository, see the "Locating Yocto Project Source Files" section in the Yocto Project Development Tasks Manual.

The layer's base directory (meta-bsp_root_name) is the root directory of the BSP Layer. This directory is what you add to the BBLAYERS variable in the conf/bblayers.conf file found in the Build Directory, which is established after you run the OpenEmbedded build environment setup script (i.e. oe-init-build-env). Adding the root directory allows the OpenEmbedded build system to recognize the BSP layer and from it build an image. Here is an example:

     BBLAYERS ?= " \
       /usr/local/src/yocto/meta \
       /usr/local/src/yocto/meta-poky \
       /usr/local/src/yocto/meta-yocto-bsp \
       /usr/local/src/yocto/meta-mylayer \
       "
        

Tip

Ordering and BBFILE_PRIORITY for the layers listed in BBLAYERS matter. For example, if multiple layers define a machine configuration, the OpenEmbedded build system uses the last layer searched given similar layer priorities. The build system works from the top-down through the layers listed in BBLAYERS.

Some BSPs require or depend on additional layers beyond the BSP's root layer in order to be functional. In this case, you need to specify these layers in the README "Dependencies" section of the BSP's root layer. Additionally, if any build instructions exist for the BSP, you must add them to the "Dependencies" section.

Some layers function as a layer to hold other BSP layers. These layers are knows as "container layers". An example of this type of layer is the meta-intel layer. This layer contains BSP layers for the Intel-core2-32 Intel® Common Core (Intel-core2-32) and the Intel-corei7-64 Intel® Common Core (Intel-corei7-64). the meta-intel layer also contains the common/ directory, which contains common content across those layers.

For more information on layers, see the "Understanding and Creating Layers" section of the Yocto Project Development Tasks Manual.