-
Notifications
You must be signed in to change notification settings - Fork 0
Yocto Layer for Odin Control
The Yocto recipe layer is a directory that specifies how the application-specific code should be baked into the Linux image. The is combined with general layers for the hardware provided by the vendor, as well as additional layers for supporting the LOKI infrastructure. In a typical LOKI application repository, this layer is used to create recipe derived from an odin-control base recipe to install the custom adapter into the image such that resources end up in a predictable place, and everything is executed automatically.
A good example of how this can work is in the BabyD repository.
- Create the parent directories from your project root. The name
meta-<project>is just a convention, but the other directories and files must have the same names to overlay properly.
mkdir meta-<project>
mkdir meta-<project>/conf
mkdir meta-<project>/recipes-apps
touch meta-<project>/petalinuxbsp.conf
touch meta-<project>/user-rootfsconfig
touch meta-<project>/layer.conf- Edit the main config file.
layer.confdescribes the contents of this layer as well as how it overlays. These settings should work fine, but remember to replace "" with whatever your project's name is.
# layer.conf
# We have a conf and classes directory, add to BBPATH
BBPATH .= ":${LAYERDIR}"
# We have recipes-* directories, add to BBFILES
BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
${LAYERDIR}/recipes-*/*/*.bbappend"
BBFILE_COLLECTIONS += "<project>"
BBFILE_PATTERN_<project> = "^${LAYERDIR}/"
BBFILE_PRIORITY_<project> = "9"
LAYERVERSION_<project> = "1"
LAYERSERIES_COMPAT_<project> = "zeus"-
Create an odin-detector recipe instance (see external guide)
-
Add the recipe name to the
layer.confso that it will always be brought into the Linux image without being a dependency.
IMAGE_INSTALL_APPENDS = " <project>-detector"- Update your repository environment file to include the location of the new user layer (see Repository Configuration Files for more information). In
repo.env:
yocto_user_layer_0=$(shell pwd)/meta-<project>