To build a single package, an image for the target or a toolchain, Yocto uses
bitbake command. Before you can use it, you must set up your build
init-env. See Setting up and using the build
Building a single recipe
To build a single recipe use:
To list all available recipes run:
Demand of Resources
Please note, that building from scratch can take a long time (several
hours!) and needs a lot of disk space and RAM! Especially when you build
images with large libraries like Qt. To build as much as possible even when
a recipe fails you can use the
-k option for bitbake.
Building an image
The Kontron BSP provides three basic images:
- image-ktn-minimal is a minimal image which simply boots the hardware
- image-ktn is a basic console image with utilities for debugging, package-manager and SSH access.
- image-ktn-qt is a image with Qt5/EGLFS support with demo applications.
For information on which image is dedicated to your board, consult your platform and board documentation by selecting a platform/BSP in the top navigation dropdown menu.
To build, for example, the image-ktn type
bitbake image-ktn -k
and wait until Yocto finished its work. You can find the image files in the
tmp/deploy/images/<yourmachine> directory of your build repository.
Depending on the platform, before building an image, you might have to read
and accept the EULA document. Else the build will fail!
See a freshly generated
local.conf where to find the license documents and
how to accept them for your board (e.g. set
ACCEPT_EULA_stm32mp-t1000-s-multi = "1" in
After you have built your image successfully, you now can go on to boot this image on your machine. For further guidance on this go the documentation of your specific platform.
Building the SDK for your image
After you have built your image, it is possible to build a SDK which fits your machine and image contents. For the Kontron Eval-Kits there are already precompiled SDKs. See Prebuilt BSP Releases for more info.
To create an installer for the toolchain of your board and image combination type:
bitbake <image-recipe> -c populate_sdk
bitbake image-ktn -c populate_sdk
For Qt5 development there is a special recipe which contains the tools needed for Qt5 development:
Two Different Toolchains/SDKs
image-ktn-qt are two toolchains with a little
meta-toolchain-qt5is one choice when you want to develop a GUI application based on the Qt framweork. This toolchain contains the biggest set of Qt extensions, but no additional libraries of your image. It contains the full set of Qt development tools.
image-*toolchain fits exactly to your image configuration. This toolchain contains, besides the Qt extensions, all libraries included into your image. This toolchain is the best choice if you create an application which needs special libraries which are only part of your image.
After you created the toolchain-installer with Yocto, you can find it in the
The installer is a shell-script, that can be executed like this:
The default installation path is
/opt/kontron/ if not specified otherwise.