7.3.1.Arm Juno Development Platform

7.3.1.1.Platform-specific build options

  • JUNO_TZMP1 : Boolean option to configure Juno to be used for TrustZoneMedia Protection (TZ-MP1). Default value of this flag is 0.

7.3.1.2.Running software on Juno

This version of TF-A has been tested on variants r0, r1 and r2 of Juno.

To run TF-A on Juno, you need to first prepare an SD card with Juno softwarestack that includes TF-A. This version of TF-A is tested with pre-builtLinaro release software stack version 20.01. You can alternativelybuild the software stack yourself by following theJuno platform software user guide. Once you prepare the software stackon an SD card, you can replace thebl1.bin andfip.binbinaries in theSOFTWARE/ directory with custom built TF-A binaries.

7.3.1.3.Preparing TF-A images

This section provides Juno and FVP specific instructions to build TrustedFirmware, obtain the additional required firmware, and pack it all together ina single FIP binary. It assumes that a Linaro release software stack has beeninstalled.

Note

Pre-built binaries for AArch32 are available from Linaro Release 16.12onwards. Before that release, pre-built binaries are only available forAArch64.

Warning

Follow the full instructions for one platform before switching to adifferent one. Mixing instructions for different platforms may result incorrupted binaries.

Warning

The uboot image downloaded by the Linaro workspace script does not alwaysmatch the uboot image packaged as BL33 in the corresponding fip file. It isrecommended to use the version that is packaged in the fip file using theinstructions below.

Note

For the FVP, the kernel FDT is packaged in FIP during build and loadedby the firmware at runtime.

  1. Clean the working directory

    makerealclean
  2. Obtain SCP binaries (Juno)

    This version of TF-A is tested with SCP version 2.14.0 on Juno. You candownload pre-built SCP binaries (scp_bl1.bin andscp_bl2.bin)fromTF-A downloads page. Alternatively, you canbuildthe binaries from source.

  3. Obtain BL33 (all platforms)

    Use the fiptool to extract the BL33 image from the FIPpackage included in the Linaro release:

    # Build the fiptoolmake[DEBUG=1][V=1]fiptool# Unpack firmware images from Linaro FIP./tools/fiptool/fiptoolunpack<path-to-linaro-release>/[SOFTWARE]/fip.bin

    The unpack operation will result in a set of binary images extracted to thecurrent working directory. BL33 corresponds tont-fw.bin.

    Note

    The fiptool will complain if the images to be unpacked alreadyexist in the current directory. If that is the case, either delete thosefiles or use the--force option to overwrite.

    Note

    For AArch32, the instructions below assume that nt-fw.bin is anormal world boot loader that supports AArch32.

  4. Build TF-A images and create a new FIP for FVP

    # AArch64makePLAT=fvpBL33=nt-fw.binallfip# AArch32makePLAT=fvpARCH=aarch32AARCH32_SP=sp_minBL33=nt-fw.binallfip
  5. Build TF-A images and create a new FIP for Juno

    For AArch64:

    Building for AArch64 on Juno simply requires the addition ofSCP_BL2as a build parameter.

    makePLAT=junoBL33=nt-fw.binSCP_BL2=scp_bl2.binallfip

    For AArch32:

    Hardware restrictions on Juno prevent cold reset into AArch32 execution mode,therefore BL1 and BL2 must be compiled for AArch64, and BL32 is compiledseparately for AArch32.

    • Before building BL32, the environment variableCROSS_COMPILE must pointto the AArch32 Linaro cross compiler.

      exportCROSS_COMPILE=<path-to-aarch32-gcc>/bin/arm-linux-gnueabihf-
    • Build BL32 in AArch32.

      makeARCH=aarch32PLAT=junoAARCH32_SP=sp_min\RESET_TO_SP_MIN=1JUNO_AARCH32_EL3_RUNTIME=1bl32
    • Savebl32.bin to a temporary location and clean the build products.

      cp<path-to-build>/bl32.bin<path-to-temporary>makerealclean
    • Before building BL1 and BL2, the environment variableCROSS_COMPILEmust point to the AArch64 Linaro cross compiler.

      exportCROSS_COMPILE=<path-to-aarch64-gcc>/bin/aarch64-none-elf-
    • The following parameters should be used to build BL1 and BL2 in AArch64and point to the BL32 file.

      makeARCH=aarch64PLAT=junoJUNO_AARCH32_EL3_RUNTIME=1\BL33=nt-fw.binSCP_BL2=scp_bl2.bin\BL32=<path-to-temporary>/bl32.binallfip

The resulting BL1 and FIP images may be found in:

# Juno./build/juno/release/bl1.bin./build/juno/release/fip.bin# FVP./build/fvp/release/bl1.bin./build/fvp/release/fip.bin

After building TF-A, the filesbl1.bin,fip.bin andscp_bl1.binneed to be copied to theSOFTWARE/ directory on the Juno SD card.

7.3.1.4.Booting Firmware Update images

The new images must be programmed in flash memory by addingan entry in theSITE1/HBI0262x/images.txt configuration fileon the Juno SD card (wherex depends on the revision of the Juno board).Refer to theJuno Getting Started Guide, section 2.3 “Flash memoryprogramming” for more information. User should ensure these do notoverlap with any other entries in the file.

NOR10UPDATE:AUTO;ImageUpdate:NONE/AUTO/FORCENOR10ADDRESS:0x00400000;ImageFlashAddress[ns_bl2u_base_address]NOR10FILE: \SOFTWARE\fwu_fip.bin;ImageFileNameNOR10LOAD:00000000;ImageLoadAddressNOR10ENTRY:00000000;ImageEntryPointNOR11UPDATE:AUTO;ImageUpdate:NONE/AUTO/FORCENOR11ADDRESS:0x03EB8000;ImageFlashAddress[ns_bl1u_base_address]NOR11FILE: \SOFTWARE\ns_bl1u.bin;ImageFileNameNOR11LOAD:00000000;ImageLoadAddress

The address ns_bl1u_base_address is the value of NS_BL1U_BASE - 0x8000000.In the same way, the address ns_bl2u_base_address is the value ofNS_BL2U_BASE - 0x8000000.

7.3.1.5.Booting an EL3 payload

If the EL3 payload is able to execute in place, it may be programmed in flashmemory by adding an entry in theSITE1/HBI0262x/images.txt configuration fileon the Juno SD card (wherex depends on the revision of the Juno board).Refer to theJuno Getting Started Guide, section 2.3 “Flash memoryprogramming” for more information.

Alternatively, the same DS-5 command mentioned in the FVP section above canbe used to load the EL3 payload’s ELF file over JTAG on Juno.

For more information on EL3 payloads in general, seeBooting an EL3 payload.

7.3.1.6.Booting a preloaded kernel image

The Trusted Firmware must be compiled in a similar way as for FVP explainedabove. The process to load binaries to memory is the one explained inplat_juno_booting_el3_payload.

7.3.1.7.Testing System Suspend

The SYSTEM SUSPEND is a PSCI API which can be used to implement system suspendto RAM. For more details refer to section 5.16 ofPSCI. To test system suspendon Juno, at the linux shell prompt, issue the following command:

echo+10>/sys/class/rtc/rtc0/wakealarmecho-nmem>/sys/power/state

The Juno board should suspend to RAM and then wakeup after 10 seconds due towakeup interrupt from RTC.

7.3.1.8.Additional Resources

Please visit theArm Platforms Portal to get support and obtain any other Junosoftware information. Please also refer to theJuno Getting Started Guide toget more detailed information about the Juno Arm development platform and how toconfigure it.


Copyright (c) 2019-2025, Arm Limited. All rights reserved.