Compile ATF
===========
- > cd arm-trusted-firmware
+ > cd trusted-firmware-a
> make realclean
> make CROSS_COMPILE=aarch64-linux-gnu- PLAT=rk3399 bl31
Package the image for Rockchip miniloader(option 2)
------------------------------------------
> cd ..
- > cp arm-trusted-firmware/build/rk3399/release/bl31.elf rkbin/rk33
+ > cp trusted-firmware-a/build/rk3399/release/bl31.elf rkbin/rk33
> ./rkbin/tools/trust_merger rkbin/tools/RK3399TRUST.ini
> ./rkbin/tools/loaderimage --pack --uboot u-boot/u-boot-dtb.bin uboot.img
Quick Start / Overview
======================
- Build the ARM Trusted Firmware binary (see "ARM Trusted Firmware (ATF)" below)
- $ cd /src/arm-trusted-firmware
+ $ cd /src/trusted-firmware-a
$ make PLAT=sun50i_a64 DEBUG=1 bl31
- Build the SCP firmware binary (see "SCP firmware (Crust)" below)
$ cd /src/crust
The resulting binary is build/sun50i_a64/debug/bl31.bin. Either put the
location of this file into the BL31 environment variable or copy this to
the root of your U-Boot build directory (or create a symbolic link).
-$ export BL31=/src/arm-trusted-firmware/build/sun50i_a64/debug/bl31.bin
+$ export BL31=/src/trusted-firmware-a/build/sun50i_a64/debug/bl31.bin
(adjust the actual path accordingly)
The platform target "sun50i_a64" covers all boards with either an Allwinner
A64 or H5 SoC (since they are very similar). For boards with an Allwinner H6
- Compile ATF
=> git clone https://github.com/TrustedFirmware-A/trusted-firmware-a.git
- => cd arm-trusted-firmware
+ => cd trusted-firmware-a
(export cross compiler path for Cortex-M0 MCU likely arm-none-eabi-)
=> make realclean
=> make CROSS_COMPILE=aarch64-linux-gnu- PLAT=rk3399
(export bl31.elf)
- => export BL31=/path/to/arm-trusted-firmware/build/rk3399/release/bl31/bl31.elf
+ => export BL31=/path/to/trusted-firmware-a/build/rk3399/release/bl31/bl31.elf
- Compile PMU M0 firmware
.. code-block:: bash
- cd ~/hikey/src/arm-trusted-firmware
+ cd ~/hikey/src/trusted-firmware-a
make CROSS_COMPILE=aarch64-linux-gnu- all fip \
SCP_BL2=~/hikey/bin/mcuimage.bin \
BL33=~/hikey/bin/u-boot.bin DEBUG=1 PLAT=hikey
.. code-block:: bash
cd ~/hikey/src/l-loader
- ln -sf ~/hikey/src/arm-trusted-firmware/build/hikey/debug/bl1.bin
- ln -sf ~/hikey/src/arm-trusted-firmware/build/hikey/debug/bl2.bin
+ ln -sf ~/hikey/src/trusted-firmware-a/build/hikey/debug/bl1.bin
+ ln -sf ~/hikey/src/trusted-firmware-a/build/hikey/debug/bl2.bin
ln -sf ~/hikey/src/atf-fastboot/build/hikey/debug/bl1.bin fastboot.bin
make hikey PTABLE_LST=aosp-8g
.. code-block:: bash
- cd ~/hikey960/src/arm-trusted-firmware
+ cd ~/hikey960/src/trusted-firmware-a
make CROSS_COMPILE=aarch64-linux-gnu- all fip \
SCP_BL2=~/hikey960/bin/lpm3.img \
BL33=~/hikey960/bin/u-boot.bin DEBUG=1 PLAT=hikey960
.. code-block:: bash
cd ~/hikey960/src/l-loader
- ln -sf ~/hikey960/src/arm-trusted-firmware/build/hikey960/debug/bl1.bin
- ln -sf ~/hikey960/src/arm-trusted-firmware/build/hikey960/debug/bl2.bin
- ln -sf ~/hikey960/src/arm-trusted-firmware/build/hikey960/debug/fip.bin
+ ln -sf ~/hikey960/src/trusted-firmware-a/build/hikey960/debug/bl1.bin
+ ln -sf ~/hikey960/src/trusted-firmware-a/build/hikey960/debug/bl2.bin
+ ln -sf ~/hikey960/src/trusted-firmware-a/build/hikey960/debug/fip.bin
ln -sf ~/hikey960/bin/u-boot.bin
make hikey960 PTABLE_LST=linux-32g NS_BL1U=u-boot.bin
.. code-block:: bash
$ git clone https://github.com/TrustedFirmware-A/trusted-firmware-a.git
+ $ cd trusted-firmware-a
$ git checkout v2.5
$ make PLAT=imx8mq ARCH=aarch64 CROSS_COMPILE=aarch64-linux-gnu- bl31
$ cp build/imx8mq/release/bl31.bin $(builddir)
.. code-block:: bash
git clone --depth 1 https://github.com/TrustedFirmware-A/trusted-firmware-a.git
- cd arm-trusted-firmware
+ cd trusted-firmware-a
make realclean
make CROSS_COMPILE=aarch64-linux-gnu- PLAT=rk3399
cd ..
.. code-block:: bash
- export BL31=../arm-trusted-firmware/build/px30/release/bl31/bl31.elf
+ export BL31=../trusted-firmware-a/build/px30/release/bl31/bl31.elf
make evb-px30_defconfig
make CROSS_COMPILE=aarch64-linux-gnu-
.. code-block:: bash
- export BL31=../arm-trusted-firmware/build/rk3328/release/bl31/bl31.elf
+ export BL31=../trusted-firmware-a/build/rk3328/release/bl31/bl31.elf
make evb-rk3328_defconfig
make CROSS_COMPILE=aarch64-linux-gnu-
.. code-block:: bash
- export BL31=../arm-trusted-firmware/build/rk3368/release/bl31/bl31.elf
+ export BL31=../trusted-firmware-a/build/rk3368/release/bl31/bl31.elf
make evb-px5_defconfig
make CROSS_COMPILE=aarch64-linux-gnu-
.. code-block:: bash
- export BL31=../arm-trusted-firmware/build/rk3399/release/bl31/bl31.elf
+ export BL31=../trusted-firmware-a/build/rk3399/release/bl31/bl31.elf
make evb-rk3399_defconfig
make CROSS_COMPILE=aarch64-linux-gnu-
.. code-block:: bash
- export BL31=../arm-trusted-firmware/build/rk3568/release/bl31/bl31.elf
+ export BL31=../trusted-firmware-a/build/rk3568/release/bl31/bl31.elf
[or]export BL31=../rkbin/bin/rk35/rk3568_bl31_v1.34.elf
export ROCKCHIP_TPL=../rkbin/bin/rk35/rk3568_ddr_1560MHz_v1.13.bin
make evb-rk3568_defconfig
To run the tool::
- $ tools/binman/fip_util.py -s /path/to/arm-trusted-firmware
+ $ tools/binman/fip_util.py -s /path/to/trusted-firmware-a
Warning: UUID 'UUID_NON_TRUSTED_WORLD_KEY_CERT' is not mentioned in tbbr_config.c file
Existing code in 'tools/binman/fip_util.py' is up-to-date
"""parse_macros: Parse the firmware_image_package.h file
Args:
- srcdir (str): 'arm-trusted-firmware' source directory
+ srcdir (str): 'trusted-firmware-a' source directory
Returns:
dict:
"""parse_names: Parse the tbbr_config.c file
Args:
- srcdir (str): 'arm-trusted-firmware' source directory
+ srcdir (str): 'trusted-firmware-a' source directory
Returns:
tuple: dict of entries:
"""parse_atf_source(): Parse the ATF source tree and update this file
Args:
- srcdir (str): Path to 'arm-trusted-firmware' directory. Get this from:
+ srcdir (str): Path to 'trusted-firmware-a' directory. Get this from:
https://github.com/TrustedFirmware-A/trusted-firmware-a.git
dstfile (str): File to write new code to, if an update is needed
oldfile (str): Python source file to compare against
if not os.path.exists(readme_fname):
raise ValueError(
f"Expected file '{readme_fname}' - try using -s to specify the "
- 'arm-trusted-firmware directory')
+ 'trusted-firmware-a directory')
readme = tools.read_file(readme_fname, binary=False)
first_line = 'Trusted Firmware-A'
if readme.splitlines()[0] != first_line:
int: 0 (exit code)
"""
parser = ArgumentParser(epilog='''Creates an updated version of this code,
-with a table of FIP-entry types parsed from the arm-trusted-firmware source
+with a table of FIP-entry types parsed from the trusted-firmware-a source
directory''')
parser.add_argument(
'-D', '--debug', action='store_true',
help='Output file to write new fip_util.py file to')
parser.add_argument(
'-s', '--src', type=str, default='.',
- help='Directory containing the arm-trusted-firmware source')
+ help='Directory containing the trusted-firmware-a source')
args = parser.parse_args(argv)
if not args.debug: