1*91f16700SchasingluluSocionext Synquacer 2*91f16700Schasinglulu=================== 3*91f16700Schasinglulu 4*91f16700SchasingluluSocionext's Synquacer SC2A11 is a multi-core processor with 24 cores of Arm 5*91f16700SchasingluluCortex-A53. The Developerbox, of 96boards, is a platform that contains this 6*91f16700Schasingluluprocessor. This port of the Trusted Firmware only supports this platform at 7*91f16700Schasingluluthe moment. 8*91f16700Schasinglulu 9*91f16700SchasingluluMore information are listed in `link`_. 10*91f16700Schasinglulu 11*91f16700SchasingluluHow to build 12*91f16700Schasinglulu------------ 13*91f16700Schasinglulu 14*91f16700SchasingluluCode Locations 15*91f16700Schasinglulu~~~~~~~~~~~~~~ 16*91f16700Schasinglulu 17*91f16700Schasinglulu- Trusted Firmware-A: 18*91f16700Schasinglulu `link <https://github.com/ARM-software/arm-trusted-firmware>`__ 19*91f16700Schasinglulu 20*91f16700Schasinglulu- edk2: 21*91f16700Schasinglulu `link <https://github.com/tianocore/edk2>`__ 22*91f16700Schasinglulu 23*91f16700Schasinglulu- edk2-platforms: 24*91f16700Schasinglulu `link <https://github.com/tianocore/edk2-platforms>`__ 25*91f16700Schasinglulu 26*91f16700Schasinglulu- edk2-non-osi: 27*91f16700Schasinglulu `link <https://github.com/tianocore/edk2-non-osi>`__ 28*91f16700Schasinglulu 29*91f16700SchasingluluBoot Flow 30*91f16700Schasinglulu~~~~~~~~~ 31*91f16700Schasinglulu 32*91f16700SchasingluluSCP firmware --> TF-A BL31 --> UEFI(edk2) 33*91f16700Schasinglulu 34*91f16700SchasingluluBuild Procedure 35*91f16700Schasinglulu~~~~~~~~~~~~~~~ 36*91f16700Schasinglulu 37*91f16700Schasinglulu- Firstly, in addition to the “normal” build tools you will also need a 38*91f16700Schasinglulu few specialist tools. On a Debian or Ubuntu operating system try: 39*91f16700Schasinglulu 40*91f16700Schasinglulu .. code:: shell 41*91f16700Schasinglulu 42*91f16700Schasinglulu sudo apt install acpica-tools device-tree-compiler uuid-dev 43*91f16700Schasinglulu 44*91f16700Schasinglulu- Secondly, create a new working directory and store the absolute path to this 45*91f16700Schasinglulu directory in an environment variable, WORKSPACE. It does not matter where 46*91f16700Schasinglulu this directory is created but as an example: 47*91f16700Schasinglulu 48*91f16700Schasinglulu .. code:: shell 49*91f16700Schasinglulu 50*91f16700Schasinglulu export WORKSPACE=$HOME/build/developerbox-firmware 51*91f16700Schasinglulu mkdir -p $WORKSPACE 52*91f16700Schasinglulu 53*91f16700Schasinglulu- Run the following commands to clone the source code: 54*91f16700Schasinglulu 55*91f16700Schasinglulu .. code:: shell 56*91f16700Schasinglulu 57*91f16700Schasinglulu cd $WORKSPACE 58*91f16700Schasinglulu git clone https://github.com/ARM-software/arm-trusted-firmware -b master 59*91f16700Schasinglulu git clone https://github.com/tianocore/edk2.git -b master 60*91f16700Schasinglulu git clone https://github.com/tianocore/edk2-platforms.git -b master 61*91f16700Schasinglulu git clone https://github.com/tianocore/edk2-non-osi.git -b master 62*91f16700Schasinglulu 63*91f16700Schasinglulu- Build ATF: 64*91f16700Schasinglulu 65*91f16700Schasinglulu .. code:: shell 66*91f16700Schasinglulu 67*91f16700Schasinglulu cd $WORKSPACE/arm-trusted-firmware 68*91f16700Schasinglulu make -j`nproc` PLAT=synquacer PRELOADED_BL33_BASE=0x8200000 bl31 fiptool 69*91f16700Schasinglulu tools/fiptool/fiptool create \ 70*91f16700Schasinglulu --tb-fw ./build/synquacer/release/bl31.bin \ 71*91f16700Schasinglulu --soc-fw ./build/synquacer/release/bl31.bin \ 72*91f16700Schasinglulu --scp-fw ./build/synquacer/release/bl31.bin \ 73*91f16700Schasinglulu ../edk2-non-osi/Platform/Socionext/DeveloperBox/fip_all_arm_tf.bin 74*91f16700Schasinglulu 75*91f16700Schasinglulu- Build EDK2: 76*91f16700Schasinglulu 77*91f16700Schasinglulu .. code:: shell 78*91f16700Schasinglulu 79*91f16700Schasinglulu cd $WORKSPACE 80*91f16700Schasinglulu export PACKAGES_PATH=$WORKSPACE/edk2:$WORKSPACE/edk2-platforms:$WORKSPACE/edk2-non-osi 81*91f16700Schasinglulu export ACTIVE_PLATFORM="Platform/Socionext/DeveloperBox/DeveloperBox.dsc" 82*91f16700Schasinglulu export GCC5_AARCH64_PREFIX=aarch64-linux-gnu- 83*91f16700Schasinglulu unset ARCH 84*91f16700Schasinglulu 85*91f16700Schasinglulu . edk2/edksetup.sh 86*91f16700Schasinglulu make -C edk2/BaseTools 87*91f16700Schasinglulu 88*91f16700Schasinglulu build -p $ACTIVE_PLATFORM -b RELEASE -a AARCH64 -t GCC5 -n `nproc` -D DO_X86EMU=TRUE 89*91f16700Schasinglulu 90*91f16700Schasinglulu- The firmware image, which comprises the option ROM, ARM trusted firmware and 91*91f16700Schasinglulu EDK2 itself, can be found $WORKSPACE/../Build/DeveloperBox/RELEASE_GCC5/FV/. 92*91f16700Schasinglulu Use SYNQUACERFIRMWAREUPDATECAPSULEFMPPKCS7.Cap for UEFI capsule update and 93*91f16700Schasinglulu SPI_NOR_IMAGE.fd for the serial flasher. 94*91f16700Schasinglulu 95*91f16700Schasinglulu Note #1: -t GCC5 can be loosely translated as “enable link-time-optimization”; 96*91f16700Schasinglulu any version of gcc >= 5 will support this feature and may be used to build EDK2. 97*91f16700Schasinglulu 98*91f16700Schasinglulu Note #2: Replace -b RELEASE with -b DEBUG to build a debug. 99*91f16700Schasinglulu 100*91f16700SchasingluluInstall the System Firmware 101*91f16700Schasinglulu~~~~~~~~~~~~~~~~~~~~~~~~~~~ 102*91f16700Schasinglulu 103*91f16700Schasinglulu- Providing your Developerbox is fully working and has on operating system 104*91f16700Schasinglulu installed then you can adopt your the newly compiled system firmware using 105*91f16700Schasinglulu the capsule update method:. 106*91f16700Schasinglulu 107*91f16700Schasinglulu .. code:: shell 108*91f16700Schasinglulu 109*91f16700Schasinglulu sudo apt install fwupdate 110*91f16700Schasinglulu sudo fwupdate --apply {50b94ce5-8b63-4849-8af4-ea479356f0e3} \ 111*91f16700Schasinglulu SYNQUACERFIRMWAREUPDATECAPSULEFMPPKCS7.Cap 112*91f16700Schasinglulu sudo reboot 113*91f16700Schasinglulu 114*91f16700Schasinglulu- Alternatively you can install SPI_NOR_IMAGE.fd using the `board recovery method`_. 115*91f16700Schasinglulu 116*91f16700Schasinglulu.. _link: https://www.96boards.org/product/developerbox/ 117*91f16700Schasinglulu.. _board recovery method: https://www.96boards.org/documentation/enterprise/developerbox/installation/board-recovery.md.html 118