The previous section described the user configurations that define BitBake's global behavior. This section takes a closer look at the layers the build system uses to further control the build. These layers provide Metadata for the software, machine, and policy.
In general, three types of layer input exist:
Policy Configuration: Distribution Layers provide top-level or general policies for the image or SDK being built. For example, this layer would dictate whether BitBake produces RPM or IPK packages.
Machine Configuration: Board Support Package (BSP) layers provide machine configurations. This type of information is specific to a particular target architecture.
Metadata: Software layers contain user-supplied recipe files, patches, and append files.
The following figure shows an expanded representation of the Metadata, Machine Configuration, and Policy Configuration input (layers) boxes of the general Yocto Project Development Environment figure:
In general, all layers have a similar structure.
They all contain a licensing file
(e.g. COPYING
) if the layer is to be
distributed, a README
file as good practice
and especially if the layer is to be distributed, a
configuration directory, and recipe directories.
The Yocto Project has many layers that can be used. You can see a web-interface listing of them on the Source Repositories page. The layers are shown at the bottom categorized under "Yocto Metadata Layers." These layers are fundamentally a subset of the OpenEmbedded Metadata Index, which lists all layers provided by the OpenEmbedded community.
BitBake uses the conf/bblayers.conf
file,
which is part of the user configuration, to find what layers it
should be using as part of the build.
For more information on layers, see the "Understanding and Creating Layers" section in the Yocto Project Development Tasks Manual.