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