R-Car/Boards/ATF-Gen3
Introduction
This is the Wiki for the ATF on Renesas R-Car Gen3 SoCs and boards . Refer to the R-Car page for information about Renesas' R-Car SoC family.
Supported boards
As of ATF git commit 4b9d01d5b2dde5fb3e3608001e8d1b5b4546a48b, the following boards are supported:
Board | ATF build options | Update procedure |
---|---|---|
R8A7795 H3 ULCB | LSI=H3 RCAR_DRAM_SPLIT=1 RCAR_GEN3_ULCB=1 PMIC_LEVEL_MODE=0 RCAR_DRAM_LPDDR4_MEMCONF=0 SPD=opteed | Flashing firmware |
R8A7796 M3-W ULCB | LSI=M3 RCAR_DRAM_SPLIT=2 RCAR_GEN3_ULCB=1 PMIC_LEVEL_MODE=0 RCAR_DRAM_LPDDR4_MEMCONF=0 SPD=opteed | Flashing firmware |
R8A77965 M3-N ULCB | LSI=M3N RCAR_GEN3_ULCB=1 PMIC_LEVEL_MODE=0 RCAR_DRAM_LPDDR4_MEMCONF=0 SPD=opteed | Flashing firmware |
R8A7795 H3 Salvator-X/XS ES2.0+ | LSI=H3 RCAR_DRAM_SPLIT=1 RCAR_DRAM_LPDDR4_MEMCONF=0 SPD=opteed | N/A |
R8A7796 M3-W Salvator-X/XS | LSI=M3 RCAR_DRAM_SPLIT=2 SPD=opteed | N/A |
R8A77965 M3-N Salvator-X/XS | LSI=M3N SPD=opteed | N/A |
R8A77970 V3M Eagle | LSI=V3M MACHINE=eagle RCAR_DRAM_SPLIT=0 PMIC_ROHM_BD9571=0 RCAR_SYSTEM_SUSPEND=0 AVS_SETTING_ENABLE=0 SPD=none | N/A |
R8A77990 E3 Ebisu | LSI=E3 RCAR_DRAM_DDR3L_MEMCONF=0 RCAR_SA0_SIZE=0 RCAR_AVS_SETTING_ENABLE=0 SPD=opteed | N/A |
R8A77990 E3 Ebisu 4D | LSI=E3 RCAR_DRAM_DDR3L_MEMCONF=1 RCAR_SA0_SIZE=0 RCAR_AVS_SETTING_ENABLE=0 SPD=opteed | N/A |
R8A77995 D3 Draak | LSI=D3 RCAR_SA0_SIZE=0 RCAR_AVS_SETTING_ENABLE=0 RCAR_SYSTEM_SUSPEND=0 PMIC_ROHM_BD9571=0 LIFEC_DBSC_PROTECT_ENABLE=0 SPD=none | N/A |
! WARNING: R-Car R8A7795 H3 ES1.x is NOT supported!
Building ATF manually
Building ATF can be done manually by using the ATF sources.
Prerequisites
- ARM cross-compiler is mandatory to build ATF.
- mbedtls is mandatory to build ATF.
ARM cross-compiler
Debian and Ubuntu includes an ARM cross-compiler in its standard package feed. You can install it as follows:
apt-get install gcc-aarch64-linux-gnu
Other distributions likely also provide ARM cross-compilers. Consult distro-specific documentation for details.
Obtain ATF sources
The preferred method of obtaining ATF sources is through git VCS, using git protocol:
git clone https://github.com/ARM-software/arm-trusted-firmware.git
Check out the version of ATF that will be used for the build:
cd arm-trusted-firmware git checkout -b my_working_branch origin/master
ATF git hosting also provides snapshots.
Obtain mbedtls sources
The preferred method of obtaining mbedtls sources is through git VCS, using git protocol:
git clone https://github.com/ARMmbed/mbedtls.git
Check out the version of mbedtls that will be used for the build:
cd mbedtls git checkout -b my_working_branch origin/master
mbedtls git hosting also provides snapshots.
Prepare build environment
Before building ATF for R-Car Gen3 system, the following environment variables need to be configured:
export MBEDTLS_DIR="/path/to/mbedtls/" export ARCH=arm64 export CROSS_COMPILE=aarch64-linux-gnu-
The later variable must match the prefix of the Aarch64 cross-toolchain installed on your system, the example above is valid for Debian and Ubuntu,
Build ATF
Specific variables must be passed to make(1) to build ATF for a particular supported platform. There are common variables required for all R-Car Gen3 platforms and SoC/board specific ones. List of supported platforms and matching SoC/board variables is available at supported boards. Common variables are "PLAT=rcar RCAR_BL33_EXECUTION_EL=1 LOG_LEVEL=50 RCAR_DEBUG=0".
Below is an example of building the ATF for R8A7795 H3 ULCB board:
make CC=aarch64-linux-gnu-gcc bl2 bl31 rcar \ PLAT=rcar RCAR_BL33_EXECUTION_EL=1 LOG_LEVEL=50 RCAR_DEBUG=0 SPD=opteed \ LSI=H3 RCAR_DRAM_SPLIT=1 MACHINE=ulcb RCAR_GEN3_ULCB=1 PMIC_LEVEL_MODE=0 RCAR_DRAM_LPDDR4_MEMCONF=0
Flashing ATF
Each platform has a slightly different process for updating the content of the flash. The list of supported boards contains links to instructions for updating each supported board.