Introduction to Yocto/OpenEmbedded

yocto and OpenEmbedded provide the tools necessary to create small customised linux distributions aimed at embedded systems.

yocto, OpenEmbedded, bitbake and poky

When dealing with this ecosystem there are a number of terms to be aware of:

OpenEmbedded maintains a build environment and cross-compile environment to build linux. The yocto project uses OpenEmbedded to provide a framework to create repeatable custom linux distributions and images. Yocto includes a reference distribution called poky as a starting point for customisation. Poky encompasses everything needed to boot to a shell prompt and most of the typical posix command line tools (as provided by busybox). The build system used by yocto (from OpenEmbedded) is called bitbake. Bitbake uses the notions of recipes organised into layers to organise its builds.

bitbake

Bitbake is the build system used by yocto and OpenEmbedded.

Recipes

Rather than defining all parts of the build in a single file (like make or cmake), bitbake separates each component that needs to be built into its own file. This file is that component's recipe. Each recipe can either provide one or more packages (for example, libraries will often provide a lib and lib-dev package), or modify an existing recipe. The latter is useful when the package you want to modify is not under your control. Whether a file represents a new recipe or changes to an existing one is controlled by its file extension: files for new recipes end in .bb while those modifying existing recipes end in .bbappend.

Check the Recipes page for more information.

Layers

Groups of recipes that belong together are grouped into layers. For example meta-ost is the layer that contains all the things we need in our images. Some repositories are named after layers. They typically contain a collection of associated layers. meta-openembedded is such a collection. It contains various programs split into layers such as meta-connectivity and meta-python. Note that in such cases you need to add each layer in the repository separately (e.g. meta-openembedded/meta-connectivity rather than meta-openembedded). See also: Setting up the Build Environment

Check the Layer page for more information.

BSP

The BSP (board support package) is just a layer that provides a bootloader and kernel specific to the hardware that the BSP is for.

Machines

Machines are bitbake's way of managing harware specific settings. Machines are defined in <layer-name>/conf/machine/<machine-name>.conf. This is the place to set machine specific configurations such as the kernel provider.

See also: Layers

Kernel Development