![theobroma systems RK3399-Q7 User Manual Download Page 27](http://html.mh-extra.com/html/theobroma-systems/rk3399-q7/rk3399-q7_user-manual_1101597027.webp)
Set up environment variables to make use of the Cortex-M compiler, then download the source code and compile:
export ARCH=arm64 export CROSS_COMPILE=/opt/gcc-arm-none-eabi-6-2017-q1-update/bin/arm-none-
eabi- git clone https://git.theobroma-systems.com/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 Cortex-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
.
theobroma
-
systems
.
com
/
arm
-
trusted
-
firmware
.
git
cd arm
-
trusted
-
firmware
make PLAT
=
rk3399 bl31
cd
..
4.5 Compile U-Boot
U-Boot is used as the bootloader on the RK3399-Q7 module.
Download the source code using:
git clone https:
//
git
.
theobroma
-
systems
.
com
/
puma
-
u
-
boot
.
git
The U-Boot build process uses the files generated in the previous steps Copy the previously generated files “
rk3399m0.bin
”
from Cortex-M0 firmware and “
bl31.bin
” from the ATF to the puma-u-boot directory:
RK3399-Q7 User Manual
© Theobroma Systems Design und Consulting GmbH
Release v0.2-3-g574c114
Page
23
Summary of Contents for RK3399-Q7
Page 2: ......