1*43f35ef5SPaul BeesleyPrerequisites 2*43f35ef5SPaul Beesley============= 3*43f35ef5SPaul Beesley 4*43f35ef5SPaul BeesleyThis document describes the software requirements for building |TF-A| for 5*43f35ef5SPaul BeesleyAArch32 and AArch64 target platforms. 6*43f35ef5SPaul Beesley 7*43f35ef5SPaul BeesleyIt may possible to build |TF-A| with combinations of software packages that are 8*43f35ef5SPaul Beesleydifferent from those listed below, however only the software described in this 9*43f35ef5SPaul Beesleydocument can be officially supported. 10*43f35ef5SPaul Beesley 11*43f35ef5SPaul BeesleyBuild Host 12*43f35ef5SPaul Beesley---------- 13*43f35ef5SPaul Beesley 14*43f35ef5SPaul Beesley|TF-A| can be built using either a Linux or a Windows machine as the build host. 15*43f35ef5SPaul Beesley 16*43f35ef5SPaul BeesleyA relatively recent Linux distribution is recommended for building |TF-A|. We 17*43f35ef5SPaul Beesleyhave performed tests using Ubuntu 16.04 LTS (64-bit) but other distributions 18*43f35ef5SPaul Beesleyshould also work fine as a base, provided that the necessary tools and libraries 19*43f35ef5SPaul Beesleycan be installed. 20*43f35ef5SPaul Beesley 21*43f35ef5SPaul Beesley.. _prerequisites_toolchain: 22*43f35ef5SPaul Beesley 23*43f35ef5SPaul BeesleyToolchain 24*43f35ef5SPaul Beesley--------- 25*43f35ef5SPaul Beesley 26*43f35ef5SPaul Beesley|TF-A| can be built with any of the following *cross-compiler* toolchains that 27*43f35ef5SPaul Beesleytarget the Armv7-A or Armv8-A architectures: 28*43f35ef5SPaul Beesley 29*43f35ef5SPaul Beesley- GCC >= 8.3-2019.03 (from the `Arm Developer website`_) 30*43f35ef5SPaul Beesley- Clang >= 4.0 31*43f35ef5SPaul Beesley- Arm Compiler >= 6.0 32*43f35ef5SPaul Beesley 33*43f35ef5SPaul BeesleyIn addition, a native compiler is required to build the supporting tools. 34*43f35ef5SPaul Beesley 35*43f35ef5SPaul Beesley.. note:: 36*43f35ef5SPaul Beesley The software has also been built on Windows 7 Enterprise SP1, using CMD.EXE, 37*43f35ef5SPaul Beesley Cygwin, and Msys (MinGW) shells, using version 5.3.1 of the GNU toolchain. 38*43f35ef5SPaul Beesley 39*43f35ef5SPaul Beesley.. note:: 40*43f35ef5SPaul Beesley For instructions on how to select the cross compiler refer to 41*43f35ef5SPaul Beesley :ref:`Performing an Initial Build`. 42*43f35ef5SPaul Beesley 43*43f35ef5SPaul Beesley.. _prerequisites_software_and_libraries: 44*43f35ef5SPaul Beesley 45*43f35ef5SPaul BeesleySoftware and Libraries 46*43f35ef5SPaul Beesley---------------------- 47*43f35ef5SPaul Beesley 48*43f35ef5SPaul BeesleyThe following tools are required to obtain and build |TF-A|: 49*43f35ef5SPaul Beesley 50*43f35ef5SPaul Beesley- An appropriate toolchain (see :ref:`prerequisites_toolchain`) 51*43f35ef5SPaul Beesley- GNU Make 52*43f35ef5SPaul Beesley- Git 53*43f35ef5SPaul Beesley 54*43f35ef5SPaul BeesleyThe following libraries must be available to build one or more components or 55*43f35ef5SPaul Beesleysupporting tools: 56*43f35ef5SPaul Beesley 57*43f35ef5SPaul Beesley- OpenSSL >= 1.0.1 58*43f35ef5SPaul Beesley 59*43f35ef5SPaul Beesley Required to build the cert_create tool. 60*43f35ef5SPaul Beesley 61*43f35ef5SPaul BeesleyThe following libraries are required for Trusted Board Boot support: 62*43f35ef5SPaul Beesley 63*43f35ef5SPaul Beesley- mbed TLS == 2.16.2 (tag: ``mbedtls-2.16.2``) 64*43f35ef5SPaul Beesley 65*43f35ef5SPaul BeesleyThese tools are optional: 66*43f35ef5SPaul Beesley 67*43f35ef5SPaul Beesley- Device Tree Compiler (DTC) >= 1.4.6 68*43f35ef5SPaul Beesley 69*43f35ef5SPaul Beesley Needed if you want to rebuild the provided Flattened Device Tree (FDT) 70*43f35ef5SPaul Beesley source files (``.dts`` files). DTC is available for Linux through the package 71*43f35ef5SPaul Beesley repositories of most distributions. 72*43f35ef5SPaul Beesley 73*43f35ef5SPaul Beesley- Arm `Development Studio 5 (DS-5)`_ 74*43f35ef5SPaul Beesley 75*43f35ef5SPaul Beesley The standard software package used for debugging software on Arm development 76*43f35ef5SPaul Beesley platforms and |FVP| models. 77*43f35ef5SPaul Beesley 78*43f35ef5SPaul BeesleyPackage Installation (Linux) 79*43f35ef5SPaul Beesley^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 80*43f35ef5SPaul Beesley 81*43f35ef5SPaul BeesleyIf you are using the recommended Ubuntu distribution then you can install the 82*43f35ef5SPaul Beesleyrequired packages with the following command: 83*43f35ef5SPaul Beesley 84*43f35ef5SPaul Beesley.. code:: shell 85*43f35ef5SPaul Beesley 86*43f35ef5SPaul Beesley sudo apt install build-essential git libssl-dev 87*43f35ef5SPaul Beesley 88*43f35ef5SPaul BeesleyThe optional packages can be installed using: 89*43f35ef5SPaul Beesley 90*43f35ef5SPaul Beesley.. code:: shell 91*43f35ef5SPaul Beesley 92*43f35ef5SPaul Beesley sudo apt install device-tree-compiler 93*43f35ef5SPaul Beesley 94*43f35ef5SPaul BeesleySupporting Files 95*43f35ef5SPaul Beesley---------------- 96*43f35ef5SPaul Beesley 97*43f35ef5SPaul BeesleyTF-A has been tested with pre-built binaries and file systems from `Linaro 98*43f35ef5SPaul BeesleyRelease 19.06`_. Alternatively, you can build the binaries from source using 99*43f35ef5SPaul Beesleyinstructions in :ref:`Performing an Initial Build`. 100*43f35ef5SPaul Beesley 101*43f35ef5SPaul Beesley.. _prerequisites_get_source: 102*43f35ef5SPaul Beesley 103*43f35ef5SPaul BeesleyGetting the TF-A Source 104*43f35ef5SPaul Beesley----------------------- 105*43f35ef5SPaul Beesley 106*43f35ef5SPaul BeesleySource code for |TF-A| is maintained in a Git repository hosted on 107*43f35ef5SPaul BeesleyTrustedFirmware.org. To clone this repository from the server, run the following 108*43f35ef5SPaul Beesleyin your shell: 109*43f35ef5SPaul Beesley 110*43f35ef5SPaul Beesley.. code:: shell 111*43f35ef5SPaul Beesley 112*43f35ef5SPaul Beesley git clone "https://review.trustedfirmware.org/TF-A/trusted-firmware-a" && (cd "trusted-firmware-a" && mkdir -p .git/hooks && curl -Lo `git rev-parse --git-dir`/hooks/commit-msg https://review.trustedfirmware.org/tools/hooks/commit-msg; chmod +x `git rev-parse --git-dir`/hooks/commit-msg) 113*43f35ef5SPaul Beesley 114*43f35ef5SPaul BeesleyThis will clone the Git repository also install a *commit hook* that 115*43f35ef5SPaul Beesleyautomatically inserts appropriate *Change-Id:* lines at the end of your 116*43f35ef5SPaul Beesleycommit messages. These change IDs are required when committing changes that you 117*43f35ef5SPaul Beesleyintend to push for review via our Gerrit system. 118*43f35ef5SPaul Beesley 119*43f35ef5SPaul BeesleyYou can read more about Git hooks in the *githooks* page of the Git documentation, 120*43f35ef5SPaul Beesleyavailable at: https://git-scm.com/docs/githooks 121*43f35ef5SPaul Beesley 122*43f35ef5SPaul BeesleyAlternatively, you can clone without the commit hook using: 123*43f35ef5SPaul Beesley 124*43f35ef5SPaul Beesley.. code:: shell 125*43f35ef5SPaul Beesley 126*43f35ef5SPaul Beesley git clone "https://review.trustedfirmware.org/TF-A/trusted-firmware-a" 127*43f35ef5SPaul Beesley 128*43f35ef5SPaul Beesley-------------- 129*43f35ef5SPaul Beesley 130*43f35ef5SPaul Beesley*Copyright (c) 2019, Arm Limited. All rights reserved.* 131*43f35ef5SPaul Beesley 132*43f35ef5SPaul Beesley.. _Arm Developer website: https://developer.arm.com/open-source/gnu-toolchain/gnu-a/downloads 133*43f35ef5SPaul Beesley.. _Linaro Release Notes: https://community.arm.com/dev-platforms/w/docs/226/old-release-notes 134*43f35ef5SPaul Beesley.. _Linaro instructions: https://community.arm.com/dev-platforms/w/docs/304/arm-reference-platforms-deliverables 135*43f35ef5SPaul Beesley.. _Development Studio 5 (DS-5): https://developer.arm.com/products/software-development-tools/ds-5-development-studio 136*43f35ef5SPaul Beesley.. _Linaro Release 19.06: http://releases.linaro.org/members/arm/platforms/19.06 137