yocto Flashcards
(12 cards)
How to enable the yocto build environment?
> source oe-init-build-env
You will be dropped in build
directory.
How to list/show existing yocto layers?
> bitbake-layers show-layers
In yocto, how to add/remove a layer?
First clone the layer inside the poky directory. Then,
> bitbake-layers add-layer ../meta-openembedded/meta-oe
This will modify the file conf/bblayers.conf
You can also modify the conf/bblayers.conf
file manually.
To remove a layer,
> bitbake-layers remove-layer meta-openembedded/meta-oe
In yocto, how to find the value of a variable?
> bitbake-getvar TOPDIR > bitbake-getvar PACKAGE_CLASSES
In yocto, which are two most important configuration files?
build/conf/bblayers.conf
This contains all layers that will be used for image building.
build/conf/local.conf
We set/modify variables here.
Name some important yocto
variables.
- TOPDIR
- DL_DIR
- DISTRO
- PACKAGE_CLASSES
- EXTRA_IMAGE_FEATURES
- RM_OLD_IMAGE
- INHERIT
bitbake-getvar TOPDIR
In yocto
what is the relationship between a layer and recipes?
A layer contains many recipes. E.g., layer poky/meta
contains many recipes in various subdirectories. E.g., subdir poky/meta/recipes-extended
containes recipes for tar, grep, wget
etc.
All recipes for a layer are contained in subdirs of that layer.
How to list recipes in yocto?
> bitbake-layers show-recipes # lists all recipes > bitbake-layers show-recipes git libxml2 # only shows info about these components.
Name some yocto image names.
> bitbake core-image-minimal > bitbake core-image-full-cmdline
How to include additional software/utilities/recipes (like python3, git etc.) in a yocto image?
First, make sure those software/utilities are available as recipes in included layers,
> bitbake-layers show-recipes git python3
If available, append following lines at the end of build/conf/local.conf file,
IMAGE_INSTALL:append = " python3" IMAGE_INSTALL:append = " git"
Now build image,
> bitbake core-image-full-cmdline
How to create a new yocto layer?
> bitbake-layers create-layer ../meta-mylayer > bitbake-layers add-layer ../meta-mylayer
What are some recipe specific yocto variables, how to find there value?
- PN (Package Name)
- PV (Package Version)
- PR (Package Revision)
- S (Source code directory)
- D (Destination directory)
- SRC_URI
- WORKDIR
You can find there value for a specific recipe (e.g., libsdl2) like this,
> bitbake -e libsdl2 | grep ^PN=