yocto-public/1-concepts/layer.md

61 lines
1.3 KiB
Markdown
Raw Permalink Normal View History

2015-07-21 12:22:25 +00:00
# Layer
A layer is a bundle of configuration files.
It can contain:
- Recipes to build specific software
- Machines
- Distributions
- Classes
- Images
- ...
## Layer list
Layers are listed in `$POKY/build/conf/bblayers.conf` using __absolute__ path:
```sh
BBLAYERS = " \
/home/me/poky/meta \
/home/me/poky/meta-yocto \
/home/me/poky/meta-yocto-bsp \
/home/me/poky/build/meta-ab3000 \
"
```
<info data-markdown>
The layer can be in another directory than under `$POKY`.
</info>
<warn data-markdown>
Don't forget to add any newly created layer in this list to use it
</warn>
Generally this folder is versioned (with git).
The layers shipped with Yocto are in `$POKY/meta*`.
## Layer configuration
_Minimal configuration:_
```sh
BBPATH .= ":${LAYERDIR}"
BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
${LAYERDIR}/recipes-*/*/*.bbappend"
BBFILE_COLLECTIONS += "ab3000"
BBFILE_PATTERN_ab3000 = "^${LAYERDIR}/"
BBFILE_PRIORITY_ab3000 = "6"
```
Variable|Use
---|---
`BBFILES`|Where to search for recipes & recipe append files (ie `recipes-group/recipename/recipename.bb`)
`BBFILE_COLLECTIONS`|Layer name. Will be used to get/set variables only for this layer (ie `VAR_ab3000`)
[More about layers](http://www.yoctoproject.org/docs/1.7.1/dev-manual/dev-manual.html#understanding-and-creating-layers)