Difference between revisions of "ATF"

From Rockchip open source Document
Jump to: navigation, search
Line 29: Line 29:
 
We can get bl31.bin when build complete.
 
We can get bl31.bin when build complete.
  
 +
 
  
 
= Install ATF =
 
= Install ATF =
Line 39: Line 40:
  
 
The ATF is load by miniloader, so it should be package to know format for minloader
 
The ATF is load by miniloader, so it should be package to know format for minloader
<pre><span style="background-color: rgb(245, 245, 245); white-space: pre-wrap;">trust_merger rk_tools/RKTRUST/RK3399TRUST.ini atf.img</span></pre>
+
<pre>trust_merger rk_tools/RKTRUST/RK3399TRUST.ini atf.img</pre>
  
 
According to the&nbsp;[http://10.10.10.12:8444/index.php?title=Partitions partitions]&nbsp;definition, write to atf.img offset 0x6000.
 
According to the&nbsp;[http://10.10.10.12:8444/index.php?title=Partitions partitions]&nbsp;definition, write to atf.img offset 0x6000.

Revision as of 05:03, 17 March 2017

Download ARM Trusted Firmware

Get the source code from github:

git clone https://github.com/ARM-software/arm-trusted-firmware.git

Supported Devices[edit]

Upstream ARM Trusted Firmware support Rockchip SoCs:

RK3399

Build ATF

Here is a mk-atf.sh script to build ATF.

$ cat mk-atf.sh 

#!/bin/bash

make realclean

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

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

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

We can get bl31.bin when build complete.

 

Install ATF

Using U-Boot SPL FIT image

Using Rockchip miniloader

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

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

trust_merger rk_tools/RKTRUST/RK3399TRUST.ini atf.img

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