Trusted Firmware for Cortex-A (TF-A) is an implementation of EL3 secure firmware. TF-A replaces PPA in secure firmware role.
In LS2088ARDB, Boot option switching between parallel NOR boot and QSPI NOR boot cannot be performed using commands. Boot option switching can be done by adjusting DIP switch settings and jumper settings on the Reference Design Board. For details, see Layerscape Software Development Kit User Guide.
To migrate to the TF-A boot flow from the previous boot flow (with PPA), you need to compile the TF-A binaries, bl2_<boot_mode>.pbl and fip.bin, and flash these binaries on the specific boot medium on the board.
For QSPI NOR flash boot, you need to compile the following TF-A binaries.
| TF-A binary name | Components |
|---|---|
bl2_qspi.pbl |
|
fip.bin |
|
Follow these steps to compile and deploy TF-A binaries (bl2_qspi.pbl and fip.bin) in QSPI NOR flash.
You need to compile the rcw_2000_qspi.bin binary to build the bl2_qspi.pbl binary.
Clone the rcw repository and compile the PBL binary.
The compiled PBL binary for QSPI NOR flash on LS2088ARDB, rcw_2000_qspi.bin, is available at rcw/ls2088ardb/FFFFFFFF_PP_HH_0x2a_0x41
See the rcw/ls2088ardb/README file for an explanation of the naming convention for the directories that contain the RCW source and binary files.You need to compile the u-boot.bin binary to build the fip.bin binary.
Clone the u-boot repository and compile the U-Boot binary for TF-A.
If the make command shows the error "*** Your GCC is older than 6.0 and is not supported", ensure that you are using Ubuntu 18.04 64-bit version for building LSDK 18.12 and onwards U-Boot binary.
The compiled U-Boot image, u-boot.bin, is available at u-boot/.
You need to compile the tee.bin binary to build fip.bin with OPTEE. However, OPTEE is optional, you can skip the procedure to compile OPTEE if you want to build the FIP binary without OPTEE.
Clone the optee_os repository and build the OPTEE binary.
The compiled OPTEE image, tee.bin, is available at optee_os/out/arm-plat-ls/core/.
Clone the atf repository and compile the TF-A binaries, bl2_qspi.pbl and fip.bin.
The compiled BL2 binaries, bl2.bin and bl2_qspi.pbl are available at atf/build/ls2088ardb/release/.
For any update in the BL2 source code or RCW binary, the bl2_qspi.pbl binary needs to be recompiled.To compile the BL2 binary without OPTEE:
make PLAT=ls2088ardb bl2 BOOT_MODE=qspi pbl RCW=<path_to_rcw_binary>/rcw_2000_qspi.bin
The compiled BL31 and FIP binaries, bl31.bin, fip.bin, are available at atf/build/ls2088ardb/release/.
For any update in the BL31, BL32, or BL33 binaries, the fip.bin binary needs to be recompiled.To compile the FIP binary without OPTEE and without trusted board boot:
make PLAT=ls2088ardb fip BOOT_MODE=sd BL33=<path_to_u-boot_binary>/u-boot.bin
To compile the FIP binary with trusted board boot, refer the read me at <atf repository>/plat/nxp/README.TRUSTED_BOOT
For LS2088ARDB, in boot log, you'll see:
Board: LS2088AE Rev1.1-RDB, Board Arch: V0, Board version: A, boot from vBank: 0
TF-A binaries can be loaded to LS2088ARDB from a TFTP server or from a mass storage device (SD, USB, or SATA).
When board boots up, U-Boot prints a list of enabled Ethernet interfaces.
DPMAC1@xgmii, DPMAC2@xgmii, DPMAC3@xgmii, DPMAC4@xgmii, DPMAC5@xgmii, DPMAC6@xgmii, DPMAC7@xgmii, DPMAC8@xgmii
=> setenv serverip <ipaddress1>
Set ethact and ethprime as the ethernet interface connected to the TFTP server.
See LS2088ARDB Ethernet port mapping for the mapping of Ethernet port names appearing on the chassis front panel with the port names in U-Boot and Linux.
=> setenv ethprime <name of interface connected to TFTP server>
For example:
=> setenv ethprime DPMAC3@xgmii
=> setenv ethact <name of interface connected to TFTP server>
For example:
=> setenv ethact DPMAC3@xgmii
Static IP address assignment:
=> setenv ipaddr <ipaddress2>
=> setenv netmask <subnet mask>
=> setenv gatewayip <gateway addr>
Dynamic IP address assignment:
=> dhcp
=> ping $serverip
Using DPMAC3@xgmii device
host 192.168.1.1 is alive
For details about the flash image layout for TF-A binaries, refer LSDK memory layout for TF-A boot flow.
Flash bl2_qspi.pbl:
=> tftp 0xa0000000 bl2_qspi.pbl
=> sf erase 0x0 +$filesize && sf write 0xa0000000 0x0 $filesize
LS2088ARDB will boot with TF-A. In the boot log, you will see:
=> NOTICE: UDIMM 18ASF1G72AZ-2G3B1
NOTICE: 16 GB DDR4, 64-bit, CL=15, ECC on, 256B, CS0+CS1
NOTICE: UDIMM 18ASF1G72AZ-2G3B1
NOTICE: 4 GB DDR4, 32-bit, CL=11, ECC on, CS0+CS1
NOTICE: BL2: v1.5(release):LSDK-19.09
NOTICE: BL2: Built : 15:19:13, Nov 11 2019
NOTICE: BL31: v1.5(release):LSDK-19.09
NOTICE: BL31: Built : 15:21:14, Nov 11 2019
NOTICE: Welcome to LS2088 BL31 PhaseU-Boot 2019.04 (Nov 11 2019 - 15:12:53 +0530)
SoC: LS2088AE Rev1.1 (0x87090011)
Clock Configuration:
CPU0(A72):2000 MHz CPU1(A72):2000 MHz CPU2(A72):2000 MHz
CPU3(A72):2000 MHz CPU4(A72):2000 MHz CPU5(A72):2000 MHz
CPU6(A72):2000 MHz CPU7(A72):2000 MHz
Bus: 800 MHz DDR: 2133.333 MT/s DP-DDR: 1600 MT/s
Reset Configuration Word (RCW):
00000000: 503040c0 50500050 00000000 00000000
00000010: 00000000 00000000 00a00000 00000000
00000020: 01e01180 00002581 00000000 00000000
00000030: 00400c0b 00000000 00000000 00000000
00000040: 00000000 00000000 00000000 00000000
00000050: 00000000 00000000 00000000 00000000
00000060: 00000000 00000000 00027000 00000000
00000070: 412a0000 00040000
Model: Freescale Layerscape 2080a RDB Board
Board: LS2088AE Rev1.1-RDB, Board Arch: V0, Board version: A, boot from vBank: 0
=> mmc rescan=> mmc infoOr
=> usb start => usb info
Or
=> scsi scan
=> scsi info
=> ls mmc <device:partition>
For example:
=> ls mmc 0:2
Or
=> ls usb <device:partition>
For example:
=> ls usb 0:1
Or
=> ls scsi <device:partition>
For example:
=> ls scsi 0:2
If the ls command fails to run, check that U-Boot in QSPI NOR flash supports the command by typing ls at the U-Boot prompt:
=> ls ls - Lists files in a directory (default)
Usage: ls <interface> [<dev[:part]> [directory]] - Lists files in directory [directory] of partition [part] on device type [interface] and instance [dev].
If U-Boot does not support this command, then update the composite firmware image in QSPI NOR flash.
For steps to update composite firmware image in QSPI NOR flash, see Layerscape Software Development Kit User Guide .
Use the following command if the SD card is formatted/created using LSDK flex-installer command:
=> load <interface> [<dev[:part]> [<addr> [<filename> [bytes [pos]]]]] For example:
=> load mmc 0:2 $load_addr bl2_qspi.pbl Use the following command if the SD card is formatted/created on a Windows PC:
=> fatload <interface> [<dev[:part]> [<addr> [<filename> [bytes [pos]]]]] For example:
=> fatload mmc 0:2 $load_addr bl2_qspi.pbl Use the following command if the SD card is formatted/created on a Linux PC:
=> ext2load <interface> [<dev[:part]> [<addr> [<filename> [bytes [pos]]]]] For example:
=> ext2load mmc 0:2 $load_addr bl2_qspi.pbl Also note that LSDK flex-installer command puts the images on the IInd partition, so 0:2 is used in the load command. If the SD card is formatted on Windows PC or Linux PC for single partition only, then 0 should be used instead of 0:2 in the fatload/ext2load command.
=> load mmc 0:2 0xa0000000 <image name>
=> print filesize
For example:
=> load mmc 0:2 0xa0000000 bl2_qspi.pbl
=> print filesize
filesize=14379
Or
=> load usb 0:2 0xa0000000 <image name>
=> print filesize
Or
=> load scsi 0:2 0xa0000000 <image name>
=> print filesize
=> load mmc 0:2 0xa0000000 <image name>
=> print filesize
For example:
=> load mmc 0:2 0xa0000000 fip.bin
=> print filesize
filesize=131510
Or
=> load usb 0:2 0xa0000000 <image name>
=> print filesize
Or
=> load scsi 0:2 0xa0000000 <image name>
=> print filesize
LS2088ARDB will boot with TF-A.