Debian Image Guide; Prepare The Host Pc; Compile The Atf - Cherry RINGNECK SOM-PX30-uQ7 User Manual

Power efficient system-on-module with quad-core arm featuring the rockchip px30 application processor
Table of Contents

Advertisement

5 Debian image guide

As opposed to Yocto, Debian does not provide a completely integrated build experience by itself. Linux kernel
and U-Boot have to be compiled manually and copied to the appropriate directory to be picked up by Debian
build system.
This chapter will go through all neccessary steps, finally building a complete image using the debos Debian
image builder. The result will be a fully-functional Debian system.
Alternatively, prebuilt images can be downloaded from https://downloads.embedded.cherry.de/ringneck/.
At the time of writing this document, the following Debian image variants are available for the Ringneck board:
• Debian 11 Bullseye (stable),
• Debian 12 Bookworm (testing) with Phosh graphical shell.
Note:
While Debian is a great tool for fast prototyping of your product, it is highly recommended to use a
distribution/image tailored to your need. This can be achieved by Yocto (Section 6 Building a Yocto image) or
Buildroot for example.

5.1 Prepare the host PC

The debos Debian OS Builder is only available for Debian and Debian-based distributions (like Ubuntu). This
chapter assumes you use Debian or a Debian-based distribution as the host PC.
Install packages for compiling the parts and the complete image:
sudo apt-get -y install debos git build-essential gcc-aarch64-linux-gnu make bison bc flex
libssl-dev device-tree-compiler python3-dev python3-pkg-resources swig fdisk bmap-tools
As debos internally uses kvm virtualization, your user must be a member of the kvm group:
sudo adduser $(id -un) kvm
Log out and back for the change to take affect. Then verify that kvm is listed in your groups:
id
-Gn

5.2 Compile the ATF

Get the source code and compile the Arm Trusted Firmware as follows:
# Set up cross-compilation
export
ARCH=arm64
export
CROSS_COMPILE=aarch64-linux-gnu-
# Download the source code
git clone https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git
cd
trusted-firmware-a
# Use most recent release
LAST_ANNOTATED_V_TAG=$(git describe
git checkout
"$LAST_ANNOTATED_V_TAG"
TF_LDFLAGS=""
v1.3.1
Page 20
--abbrev=0
--match
"v*")
\
(continues on next page)

Advertisement

Table of Contents
loading

Table of Contents