Building Images

Setup Build Directory

We provide a script,, that simplifies the setup for our machines. To use the script, the name of the specific machine to be built for needs to be specified as well as the desired distro. The script sets up a directory and the configuration files for the specified machine and distro. It also adds our layers to the bblayers.conf file.

There are different configurations you can choose from.

  • Ka-Ro DISTRO configurations
DISTRO= Description
karo-minimal Ka-Ro Linux Distro with minimal read-only rootfs
karo-wayland Ka-Ro Linux Distro with wayland backend
karo-xwayland Ka-Ro Linux Distro with xwayland backend
  • A list of supported MACHINE configurations
MACHINE= Description Supported Baseboards Display Support Camera Support
qs8m-mq00 QS8M-MQ00 i.MX8M Mini Solder-in Module QSBASE 2, QSBASE4 Raspi Display, 10 inch display**, RGB Displays** Raspi Camera (Sony IMX 219)
qs8m-nd00 QS8M-MQ00 i.MX8M Nano Solder-in Module QSBASE 2, QSBASE4 Raspi Display, 10 inch display**, RGB Displays** Raspi Camera (Sony IMX 219)*
qsxm-mm60 QSXM-MM60 i.MX8M Mini Solder-in Module QSBASE 3, QSBASE4 Raspi Display, 10 inch display**, RGB Displays** Basler daA2500-60mci
qsxp-ml81 QSXP-ML81 i.MX8M Plus Solder-in Module QSBASE 3, QSBASE4 Raspi Display, 10 inch display**, RGB Displays** Basler daA3840-30mc
tx8m-1610 TX8M-1610 i.MX8M Mini CoM MIPI-MB, MB7 10 inch display  
tx8m-1620 TX8M-1620 i.MX8M Mini CoM LVDS-MB, MB7 10 inch display, MB7-RGB Display  
tx8m-nd00 TX8M-ND00 i.MX8M Nano CoM MIPI-MB, MB7 10 inch display  
tx8p-ml81 TX8P-ML81 i.MX8M Plus CoM LVDS-MB, MB7 10 inch display, MB7-RGB Display  
* = Experimental
** = Additional Hardware Required
Detailed Display Information at Display Guide


Before setting up your build-directory, read to the Starting Build section to see which distro you might need.

Use this command to setup your build directory (specify the distro you want to use, the machine, and the build directory):

  • General Example:
DISTRO=<distro> MACHINE=<machine> source -b <build-dir>

When the script has run, your current directory changes to the <build-dir> you chose before.

  • Specific Example (e.g. TX8M-1610):
DISTRO=karo-minimal MACHINE=tx8m-1610 source -b build-tx8m-1610
  • Returning to existing build:

You can return to an already setup build directory by running:

source setup-environment <build-dir>


To enable different features for your build you can modify the conf/local.conf file inside your build-directory.


Machine Supported Baseboards
  • QS8M
  • qsbase2
  • qsbase4
  • QSXM
  • QSXP
  • qsbase3
  • qsbase4
  • TX8M-1610
  • mipi-mb
  • mb7
  • TX8M-1620
  • TX8P-ML81
  • TX8P-ML82
  • lvds-mb
  • mb7

To set the KARO_BASEBOARD variable, modify your conf/local.conf:

KARO_BASEBOARD = "baseboard"


For Qsbase3 baseboard there is WiFi and BT support with a Laird WiFi Module.

To enable add the following line to your conf/local.conf.

WiFi Only

DISTRO_FEATURES_append = " wifi"

WiFi and Bluetooth

DISTRO_FEATURES_append = " bluetooth wifi"


For Bluetooth with the Laird WiFi module it is mandatory to have the WiFi firmware loaded!


How to use WiFi / BT is documented in WiFi/BT Guide.

Raspi Camera

For QS8M on Qsbase2 there is Raspi Camera (Sony IMX 219) support.

To enable add the following line to your conf/local.conf.

DISTRO_FEATURES_append = " imx219"


How to use Camera is documented in Camera Guide.

Basler Camera

QSXP and QSXM support a Basler camera.

To build a Yocto Image supporting Basler camera see the Basler Camera section.

Build the Image


The setup-environment provided by the BSP already sets up a SSTATE CACHE to speedup the build process.
For more about sstate caches see Enable sstate cache 1.

Build the image with the following command inside your <build-dir>:

bitbake <image>

Here are the different images you can build:

Image Description DISTRO= (required) Provided by layer
Official Ka-Ro images
karo-image-minimal Image with minimal read-only rootfs karo-minimal meta-karo-distro
karo-image-weston Image with weston desktop karo-(x)wayland meta-karo-distro
karo-image-qt6 QT6 Image on weston desktop.
To use it wit QT-Creator see QT5.
karo-(x)wayland meta-karo-distro

Image including and supporting imx Machine-Learning demos.

See Machine Learning Guide.

karo-(x)wayland meta-karo-distro
karo-image-basler Image with Basler Camera support on weston desktop.
Also including imx Machine-Learning demos. See Basler Camera and Machine Learning Guide.
karo-xwayland meta-karo-distro
General Yocto / OE images
core-image-minimal See N/A (any) Poky
core-image-base See N/A (any) Poky
core-image-sato See N/A (any) Poky

Getting the SDK

To build the SDK of a certain image run inside your <build-dir>:

bitbake <image> -c populate_sdk


The SDK can e.g. be used for VS Code Cross-Compilation.

Image Deployment

After a build is complete, the results reside in the tmp/deploy/images sub-directory. An image is, for the most part, specific to the machine set in the environment setup. Each image build usually creates U-Boot, kernel, and an images based on the IMAGE_FSTYPES defined in the machine configuration file.

Usually created files are:

Filename Content
imx-boot-<machine>.bin-<type>-flash_tx8m U-Boot flashable binaries
Image Kernel image
modules-<machine>.tgz Kernel modules
<image>-<machine>.ext4 .ext4 RootFileSystem
<image>-<machine>.tar.bz2 tar-archived RootFileSystem
*.dtb Devicetree blob(s)
<image>/ FlashImage standalone folder
<image>/ UUU FlashImage script


To continue programming your board with these images, simply cd into the above mentioned <image> folder inside deploy folder and run:

uuu -v

For further information about uuu see UUU - Universal Update Utility.


See what you can do with Yocto built Images at NXP BSP.
If you compiled karo-image-qt6 check out QT5.