Debian Image Guide; Prepare The Host Pc; Compile The Atf - Cherry Theobroma PX30-mQ7 User Manual

System-on-module quad-core arm cortex-a35
Hide thumbs Also See for Theobroma PX30-mQ7:
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.theobroma-systems.com/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
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=""
# Fix for aarch64-linux-gnu-ld 2.39+ and TF-A prior to v2.9
# Fix available in commit 1f49db5f25cd ("feat(build): add support for new binutils versions")
if
"${ CROSS_COMPILE}
ld"
TF_LDFLAGS="-z noexecstack --no-warn-rwx-segments"
v1.2.0-1-g5ccabb6
Page 20
--abbrev=0
--match
--no-warn-rwx-segments -v >/dev/null 2>&1;
"v*")
then
\
(continues on next page)

Advertisement

Table of Contents
loading

Table of Contents