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, layers in the Yocto Project use the following well established naming convention:
meta-bsp_name
The string "meta-" is prepended to the machine or platform name, which is "bsp_name" in the above form.
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/cgit/cgit.cgi.
If you go to that interface, you will find near the bottom of the list
under "Yocto Metadata Layers" several BSP layers all of which are
supported by the Yocto Project (e.g. meta-minnow
,
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 Minnow Board BSP layer:
$ git clone git://git.yoctoproject.org/meta-minnow
For information on the BSP development workflow, see the "Developing a Board Support Package (BSP)" section in the Yocto Project Development Manual. For more information on how to set up a local copy of source files from a Git repository, see the "Getting Set Up" section also in the Yocto Project Development Manual.
The layer's base directory (meta-
) is the root
of the BSP Layer.
This root is what you add to the
bsp_name
BBLAYERS
variable in the conf/bblayers.conf
file found in the
Build Directory,
which is established after you run one of the OpenEmbedded build environment
setup scripts (i.e.
oe-init-build-env
and
oe-init-build-env-memres
).
Adding the root allows the OpenEmbedded build system to recognize the BSP
definition and from it build an image.
Here is an example:
BBLAYERS ?= " \ /usr/local/src/yocto/meta \ /usr/local/src/yocto/meta-yocto \ /usr/local/src/yocto/meta-yocto-bsp \ /usr/local/src/yocto/meta-mylayer \ " BBLAYERS_NON_REMOVABLE ?= " \ /usr/local/src/yocto/meta \ /usr/local/src/yocto/meta-yocto \ "
Some BSPs require additional layers on
top of the BSP's root layer in order to be functional.
For these cases, you also need to add those layers to the
BBLAYERS
variable in order to build the BSP.
You must also specify in the "Dependencies" section of the BSP's
README
file any requirements for additional
layers and, preferably, any
build instructions that might be contained elsewhere
in the README
file.
Some layers function as a layer to hold other BSP layers.
An example of this type of layer is the meta-intel
layer.
The meta-intel
layer contains many individual BSP layers.
For more detailed information on layers, see the "Understanding and Creating Layers" section of the Yocto Project Development Manual.