1. 查询可用的Layers
Yocto 提供了很多现成的layer,可以在Layer 索引中查询可用的layer。
OpenEmbedded Layer Index - layers
本节示例添加一个meta-intel的layer, 其对应的git 地址为:git://git.yoctoproject.org/meta-intel
2. 添加一个Layer
我们现在开始准备添加这个meta-intel的layer。
首先初始化poky的环境变量,使得bitbake 命令可用。
$ cd poky
$ source oe-init-build-env
### Shell environment set up for builds. ###
You can now run 'bitbake <target>'
Common targets are:
core-image-minimal
core-image-full-cmdline
core-image-sato
core-image-weston
meta-toolchain
meta-ide-support
You can also run generated qemu images with a command like 'runqemu qemux86-64'.
Other commonly useful commands are:
- 'devtool' and 'recipetool' handle common recipe tasks
- 'bitbake-layers' handles common layer tasks
- 'oe-pkgdata-util' handles common target package tasks
用bitbake-layers 查看当前的layer,当前有3个layers。
$ bitbake-layers --help
NOTE: Starting bitbake server...
usage: bitbake-layers [-d] [-q] [-F] [--color COLOR] [-h] <subcommand> ...
BitBake layers utility
optional arguments:
-d, --debug Enable debug output
-q, --quiet Print only errors
-F, --force Force add without recipe parse verification
--color COLOR Colorize output (where COLOR is auto, always, never)
-h, --help show this help message and exit
subcommands:
<subcommand>
show-layers show current configured layers.
show-overlayed list overlayed recipes (where the same recipe exists in another layer)
show-recipes list available recipes, showing the layer they are provided by
show-appends list