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. 104a1bcd50SSandrine Bailleux 1102cc2efbSHarrison MutaiGetting the TF-A Source 1202cc2efbSHarrison Mutai----------------------- 1343f35ef5SPaul Beesley 1402cc2efbSHarrison MutaiSource code for |TF-A| is maintained in a Git repository hosted on 1502cc2efbSHarrison Mutai`TrustedFirmware.org`_. To clone this repository from the server, run the following 1602cc2efbSHarrison Mutaiin your shell: 1743f35ef5SPaul Beesley 1802cc2efbSHarrison Mutai.. code:: shell 1943f35ef5SPaul Beesley 2002cc2efbSHarrison Mutai git clone "https://review.trustedfirmware.org/TF-A/trusted-firmware-a" 2102cc2efbSHarrison Mutai 2202cc2efbSHarrison Mutai 2302cc2efbSHarrison MutaiRequirements 2402cc2efbSHarrison Mutai------------ 2502cc2efbSHarrison Mutai 2602cc2efbSHarrison Mutai======================== ===================== 2702cc2efbSHarrison Mutai Program Min supported version 2802cc2efbSHarrison Mutai======================== ===================== 2902cc2efbSHarrison MutaiArm Compiler 6.18 30*764c66bbSJayanth Dodderi ChidanandArm GNU Compiler 13.3 3102cc2efbSHarrison MutaiClang/LLVM 11.0.0 3202cc2efbSHarrison MutaiDevice Tree Compiler 1.4.7 3302cc2efbSHarrison MutaiGNU make 3.81 345acc3164SRyan Everettmbed TLS\ [#f1]_ 3.6.1 3502cc2efbSHarrison MutaiNode.js [#f2]_ 16 3602cc2efbSHarrison MutaiOpenSSL 1.0.0 3702cc2efbSHarrison MutaiPoetry [#f2]_ 1.3.2 3802cc2efbSHarrison MutaiQCBOR\ [#f3]_ 1.2 3902cc2efbSHarrison MutaiSphinx\ [#f2]_ 2.4.4 4002cc2efbSHarrison Mutai======================== ===================== 4102cc2efbSHarrison Mutai 4202cc2efbSHarrison Mutai.. [#f1] Required for Trusted Board Boot and Measured Boot. 4302cc2efbSHarrison Mutai.. [#f2] Required only for building TF-A documentation. 4402cc2efbSHarrison Mutai.. [#f3] Required only when enabling DICE Protection Environment support. 4543f35ef5SPaul Beesley 4643f35ef5SPaul BeesleyToolchain 4702cc2efbSHarrison Mutai^^^^^^^^^ 4843f35ef5SPaul Beesley 4902cc2efbSHarrison Mutai|TF-A| can be compiled using any cross-compiler toolchain specified in the 5002cc2efbSHarrison Mutaipreceding table that target Armv7-A or Armv8-A. For AArch32 and 5102cc2efbSHarrison MutaiAArch64 builds, the respective targets required are ``arm-none-eabi`` and 5202cc2efbSHarrison Mutai``aarch64-none-elf``. 5343f35ef5SPaul Beesley 54*764c66bbSJayanth Dodderi ChidanandTesting has been performed with version 13.3.Rel1 (gcc 13.3) of the Arm 5502cc2efbSHarrison MutaiGNU compiler, which can be installed from the `Arm Developer website`_. 56b50838baSBoyan Karatotev 5702cc2efbSHarrison MutaiIn addition, a native compiler is required to build supporting tools. 5843f35ef5SPaul Beesley 5943f35ef5SPaul Beesley.. note:: 60415195c0SBoyan Karatotev Versions greater than the ones specified are likely but not guaranteed to 61415195c0SBoyan Karatotev work. This is predominantly because TF-A carries its own copy of compiler-rt, 62415195c0SBoyan Karatotev which may be older than the version expected by the compiler. Fixes and bug 63415195c0SBoyan Karatotev reports are always welcome. 64415195c0SBoyan Karatotev 65415195c0SBoyan Karatotev.. note:: 6643f35ef5SPaul Beesley For instructions on how to select the cross compiler refer to 6743f35ef5SPaul Beesley :ref:`Performing an Initial Build`. 6843f35ef5SPaul Beesley 6902cc2efbSHarrison MutaiOpenSSL 7002cc2efbSHarrison Mutai^^^^^^^ 7143f35ef5SPaul Beesley 7202cc2efbSHarrison MutaiOpenSSL is required to build the cert_create, encrypt_fw, and fiptool tools. 738caf10acSJuan Pablo Conde 74cf2dd17dSJuan Pablo CondeIf using OpenSSL 3, older Linux versions may require it to be built from 75cf2dd17dSJuan Pablo Condesource code, as it may not be available in the default package repositories. 76cf2dd17dSJuan Pablo CondePlease refer to the OpenSSL project documentation for more information. 778caf10acSJuan Pablo Conde 7802cc2efbSHarrison Mutai.. warning:: 7902cc2efbSHarrison Mutai Versions 1.0.x and from v3.0.0 up to v3.0.6 are strongly advised against due 8002cc2efbSHarrison Mutai to concerns regarding security vulnerabilities! 8143f35ef5SPaul Beesley 8202cc2efbSHarrison MutaiDevice Tree Compiler (DTC) 8302cc2efbSHarrison Mutai^^^^^^^^^^^^^^^^^^^^^^^^^^ 8443f35ef5SPaul Beesley 8543f35ef5SPaul BeesleyNeeded if you want to rebuild the provided Flattened Device Tree (FDT) 8643f35ef5SPaul Beesleysource files (``.dts`` files). DTC is available for Linux through the package 8743f35ef5SPaul Beesleyrepositories of most distributions. 8843f35ef5SPaul Beesley 8902cc2efbSHarrison MutaiArm Development Studio (`Arm-DS`_) 9002cc2efbSHarrison Mutai^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 9143f35ef5SPaul Beesley 9243f35ef5SPaul BeesleyThe standard software package used for debugging software on Arm development 9343f35ef5SPaul Beesleyplatforms and |FVP| models. 9443f35ef5SPaul Beesley 9502cc2efbSHarrison MutaiNode.js 9602cc2efbSHarrison Mutai^^^^^^^ 97ba39362fSChris Kay 98ba39362fSChris KayHighly recommended, and necessary in order to install and use the packaged 99ba39362fSChris KayGit hooks and helper tools. Without these tools you will need to rely on the 100ba39362fSChris KayCI for feedback on commit message conformance. 101ba39362fSChris Kay 10202cc2efbSHarrison MutaiPoetry 10302cc2efbSHarrison Mutai^^^^^^ 104793f72c0SHarrison Mutai 105793f72c0SHarrison MutaiRequired for managing Python dependencies, this will allow you to reliably 106793f72c0SHarrison Mutaireproduce a Python environment to build documentation and run analysis tools. 107793f72c0SHarrison MutaiMost importantly, it ensures your system environment will not be affected by 108793f72c0SHarrison Mutaidependencies in the Python scripts. 109793f72c0SHarrison Mutai 11002cc2efbSHarrison Mutai.. _prerequisites_software_and_libraries: 11143f35ef5SPaul Beesley 11202cc2efbSHarrison MutaiPackage Installation (Linux) 11302cc2efbSHarrison Mutai---------------------------- 11402cc2efbSHarrison Mutai 11502cc2efbSHarrison Mutai|TF-A| can be compiled on both Linux and Windows-based machines. 11602cc2efbSHarrison MutaiHowever, we strongly recommend using a UNIX-compatible build environment. 11702cc2efbSHarrison Mutai 11802cc2efbSHarrison MutaiTesting is performed using Ubuntu 22.04 LTS (64-bit), but other distributions 11902cc2efbSHarrison Mutaishould also work, provided the necessary tools and libraries are installed. 12002cc2efbSHarrison Mutai 12102cc2efbSHarrison MutaiThe following are steps to install the required packages: 12243f35ef5SPaul Beesley 12343f35ef5SPaul Beesley.. code:: shell 12443f35ef5SPaul Beesley 12502cc2efbSHarrison Mutai sudo apt install build-essential 12643f35ef5SPaul Beesley 12743f35ef5SPaul BeesleyThe optional packages can be installed using: 12843f35ef5SPaul Beesley 12943f35ef5SPaul Beesley.. code:: shell 13043f35ef5SPaul Beesley 13143f35ef5SPaul Beesley sudo apt install device-tree-compiler 13243f35ef5SPaul Beesley 13310c969c5SChris KayAdditionally, to install a version of Node.js compatible with TF-A's repository 13410c969c5SChris Kayscripts, you can use the `Node Version Manager`_. To install both NVM and an 13510c969c5SChris Kayappropriate version of Node.js, run the following **from the root directory of 13610c969c5SChris Kaythe repository**: 137ba39362fSChris Kay 138ba39362fSChris Kay.. code:: shell 139ba39362fSChris Kay 14010c969c5SChris Kay curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash 14110c969c5SChris Kay exec "$SHELL" -ic "nvm install; exec $SHELL" 142ba39362fSChris Kay 143ba39362fSChris Kay.. _Node Version Manager: https://github.com/nvm-sh/nvm#install--update-script 144ba39362fSChris Kay 14543f35ef5SPaul BeesleySupporting Files 14643f35ef5SPaul Beesley---------------- 14743f35ef5SPaul Beesley 14843f35ef5SPaul BeesleyTF-A has been tested with pre-built binaries and file systems from `Linaro 14999a99eb4SZelalemRelease 20.01`_. Alternatively, you can build the binaries from source using 15043f35ef5SPaul Beesleyinstructions in :ref:`Performing an Initial Build`. 15143f35ef5SPaul Beesley 15243f35ef5SPaul Beesley.. _prerequisites_get_source: 15343f35ef5SPaul Beesley 154ba39362fSChris KayAdditional Steps for Contributors 155ba39362fSChris Kay^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 15643f35ef5SPaul Beesley 157ba39362fSChris KayIf you are planning on contributing back to TF-A, there are some things you'll 158ba39362fSChris Kaywant to know. 15943f35ef5SPaul Beesley 160ba39362fSChris KayTF-A is hosted by a `Gerrit Code Review`_ server. Gerrit requires that all 161ba39362fSChris Kaycommits include a ``Change-Id`` footer, and this footer is typically 162ba39362fSChris Kayautomatically generated by a Git hook installed by you, the developer. 163ba39362fSChris Kay 164ba39362fSChris KayIf you have Node.js installed already, you can automatically install this hook, 165ba39362fSChris Kayalong with any additional hooks and Javascript-based tooling that we use, by 166ba39362fSChris Kayrunning from within your newly-cloned repository: 16743f35ef5SPaul Beesley 16843f35ef5SPaul Beesley.. code:: shell 16943f35ef5SPaul Beesley 170a4371d1cSChris Kay npm install --no-save 171ba39362fSChris Kay 172ba39362fSChris KayIf you have opted **not** to install Node.js, you can install the Gerrit hook 173ba39362fSChris Kaymanually by running: 174ba39362fSChris Kay 175ba39362fSChris Kay.. code:: shell 176ba39362fSChris Kay 177ba39362fSChris Kay curl -Lo $(git rev-parse --git-dir)/hooks/commit-msg https://review.trustedfirmware.org/tools/hooks/commit-msg 178ba39362fSChris Kay chmod +x $(git rev-parse --git-dir)/hooks/commit-msg 179ba39362fSChris Kay 180ba39362fSChris KayYou can read more about Git hooks in the *githooks* page of the Git 181ba39362fSChris Kaydocumentation, available `here <https://git-scm.com/docs/githooks>`_. 18243f35ef5SPaul Beesley 18343f35ef5SPaul Beesley-------------- 18443f35ef5SPaul Beesley 185c19977beSTamas Ban*Copyright (c) 2021-2024, Arm Limited. All rights reserved.* 18643f35ef5SPaul Beesley 18771a5543bSSandrine Bailleux.. _Arm Developer website: https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/downloads 188ba39362fSChris Kay.. _Gerrit Code Review: https://www.gerritcodereview.com/ 18943f35ef5SPaul Beesley.. _Linaro Release Notes: https://community.arm.com/dev-platforms/w/docs/226/old-release-notes 19043f35ef5SPaul Beesley.. _Linaro instructions: https://community.arm.com/dev-platforms/w/docs/304/arm-reference-platforms-deliverables 19102cc2efbSHarrison Mutai.. _Arm-DS: https://developer.arm.com/Tools%20and%20Software/Arm%20Development%20Studio 19299a99eb4SZelalem.. _Linaro Release 20.01: http://releases.linaro.org/members/arm/platforms/20.01 19302cc2efbSHarrison Mutai.. _TrustedFirmware.org: https://www.trustedfirmware.org/ 194