Compile The Cortex-M0 Power Management Firmware; Compile The Atf - Cherry PUMA SOM-RK3399-Q7 User Manual

Powerful system-on-module for versatile applications featuring the rockchip rk3399 application processor
Hide thumbs Also See for PUMA SOM-RK3399-Q7:
Table of Contents

Advertisement

4.2.2 ARMv8-A Compiler
The Linaro aarch64-linux-gnu toolchain is suitable for compiling all other parts of the BSP. It is also suitable
for compiling user-space applications. You can download ready-to-use binaries from Linaro: https://releases.
linaro.org/components/toolchain/binaries/6.3-2017.02/aarch64-linux-gnu/ .
Direct link to the file:
https://releases.linaro.org/components/toolchain/binaries/6.3-2017.02/aarch64-linux-gnu/gcc-linaro-6.3.
1-2017.02-x86_64_aarch64-linux-gnu.tar.xz
Extract the tar.xz archive to /opt:
sudo tar -xf gcc-linaro-6.3.1-2017.02-x86_64_aarch64-linux-gnu.tar.xz -C /opt

4.3 Compile the Cortex-M0 power management firmware

The Cortex-M0 firmware runs inside a microcontroller embedded in the CPU IC. It implements
power-management functionality and helpers (e.g. DRAM frequency switching support).
Set up environment variables to make use of the ARMv6-M compiler, then download the source code and com-
pile:
export ARCH=arm64
export
CROSS_COMPILE=/opt/gcc-arm-none-eabi-6-2017-q1-update/bin/arm-none-eabi-
git clone https://git.embedded.cherry.de/rk3399-cortex-m0.git
cd rk3399-cortex-m0
make
cd
..
4.3.1 Optional: Compile the cross-compiler
As an alternative to using a ready-made compiler, the firmware repository has a mechanism to compile the
ARMv6-M-compiler as a part of the build process. This is called "internal toolchain".
If you want to use the internal toolchain instead you will also need the following packages:
sudo apt install libssl-dev autoconf gperf bison flex texinfo help2man gawk libncurses5-dev
Then to use the internal toolchain, specify "USE_INTERNAL_TOOLCHAIN=1" as part of your invocation to make.:
make
USE_INTERNAL_TOOLCHAIN=1

4.4 Compile the ATF

Download the source code and compile using:
export
CROSS_COMPILE=/opt/gcc-linaro-6.3.1-2017.02-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-
git clone https://git.embedded.cherry.de/arm-trusted-firmware.git
cd arm-trusted-firmware
make PLAT=rk3399 bl31
cd
..
v1.6
Page 20

Advertisement

Table of Contents
loading

Table of Contents