Building a target image
Poky provides several predesigned image recipes that we can use to build our own binary image. We can check the list of available images running the following command from the poky
directory:
$: ls meta*/recipes*/images/*.bb
All the recipes provide images which are, in essence, a set of unpacked and configured packages, generating a filesystem that we can use on an actual hardware.
Next, we can see a short description of available images, as follows:
build-appliance-image
: This is a virtual machine image which can be run by either VMware Player or VMware Workstation that allows to run builds.core-image-full-cmdline
: This is a console-only image with full support for the target device hardware.core-image-minimal
: This is a small image allowing a device to boot, and it is very useful for kernel and boot loader tests and development.core-image-minimal-dev
: This image includes all contents of thecore-image-minimal
image and adds headers and libraries that we can use in a host development environment.core-image-minimal-initramfs
: Thiscore-image-minimal
image is used for minimal RAM-based initial root filesystem (initramfs
) and as a part of the kernel.core-image-minimal-mtdutils
: This is acore-image-minimal
image that has support for the MTD utilities for use with flash devices.core-image-full-cmdline
: This is a console-only image with more full-featured Linux system functionalities installed.core-image-lsb
: This is an image that conforms to the Linux Standard Base (LSB) specification.core-image-lsb-dev
: This is acore-image-lsb
image that is suitable for development work using the host, since it includes headers and libraries that we can use in a host development environment.core-image-lsb-sdk
: This is acore-image-lsb
image that includes a complete standalone SDK. This image is suitable for development using the target.core-image-clutter
: This is an image with clutter support that enables development of rich and animated graphical user interfaces.core-image-directfb
: This is an image that uses DirectFB instead of X11.core-image-weston
: This is an image that provides the Wayland protocol libraries and the reference Weston compositor.core-image-x11
: This is a very basic X11 image with a terminal.qt4e-demo-image
: This is an image that launches into the Qt Demo application for the embedded (not based on X11) version of Qt.core-image-rt
: This is acore-image-minimal
image plus a real-time test suite and tool appropriate for real-time use.core-image-rt-sdk
: This is acore-image-rt
image that includes a complete standalone SDK and is suitable for development using the target.core-image-sato
: This is an image with Sato support and a mobile environment for mobile devices that use X11; it provides applications such as a terminal, editor, file manager, media player, and so forth.core-image-sato-dev
: This is acore-image-sato
image that includes libraries needed to build applications on the device itself, testing and profiling tools and debugging symbols.core-image-sato-sdk
: This is acore-image-sato
image that includes a complete standalone SDK and is suitable for development using the target.core-image-multilib-example
: This is an example image that includes a lib32 version of Bash, otherwise it is a standard Sato image.
The up-to-date image list can be seen in the Yocto Project Reference Manual.
The process of building an image for a target is very simple. We must run the following command:
$: bitbake <recipe name>
For example, to build core-image-full-cmdline
, run the following command:
$: bitbake core-image-full-cmdline
Note
We will use MACHINE = "qemuarm"
in the following examples. It should be set in build/conf/local.conf
accordingly.