Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 1 | Prerequisites |
| 2 | ============= |
| 3 | |
| 4 | This document describes the software requirements for building |TF-A| for |
| 5 | AArch32 and AArch64 target platforms. |
| 6 | |
| 7 | It may possible to build |TF-A| with combinations of software packages that are |
| 8 | different from those listed below, however only the software described in this |
| 9 | document can be officially supported. |
| 10 | |
| 11 | Build Host |
| 12 | ---------- |
| 13 | |
| 14 | |TF-A| can be built using either a Linux or a Windows machine as the build host. |
| 15 | |
| 16 | A relatively recent Linux distribution is recommended for building |TF-A|. We |
| 17 | have performed tests using Ubuntu 16.04 LTS (64-bit) but other distributions |
| 18 | should also work fine as a base, provided that the necessary tools and libraries |
| 19 | can be installed. |
| 20 | |
| 21 | .. _prerequisites_toolchain: |
| 22 | |
| 23 | Toolchain |
| 24 | --------- |
| 25 | |
| 26 | |TF-A| can be built with any of the following *cross-compiler* toolchains that |
| 27 | target the Armv7-A or Armv8-A architectures: |
| 28 | |
Madhukar Pappireddy | c0ba248 | 2020-01-10 16:11:18 -0600 | [diff] [blame] | 29 | - GCC >= 9.2-2019.12 (from the `Arm Developer website`_) |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 30 | - Clang >= 4.0 |
| 31 | - Arm Compiler >= 6.0 |
| 32 | |
| 33 | In addition, a native compiler is required to build the supporting tools. |
| 34 | |
| 35 | .. note:: |
| 36 | The software has also been built on Windows 7 Enterprise SP1, using CMD.EXE, |
| 37 | Cygwin, and Msys (MinGW) shells, using version 5.3.1 of the GNU toolchain. |
| 38 | |
| 39 | .. note:: |
| 40 | For instructions on how to select the cross compiler refer to |
| 41 | :ref:`Performing an Initial Build`. |
| 42 | |
| 43 | .. _prerequisites_software_and_libraries: |
| 44 | |
| 45 | Software and Libraries |
| 46 | ---------------------- |
| 47 | |
| 48 | The following tools are required to obtain and build |TF-A|: |
| 49 | |
| 50 | - An appropriate toolchain (see :ref:`prerequisites_toolchain`) |
| 51 | - GNU Make |
| 52 | - Git |
| 53 | |
| 54 | The following libraries must be available to build one or more components or |
| 55 | supporting tools: |
| 56 | |
| 57 | - OpenSSL >= 1.0.1 |
| 58 | |
| 59 | Required to build the cert_create tool. |
| 60 | |
| 61 | The following libraries are required for Trusted Board Boot support: |
| 62 | |
Manish V Badarkhe | caf657a | 2021-04-14 10:15:06 +0100 | [diff] [blame] | 63 | - mbed TLS == 2.26.0 (tag: ``mbedtls-2.26.0``) |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 64 | |
| 65 | These tools are optional: |
| 66 | |
| 67 | - Device Tree Compiler (DTC) >= 1.4.6 |
| 68 | |
| 69 | Needed if you want to rebuild the provided Flattened Device Tree (FDT) |
| 70 | source files (``.dts`` files). DTC is available for Linux through the package |
| 71 | repositories of most distributions. |
| 72 | |
| 73 | - Arm `Development Studio 5 (DS-5)`_ |
| 74 | |
| 75 | The standard software package used for debugging software on Arm development |
| 76 | platforms and |FVP| models. |
| 77 | |
Chris Kay | 46e17f9 | 2020-12-09 12:56:27 +0000 | [diff] [blame] | 78 | - Node.js >= 14 |
| 79 | |
| 80 | Highly recommended, and necessary in order to install and use the packaged |
| 81 | Git hooks and helper tools. Without these tools you will need to rely on the |
| 82 | CI for feedback on commit message conformance. |
| 83 | |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 84 | Package Installation (Linux) |
| 85 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 86 | |
| 87 | If you are using the recommended Ubuntu distribution then you can install the |
| 88 | required packages with the following command: |
| 89 | |
| 90 | .. code:: shell |
| 91 | |
| 92 | sudo apt install build-essential git libssl-dev |
| 93 | |
| 94 | The optional packages can be installed using: |
| 95 | |
| 96 | .. code:: shell |
| 97 | |
| 98 | sudo apt install device-tree-compiler |
| 99 | |
Chris Kay | 46e17f9 | 2020-12-09 12:56:27 +0000 | [diff] [blame] | 100 | Additionally, to install an up-to-date version of Node.js, you can use the `Node |
| 101 | Version Manager`_ to install a version of your choosing (we recommend 14, but |
| 102 | later LTS versions might offer a more stable experience): |
| 103 | |
| 104 | .. code:: shell |
| 105 | |
| 106 | curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | "$SHELL" |
| 107 | exec "$SHELL" -ic "nvm install 14; exec $SHELL" |
| 108 | |
| 109 | .. _Node Version Manager: https://github.com/nvm-sh/nvm#install--update-script |
| 110 | |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 111 | Supporting Files |
| 112 | ---------------- |
| 113 | |
| 114 | TF-A has been tested with pre-built binaries and file systems from `Linaro |
| 115 | Release 19.06`_. Alternatively, you can build the binaries from source using |
| 116 | instructions in :ref:`Performing an Initial Build`. |
| 117 | |
| 118 | .. _prerequisites_get_source: |
| 119 | |
| 120 | Getting the TF-A Source |
| 121 | ----------------------- |
| 122 | |
| 123 | Source code for |TF-A| is maintained in a Git repository hosted on |
| 124 | TrustedFirmware.org. To clone this repository from the server, run the following |
| 125 | in your shell: |
| 126 | |
| 127 | .. code:: shell |
| 128 | |
Chris Kay | 46e17f9 | 2020-12-09 12:56:27 +0000 | [diff] [blame] | 129 | git clone "https://review.trustedfirmware.org/TF-A/trusted-firmware-a" |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 130 | |
Chris Kay | 46e17f9 | 2020-12-09 12:56:27 +0000 | [diff] [blame] | 131 | Additional Steps for Contributors |
| 132 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 133 | |
Chris Kay | 46e17f9 | 2020-12-09 12:56:27 +0000 | [diff] [blame] | 134 | If you are planning on contributing back to TF-A, there are some things you'll |
| 135 | want to know. |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 136 | |
Chris Kay | 46e17f9 | 2020-12-09 12:56:27 +0000 | [diff] [blame] | 137 | TF-A is hosted by a `Gerrit Code Review`_ server. Gerrit requires that all |
| 138 | commits include a ``Change-Id`` footer, and this footer is typically |
| 139 | automatically generated by a Git hook installed by you, the developer. |
| 140 | |
| 141 | If you have Node.js installed already, you can automatically install this hook, |
| 142 | along with any additional hooks and Javascript-based tooling that we use, by |
| 143 | running from within your newly-cloned repository: |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 144 | |
| 145 | .. code:: shell |
| 146 | |
Chris Kay | 46e17f9 | 2020-12-09 12:56:27 +0000 | [diff] [blame] | 147 | npm install |
| 148 | |
| 149 | If you have opted **not** to install Node.js, you can install the Gerrit hook |
| 150 | manually by running: |
| 151 | |
| 152 | .. code:: shell |
| 153 | |
| 154 | curl -Lo $(git rev-parse --git-dir)/hooks/commit-msg https://review.trustedfirmware.org/tools/hooks/commit-msg |
| 155 | chmod +x $(git rev-parse --git-dir)/hooks/commit-msg |
| 156 | |
| 157 | You can read more about Git hooks in the *githooks* page of the Git |
| 158 | documentation, available `here <https://git-scm.com/docs/githooks>`_. |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 159 | |
| 160 | -------------- |
| 161 | |
Chris Kay | 46e17f9 | 2020-12-09 12:56:27 +0000 | [diff] [blame] | 162 | *Copyright (c) 2021, Arm Limited. All rights reserved.* |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 163 | |
| 164 | .. _Arm Developer website: https://developer.arm.com/open-source/gnu-toolchain/gnu-a/downloads |
Chris Kay | 46e17f9 | 2020-12-09 12:56:27 +0000 | [diff] [blame] | 165 | .. _Gerrit Code Review: https://www.gerritcodereview.com/ |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 166 | .. _Linaro Release Notes: https://community.arm.com/dev-platforms/w/docs/226/old-release-notes |
| 167 | .. _Linaro instructions: https://community.arm.com/dev-platforms/w/docs/304/arm-reference-platforms-deliverables |
| 168 | .. _Development Studio 5 (DS-5): https://developer.arm.com/products/software-development-tools/ds-5-development-studio |
| 169 | .. _Linaro Release 19.06: http://releases.linaro.org/members/arm/platforms/19.06 |