Skip to main content

Build Images

Yocto is using the bitbake tool to generate complete Linux images/distributions, that is, all needed to boot and run a Linux system. This is typically boot loader(s), Linux kernel, and root file system with selected utilities and applications.

Available Images

The recipes that have been downloaded contain many different images. The table below describe only a few of the images that are available.

Image nameDescription
ea-image-baseOnly available on branch ea-4.14.78 and later. Based on core-image-base and added packages for peripheral testing and verification. This is Embedded Artists default image and the one included in the pre-build packages on imx.embeddedartists.com.
core-image-minimalA minimal image allowing a device to boot
core-image-baseA console only image that fully supports the target device
fsl-image-mfgtool-initramfsBuild U-Boot, kernel and file system that can be used by NXP's Manufacturing tool.
meta-toolchainBuilds an installable toolchain (cross-complier)

Usually, the name of the file that defines an image contains the string image. You can search for such files using the find command. Please note that not all images follow this naming convention. The toolchain images are images that doesn't contain image in the name.

cd ~/ea-bsp/sources
find -name *image*.bb

An alternative way to find images is to use the bitbake-layers command.

bitbake-layers show-recipes | grep image

Machine Configurations

A machine configuration must be specified before a build can be started.

The table below contains the machine configurations available for Embedded Artists boards. It is also possible to find the configuration files in the directory ~/ea-bsp/sources/meta-ea/conf/machine.

MachineDescriptionSupported Release
imx6sxea-comMachine configuration for Embedded Artists iMX6 SoloX COM Board / Kitup to ea-5.15.32
imx6qea-comMachine configuration for Embedded Artists iMX6 Quad COM Board / Kitup to ea-5.15.32
imx6dlea-comMachine configuration for Embedded Artists iMX6 Quad DualLite Board / Kitup to ea-5.15.32
imx6ulea-comMachine configuration for Embedded Artists iMX6 Quad UltraLite Board / Kitup to ea-5.15.32
imx7dea-ucomMachine configuration for Embedded Artists iMX7 Dual uCOM Board / Kitup to ea-5.15.32
imx7dea-comMachine configuration for Embedded Artists iMX7 Dual COM Board / Kitup to ea-5.15.32
imx7ulpea-ucomMachine configuration for Embedded Artists iMX7ULP uCOM Board / Kitup to ea-5.10.35
imx8mqea-comMachine configuration for Embedded Artists iMX8M Quad COM Board / Kitup to ea-5.15.32
imx8mmea-ucomMachine configuration for Embedded Artists iMX8M Mini uCOM Board / Kitlatest
imx8mnea-ucomMachine configuration for Embedded Artists iMX8M Nano uCOM Board / Kitlatest
imx93ea-ucomMachine configuration for Embedded Artists iMX93 uCOM Board / Kitlatest

Initialize Build

Before starting the build, it must be initialized. In this step the build directory and local configuration files are created.

A distribution must be selected when initializing the build, see the table in section Distro Configurations below for available distributions.

In the example below the machine imx6sxea-com, the build directory build_dir and the fsl-imx-fb distribution is selected.

DISTRO=fsl-imx-fb MACHINE=imx6sxea-com source ea-setup-release.sh -b build_dir

Distro Configurations

When initializing a build a distribution is specified. Several different are supported as listed in the table below.

DISTRODescription
fsl-imx-fbLinux Frame buffer – no X11 or Wayland. This is the distribution used for iMX6 and iMX7 official builds on imx.embeddedartists.com. NOTE: Not supported by iMX8 and iMX93.
fsl-imx-x11Only X11 (X Window System) graphics.
fsl-imx-waylandWayland Weston graphics. This is the distribution used for iMX8 and iMX93 official builds on imx.embeddedartists.com.
fsl-imx-xwaylandWayland graphics and X11. X11 applications using EGL are not supported.

Starting a Build

Everything has now been setup to start the actual build. The example below shows how the ea-image-base image is being built. Please note that depending on the capabilities of your host computer building an image can take many hours.

bitbake ea-image-base

When the build has finished the images will be available in the directory specified below. Please note that this directory will be different if you are using another build directory or machine configuration.

~/ea-bsp/build_dir/tmp/deploy/images/imx6sxea-com

Go to the section Deploy Images for instructions of how to deploy images to the target hardware.

Restart a Build

If you need to restart a build in a new terminal window or after a restart of the host computer you don't need to run the ea-setup-release.sh script again. Instead, you run the setup-environment script. If you don't run the setup-environment script you won't have access to needed tools and utilities, such as bitbake.

source setup-environment build_dir

Bitbake Options

This section contains a few examples of how to use bitbake. This is by no means a complete list of all available bitbake options, but instead a list of examples that you might find useful.

Clean Build for a Specific Image/Recipe

The -c option executes a specific task for an image or recipe. In the example below a previous build of the U-Boot boot loader is cleaned.

bitbake -c cleansstate u-boot-ea

To build U-Boot after it has been cleaned just specify the image name u-boot-ea.

bitbake u-boot-ea

Kernel Configuration

If you would like to check or change the Linux kernel configuration you can start the Linux configuration tool using the option below.

bitbake -c menuconfig linux-ea

Show Yocto Layer Append Dependencies

One nice feature with Yocto is the ability to extend an already existing recipe. This is done by so called .bbappend files.

When creating your own append files it can be useful to get a list of "appends" that are considered to be active for you build.

bitbake-layers show-appends