Skip to main content

Build System

Hardware Requirements

  • Host System

Ubuntu or Windows (WSL2) is recommended.

  • 32GB or more RAM
  • 90GB or more available disk space
Yocto Project

Linux distributions supported by Yocto Project: Reference Link

Environment Setup

radxa@Radxa CM5 IO$
sudo apt-get update
sudo apt-get install \
build-essential chrpath cpio debianutils diffstat file gawk gcc git \
iputils-ping libacl1 lz4 locales python3 python3-git \
python3-jinja2 python3-pexpect python3-pip python3-subunit socat \
texinfo unzip wget xz-utils zstd -y

# Install repo tool
mkdir -p ~/bin
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
export PATH="$HOME/bin:$PATH"

Get Source Code

radxa@Radxa CM5 IO$
mkdir ~/yocto-rockchip-sdk && cd ~/yocto-rockchip-sdk
repo init -u https://github.com/radxa/yocto-manifests.git -b scarthgap
repo sync

Link the configuration file for Radxa CM5 IO to local.conf.

radxa@Radxa CM5 IO$
cd ~/yocto-rockchip-sdk/build/conf
ln -sf rockchip-<soc>-<board>.conf local.conf

Radxa CM5 IO link example:

ln -sf rockchip-rk3588s-radxa-cm5-io.conf local.conf

Start Build

radxa@Radxa CM5 IO$
cd ~/yocto-rockchip-sdk
source ./oe-init-build-env
bitbake core-image-minimal

After successful build, the corresponding image files for Radxa CM5 IO will be generated in the ~/yocto-rockchip-sdk/build/tmp/deploy/images/ directory.

Radxa CM5 IO build examples:

  • core-image-minimal-rockchip-rk3588s-radxa-cm5-io.rootfs.update.img
  • core-image-minimal-rockchip-rk3588s-radxa-cm5-io.rootfs.wic

The *.rootfs.update.img file is the image file for MicroSD card boot system, and the *.rootfs.wic file is the image file for eMMC boot system.

FAQ

Missing en_US.UTF-8 Language Environment

  • Please make sure locale 'en_US.UTF-8' is available on your system

If the system does not have en_US.UTF-8, you need to set it up according to the following steps:

radxa@Radxa CM5 IO$
sudo apt install locales
sudo locale-gen en_US en_US.UTF-8
sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
sudo echo "export LANG=en_US.UTF-8" >> ~/.bashrc
source ~/.bashrc

System Crash During Compilation

You can try to set the parallelism of the Yocto build system to prevent system crashes during compilation.

Add the following configuration to ln -sf rockchip-rk3588s-radxa-cm5-io.conf local.conf:

Where BB_NUMBER_THREADS is the number of threads for parallel compilation, and PARALLEL_MAKE is the Make parameters for parallel compilation, which can be adjusted according to system configuration.

Ubuntu
BB_NUMBER_THREADS = "8"
PARALLEL_MAKE = "-j 8"

Weston Build Error (Missing PAM Feature)

When building Weston, you may encounter the following error:

ERROR: weston-10.0.4-r0 do_configure: Function failed: do_configure
ERROR: Logfile of failure stored in: .../weston-10.0.4-r0/temp/log.do_configure.xxxx
ERROR: Task (.../recipes-graphics/wayland/weston_10.0.4.bb:do_configure) failed with exit code '1'

This is usually caused by missing PAM (Pluggable Authentication Modules) support. Solution:

  1. Install PAM development package:
radxa@Radxa CM5 IO$
# Ubuntu/Debian
sudo apt-get install libpam0g-dev -y
# Fedora/RHEL
sudo dnf install pam-devel -y
# Arch Linux
sudo pacman -S pam --noconfirm
  1. Add configuration in local.conf:

Add the following configuration in local.conf to enable PAM support:

Ubuntu
# Enable PAM support
DISTRO_FEATURES:append = " pam"
  1. Clean and rebuild:
radxa@Radxa CM5 IO$
cd ~/yocto-rockchip-sdk
source ./oe-init-build-env
bitbake -c cleansstate weston
bitbake core-image-minimal

    You need to be logged into GitHub to post a comment. If you are already logged in, please ignore this message.

    Radxa-docs © 2026 by Radxa Computer (Shenzhen) Co.,Ltd. is licensed under CC BY 4.0