Building Images

Setup Build Directory

Our layer provides a setup-environment 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 graphical backend. The script sets up a directory and the configuration files for the specified machine and backend. It also adds our layer to the bblayers.conf file, and configures the sstate-cache for you.

There are different configurations you can choose from.

  • 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-x11 Ka-Ro Linux Distro with X11 support
  • Possible MACHINE configurations:

Renesas

RZ/G2L Processors
MACHINE=
qsrz-g2l0
txrz-g2l0

STM

STM32MP1 Processors
MACHINE=
qsmp-1570
qsmp-1530
qsmp-1510
txmp-1570
txmp-1530

NXP

i.MX6UL(L)
single core
Cortex A7
i.MX6S
single core
Coretex A9
i.MX6DL
dual core
Cortex A9
i.MX6Q(P)
quad core
Cortex A9
TXUL TX6S TX6U TX6Q
MACHINE= MACHINE= MACHINE= MACHINE=
txul-5010 tx6s-8034 tx6u-8030 tx6q-1030
txul-5011 tx6s-8035 tx6u-8033 tx6q-1036
txul-8013 tx6s-8134 tx6u-8130 tx6q-1130
  tx6s-8135 tx6u-8133 tx6q-8037
      tx6q-8137

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

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

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

  • Specific Example (e.g. QSMP-1570):
DISTRO=karo-minimal MACHINE=qsmp-1570 source setup-environment build-qsmp-1570
  • Returning to existing build:

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

source setup-environment <build-dir>

local.conf

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

Baseboard

Machine Supported Baseboards
QS solder-in
  • qsbase1
  • qsbase2
  • qsbase4
TX plug-in
  • mb7

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

KARO_BASEBOARD = "baseboard"

Machine Features

Machine Feature Description Default?
extmod Disables CONFIG_TRIM_UNUSED_KSYMS, neccessary for building external kernel modules No
lcd LCD display support Automatically selected by $MACHINE when supported
lvds LVDS display support Automatically selected by $MACHINE when supported
nand NAND storage support Automatically selected by $MACHINE when supported
sata SATA interface support Automatically selected by $MACHINE when supported

To expand the MACHINE_FEATURES variable to your needs, modify your conf/local.conf:

MACHINE_FEATURES_append = " item1 item2 ..."

Distro Features

Machine Feature Description Default?
bluetooth Bluetooth support No
ipv6 IPV6 support No
systemd Changes init-system to systemd, e.g. neccessary when using Debian No
wifi WiFi support No

To expand the DISTRO_FEATURES variable to your needs, modify your conf/local.conf:

DISTRO_FEATURES_append = " item1 item2 ..."

Build the Image

Note

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.

Here are (some of) the different images (and packages) that can be build:

Image Description DISTRO= (required) Provided by layer
Official Ka-Ro BSP images
karo-image-minimal Image with minimal read-only rootfs karo-minimal meta-karo-distro
karo-image-weston Image with basic weston desktop, graphics accelerated karo-wayland meta-karo-distro
karo-image-qt5 Image with basic weston desktop and QT5. To use it wit QT-Creator see QT5 karo-wayland meta-karo-distro
karo-image-x11 Image with X11 support karo-x11 meta-karo-distro
Ka-Ro packages images
u-boot-karo U-Boot flashable binary N/A (any) meta-karo
linux-karo Linux Kernel and specified .dtb files only N/A (any) meta-karo
General Yocto / OE images
core-image-minimal See here @ OpenEmbedded Layer Index N/A (any) Poky

OpenEmbedded Layer Index

OpenEmbedded Layer Index for Recipes

Examples

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

bitbake linux-karo

Build the karo-image-minimal with the following command inside your <build-dir>.

bitbake karo-image-minimal

Getting the SDK

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

bitbake <image> -c populate_sdk

Tip

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

Image Deployment

After a build is complete, the created image resides in the tmp/deploy/images/<machine> sub-directory. An image is, for the most part, specific to the machine set in the environment setup. Each image build creates different files.

The following files are created for Ka-Ro QSMP/TXMP modules when running karo-image-minimal:

Filename Content Module Type
flashlayout_*.tsv FlashLayout File for STM32CubeProgrammer eMMC
uImage-<version>-<machine> Kernel uImage any
modules-<machine>.tgz Kernel modules any
<image>-<machine>.tar.{bz2|gz} RFS (bzip2/gzip) tar any
<image>-<machine>.ext4 RFS ext4 filesystem image eMMC
<image>-<machine>.ubi RFS UBI (Unsorted Block Images) NAND
<image>-<machine>.ubifs RFS UBIFS (UBI File-System) NAND
*.dtb Device Tree Blob any

TXRZ

Tip

To continue with these images use Flashing RZ/G2L Boards or TFTP boot.

QSMP/TXMP

Tip

To continue with these images use STM32CubeProgrammer or TFTP boot.

Tip

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

TX6/TXUL

Tip

To continue with these images use MFG-Tool or TFTP boot.
UUU is actually not supported for TX6/TXUL!

Tip

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