# Yocto/Openembedded

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

## meta-ntb

meta-ntb is the layer containing recipes required for various NTB projects. See meta-ntb

## Getting Started

Check out this guide to get started developing a C/C++ application using cmake and yocto.

## 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: recipes, layers and machines

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 seperates 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.

### Layers

Groups of recipes that belong together are grouped into layers. For example meta-ntb is the layer that contains all the things we need in our images. You may also find repositories named like layers that contain a collection of layers in it. 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 seperately (e.g. meta-openembedded/meta-connectivity rather than meta-openembedded). See also: Creating the Build Environment

#### 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.

## SDK's

There are essentially three ways to build on/for a yocto image:

• include the toolchain in the image and build natively (not recommended)
• SDK
• extensible SDK

See SDK's