From Rockchip open source Document
Revision as of 12:13, 13 July 2018 by Kever (talk | contribs)
Jump to: navigation, search

Download ARM Trusted Firmware

Rockchip ATF

Rockchip do not provide the ATF source code, you can find the ATF binaries in rkbin repository.

Upstream ATF

Get the source code from github:

git clone

Supported Devices

Upstream ARM Trusted Firmware support Rockchip SoCs:



Build ATF

Here is a script to build ATF.

$ cat 


make realclean

CFLAGS='-gdwarf-2' \
CROSS_COMPILE=aarch64-linux-gnu- \
make PLAT=rk3399 DEBUG=0 ERROR_DEPRECATED=1 bl31

Because there is a blob of code for cortex-M0 in rk3399 ATF, so you need a compiler for it. Install it by:

sudo apt-get install gcc-arm-none-eabi

We can get bl31.elf bl31.bin when build completed.

Note: The latest version ATF(including rockchip version and upstream version) bl31.elf instead of bl31.bin, the bl31.bin is not available now.

Install ATF

Using U-Boot SPL FIT image

Upstream U-Boot SPL support for ATF still WIP.

Using Rockchip miniloader

Alternatively, you can use Rockchip miniloader and U-Boot instead which do not need SPL.

The ATF is loaded by miniloader, so it should be package to know format for miniloader

trust_merger rk_tools/RKTRUST/RK3399TRUST.ini trust.img

According to the partitions definition, write to atf.img offset 0x6000.