Yocto Notes

Devtool

Patch Refresh

devtool modify <recipe>
devtool finish --force-patch-refresh <recipe> <layer_path>

The Build System

Dumping BitBakeā€™s environment

bitbake -e | grep -w DISTRO_FEATURES

Locate Source Directory of specific recipe

bitbake -e busybox | grep ^S=
bitbake -e <target> | grep ^WORKDIR

Using the Development Shell

bitbake -c devshell <target> 

If you are working in a non-graphical env you may need to specify screen as your terminal in your conf/local.conf

OE_TERMINAL = "screen"

List all the task for a given recipe

bitbake -c listtasks <target>

Force a build

bitbake -f <target>

Force-run specific task

bitbake -c compile -f <target>

Looking at dependencies

Show versions of packages

bitbake --show-versions

Use verbose option to see pulled-in dependencies

bitbake -v <target>

Create DOT format

bitbake -g <target>

Show dependencies of specific target

bitbake -g <target> -I glibc

The above will create three files: * package-depends.dot: deps between runtime targets * pn-depends.dot: deps between recipes * task-depends.dot: deps between tasks

You can either use dot command to create a graph or you use the Dependency Explorer:

bitbake -g -u depexp <target>

Raspberry Pi build

mkdir sources
cd sources
git clone  --branch thud git://git.yoctoproject.org/poky
git clone  --branch thud git://git.yoctoproject.org/meta-raspberrypi
git clone  --branch thud https://github.com/openembedded/meta-openembedded.git
cd ..
source sources/poky/oe-init-build-env build
bitbake-layers add-layer ../sources/meta-openembedded/meta-oe
bitbake-layers add-layer ../sources/meta-openembedded/meta-python
bitbake-layers add-layer ../sources/meta-raspberrypi
MACHINE=raspberrypi3 bitbake <image>
MACHINE=raspberrypi3 bitbake core-image-sato