143f35ef5SPaul BeesleyPrerequisites 243f35ef5SPaul Beesley============= 343f35ef5SPaul Beesley 443f35ef5SPaul BeesleyThis document describes the software requirements for building |TF-A| for 543f35ef5SPaul BeesleyAArch32 and AArch64 target platforms. 643f35ef5SPaul Beesley 743f35ef5SPaul BeesleyIt may possible to build |TF-A| with combinations of software packages that are 843f35ef5SPaul Beesleydifferent from those listed below, however only the software described in this 943f35ef5SPaul Beesleydocument can be officially supported. 1043f35ef5SPaul BeesleyBuild Host 1143f35ef5SPaul Beesley---------- 1243f35ef5SPaul Beesley 1343f35ef5SPaul Beesley|TF-A| can be built using either a Linux or a Windows machine as the build host. 1443f35ef5SPaul Beesley 1543f35ef5SPaul BeesleyA relatively recent Linux distribution is recommended for building |TF-A|. We 1643f35ef5SPaul Beesleyhave performed tests using Ubuntu 16.04 LTS (64-bit) but other distributions 1743f35ef5SPaul Beesleyshould also work fine as a base, provided that the necessary tools and libraries 1843f35ef5SPaul Beesleycan be installed. 1943f35ef5SPaul Beesley 2043f35ef5SPaul Beesley.. _prerequisites_toolchain: 2143f35ef5SPaul Beesley 2243f35ef5SPaul BeesleyToolchain 2343f35ef5SPaul Beesley--------- 2443f35ef5SPaul Beesley 2543f35ef5SPaul Beesley|TF-A| can be built with any of the following *cross-compiler* toolchains that 2643f35ef5SPaul Beesleytarget the Armv7-A or Armv8-A architectures: 2743f35ef5SPaul Beesley 28a58a25e5SDaniel Boulby- GCC >= 11.2-2022.02 (from the `Arm Developer website`_) 29a5d36574SHarrison Mutai- Clang >= 14.0.0 30a5d36574SHarrison Mutai- Arm Compiler >= 6.18 3143f35ef5SPaul Beesley 3243f35ef5SPaul BeesleyIn addition, a native compiler is required to build the supporting tools. 3343f35ef5SPaul Beesley 3443f35ef5SPaul Beesley.. note:: 3543f35ef5SPaul Beesley The software has also been built on Windows 7 Enterprise SP1, using CMD.EXE, 3643f35ef5SPaul Beesley Cygwin, and Msys (MinGW) shells, using version 5.3.1 of the GNU toolchain. 3743f35ef5SPaul Beesley 3843f35ef5SPaul Beesley.. note:: 3943f35ef5SPaul Beesley For instructions on how to select the cross compiler refer to 4043f35ef5SPaul Beesley :ref:`Performing an Initial Build`. 4143f35ef5SPaul Beesley 4243f35ef5SPaul Beesley.. _prerequisites_software_and_libraries: 4343f35ef5SPaul Beesley 4443f35ef5SPaul BeesleySoftware and Libraries 4543f35ef5SPaul Beesley---------------------- 4643f35ef5SPaul Beesley 4743f35ef5SPaul BeesleyThe following tools are required to obtain and build |TF-A|: 4843f35ef5SPaul Beesley 4943f35ef5SPaul Beesley- An appropriate toolchain (see :ref:`prerequisites_toolchain`) 5043f35ef5SPaul Beesley- GNU Make 5143f35ef5SPaul Beesley- Git 5243f35ef5SPaul Beesley 5343f35ef5SPaul BeesleyThe following libraries must be available to build one or more components or 5443f35ef5SPaul Beesleysupporting tools: 5543f35ef5SPaul Beesley 569bc52d33SJuan Pablo Conde- OpenSSL >= 3.0 5743f35ef5SPaul Beesley 5843f35ef5SPaul Beesley Required to build the cert_create tool. 5943f35ef5SPaul Beesley 60*8caf10acSJuan Pablo Conde .. note:: 61*8caf10acSJuan Pablo Conde 62*8caf10acSJuan Pablo Conde OpenSSL 3.0 has to be built from source code, as it's not available in 63*8caf10acSJuan Pablo Conde the default package repositories in recent Ubuntu versions. Please refer 64*8caf10acSJuan Pablo Conde to the OpenSSL project documentation for more information. 65*8caf10acSJuan Pablo Conde 665cae3373SSandrine BailleuxThe following libraries are required for Trusted Board Boot and Measured Boot 675cae3373SSandrine Bailleuxsupport: 6843f35ef5SPaul Beesley 695cae3373SSandrine Bailleux- mbed TLS == 2.28.0 (tag: ``mbedtls-2.28.0``) 7043f35ef5SPaul Beesley 7143f35ef5SPaul BeesleyThese tools are optional: 7243f35ef5SPaul Beesley 7343f35ef5SPaul Beesley- Device Tree Compiler (DTC) >= 1.4.6 7443f35ef5SPaul Beesley 7543f35ef5SPaul Beesley Needed if you want to rebuild the provided Flattened Device Tree (FDT) 7643f35ef5SPaul Beesley source files (``.dts`` files). DTC is available for Linux through the package 7743f35ef5SPaul Beesley repositories of most distributions. 7843f35ef5SPaul Beesley 794466cf82SDaniel Boulby- Arm `Development Studio (Arm-DS)`_ 8043f35ef5SPaul Beesley 8143f35ef5SPaul Beesley The standard software package used for debugging software on Arm development 8243f35ef5SPaul Beesley platforms and |FVP| models. 8343f35ef5SPaul Beesley 8435cc497dSChris Kay- Node.js >= 16 85ba39362fSChris Kay 86ba39362fSChris Kay Highly recommended, and necessary in order to install and use the packaged 87ba39362fSChris Kay Git hooks and helper tools. Without these tools you will need to rely on the 88ba39362fSChris Kay CI for feedback on commit message conformance. 89ba39362fSChris Kay 9043f35ef5SPaul BeesleyPackage Installation (Linux) 9143f35ef5SPaul Beesley^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 9243f35ef5SPaul Beesley 9343f35ef5SPaul BeesleyIf you are using the recommended Ubuntu distribution then you can install the 9443f35ef5SPaul Beesleyrequired packages with the following command: 9543f35ef5SPaul Beesley 9643f35ef5SPaul Beesley.. code:: shell 9743f35ef5SPaul Beesley 98*8caf10acSJuan Pablo Conde sudo apt install build-essential git 9943f35ef5SPaul Beesley 10043f35ef5SPaul BeesleyThe optional packages can be installed using: 10143f35ef5SPaul Beesley 10243f35ef5SPaul Beesley.. code:: shell 10343f35ef5SPaul Beesley 10443f35ef5SPaul Beesley sudo apt install device-tree-compiler 10543f35ef5SPaul Beesley 106ba39362fSChris KayAdditionally, to install an up-to-date version of Node.js, you can use the `Node 10735cc497dSChris KayVersion Manager`_ to install a version of your choosing (we recommend 16, but 108ba39362fSChris Kaylater LTS versions might offer a more stable experience): 109ba39362fSChris Kay 110ba39362fSChris Kay.. code:: shell 111ba39362fSChris Kay 11235cc497dSChris Kay curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | "$SHELL" 11335cc497dSChris Kay exec "$SHELL" -ic "nvm install 16; exec $SHELL" 114ba39362fSChris Kay 115ba39362fSChris Kay.. _Node Version Manager: https://github.com/nvm-sh/nvm#install--update-script 116ba39362fSChris Kay 11743f35ef5SPaul BeesleySupporting Files 11843f35ef5SPaul Beesley---------------- 11943f35ef5SPaul Beesley 12043f35ef5SPaul BeesleyTF-A has been tested with pre-built binaries and file systems from `Linaro 12199a99eb4SZelalemRelease 20.01`_. Alternatively, you can build the binaries from source using 12243f35ef5SPaul Beesleyinstructions in :ref:`Performing an Initial Build`. 12343f35ef5SPaul Beesley 12443f35ef5SPaul Beesley.. _prerequisites_get_source: 12543f35ef5SPaul Beesley 12643f35ef5SPaul BeesleyGetting the TF-A Source 12743f35ef5SPaul Beesley----------------------- 12843f35ef5SPaul Beesley 12943f35ef5SPaul BeesleySource code for |TF-A| is maintained in a Git repository hosted on 13043f35ef5SPaul BeesleyTrustedFirmware.org. To clone this repository from the server, run the following 13143f35ef5SPaul Beesleyin your shell: 13243f35ef5SPaul Beesley 13343f35ef5SPaul Beesley.. code:: shell 13443f35ef5SPaul Beesley 135ba39362fSChris Kay git clone "https://review.trustedfirmware.org/TF-A/trusted-firmware-a" 13643f35ef5SPaul Beesley 137ba39362fSChris KayAdditional Steps for Contributors 138ba39362fSChris Kay^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 13943f35ef5SPaul Beesley 140ba39362fSChris KayIf you are planning on contributing back to TF-A, there are some things you'll 141ba39362fSChris Kaywant to know. 14243f35ef5SPaul Beesley 143ba39362fSChris KayTF-A is hosted by a `Gerrit Code Review`_ server. Gerrit requires that all 144ba39362fSChris Kaycommits include a ``Change-Id`` footer, and this footer is typically 145ba39362fSChris Kayautomatically generated by a Git hook installed by you, the developer. 146ba39362fSChris Kay 147ba39362fSChris KayIf you have Node.js installed already, you can automatically install this hook, 148ba39362fSChris Kayalong with any additional hooks and Javascript-based tooling that we use, by 149ba39362fSChris Kayrunning from within your newly-cloned repository: 15043f35ef5SPaul Beesley 15143f35ef5SPaul Beesley.. code:: shell 15243f35ef5SPaul Beesley 153a4371d1cSChris Kay npm install --no-save 154ba39362fSChris Kay 155ba39362fSChris KayIf you have opted **not** to install Node.js, you can install the Gerrit hook 156ba39362fSChris Kaymanually by running: 157ba39362fSChris Kay 158ba39362fSChris Kay.. code:: shell 159ba39362fSChris Kay 160ba39362fSChris Kay curl -Lo $(git rev-parse --git-dir)/hooks/commit-msg https://review.trustedfirmware.org/tools/hooks/commit-msg 161ba39362fSChris Kay chmod +x $(git rev-parse --git-dir)/hooks/commit-msg 162ba39362fSChris Kay 163ba39362fSChris KayYou can read more about Git hooks in the *githooks* page of the Git 164ba39362fSChris Kaydocumentation, available `here <https://git-scm.com/docs/githooks>`_. 16543f35ef5SPaul Beesley 16643f35ef5SPaul Beesley-------------- 16743f35ef5SPaul Beesley 168a5d36574SHarrison Mutai*Copyright (c) 2021-2022, Arm Limited. All rights reserved.* 16943f35ef5SPaul Beesley 17071a5543bSSandrine Bailleux.. _Arm Developer website: https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/downloads 171ba39362fSChris Kay.. _Gerrit Code Review: https://www.gerritcodereview.com/ 17243f35ef5SPaul Beesley.. _Linaro Release Notes: https://community.arm.com/dev-platforms/w/docs/226/old-release-notes 17343f35ef5SPaul Beesley.. _Linaro instructions: https://community.arm.com/dev-platforms/w/docs/304/arm-reference-platforms-deliverables 1744466cf82SDaniel Boulby.. _Development Studio (Arm-DS): https://developer.arm.com/Tools%20and%20Software/Arm%20Development%20Studio 17599a99eb4SZelalem.. _Linaro Release 20.01: http://releases.linaro.org/members/arm/platforms/20.01 176