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. |
Sandrine Bailleux | b386f0a | 2022-07-11 10:53:42 +0200 | [diff] [blame] | 10 | |
Harrison Mutai | d7ceb9f | 2024-04-16 08:35:50 +0000 | [diff] [blame] | 11 | Getting the TF-A Source |
| 12 | ----------------------- |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 13 | |
Harrison Mutai | d7ceb9f | 2024-04-16 08:35:50 +0000 | [diff] [blame] | 14 | Source code for |TF-A| is maintained in a Git repository hosted on |
| 15 | `TrustedFirmware.org`_. To clone this repository from the server, run the following |
| 16 | in your shell: |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 17 | |
Harrison Mutai | d7ceb9f | 2024-04-16 08:35:50 +0000 | [diff] [blame] | 18 | .. code:: shell |
| 19 | |
| 20 | git clone "https://review.trustedfirmware.org/TF-A/trusted-firmware-a" |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 21 | |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 22 | |
Harrison Mutai | d7ceb9f | 2024-04-16 08:35:50 +0000 | [diff] [blame] | 23 | Requirements |
| 24 | ------------ |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 25 | |
Harrison Mutai | d7ceb9f | 2024-04-16 08:35:50 +0000 | [diff] [blame] | 26 | ======================== ===================== |
| 27 | Program Min supported version |
| 28 | ======================== ===================== |
| 29 | Arm Compiler 6.18 |
Jayanth Dodderi Chidanand | 76dc761 | 2024-09-30 18:18:25 +0100 | [diff] [blame] | 30 | Arm GNU Compiler 13.3 |
Harrison Mutai | d7ceb9f | 2024-04-16 08:35:50 +0000 | [diff] [blame] | 31 | Clang/LLVM 11.0.0 |
| 32 | Device Tree Compiler 1.4.7 |
| 33 | GNU make 3.81 |
Ryan Everett | 0f103b7 | 2024-09-13 14:11:21 +0100 | [diff] [blame] | 34 | mbed TLS\ [#f1]_ 3.6.1 |
Harrison Mutai | d7ceb9f | 2024-04-16 08:35:50 +0000 | [diff] [blame] | 35 | Node.js [#f2]_ 16 |
| 36 | OpenSSL 1.0.0 |
Chris Kay | e0af907 | 2024-11-13 15:32:10 +0000 | [diff] [blame] | 37 | Poetry 1.3.2 |
Harrison Mutai | d7ceb9f | 2024-04-16 08:35:50 +0000 | [diff] [blame] | 38 | QCBOR\ [#f3]_ 1.2 |
| 39 | Sphinx\ [#f2]_ 2.4.4 |
| 40 | ======================== ===================== |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 41 | |
Harrison Mutai | d7ceb9f | 2024-04-16 08:35:50 +0000 | [diff] [blame] | 42 | .. [#f1] Required for Trusted Board Boot and Measured Boot. |
| 43 | .. [#f2] Required only for building TF-A documentation. |
| 44 | .. [#f3] Required only when enabling DICE Protection Environment support. |
Boyan Karatotev | daf0ef6 | 2022-10-27 14:47:18 +0100 | [diff] [blame] | 45 | |
Harrison Mutai | d7ceb9f | 2024-04-16 08:35:50 +0000 | [diff] [blame] | 46 | Toolchain |
| 47 | ^^^^^^^^^ |
Boyan Karatotev | daf0ef6 | 2022-10-27 14:47:18 +0100 | [diff] [blame] | 48 | |
Harrison Mutai | d7ceb9f | 2024-04-16 08:35:50 +0000 | [diff] [blame] | 49 | |TF-A| can be compiled using any cross-compiler toolchain specified in the |
| 50 | preceding table that target Armv7-A or Armv8-A. For AArch32 and |
| 51 | AArch64 builds, the respective targets required are ``arm-none-eabi`` and |
| 52 | ``aarch64-none-elf``. |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 53 | |
Jayanth Dodderi Chidanand | 76dc761 | 2024-09-30 18:18:25 +0100 | [diff] [blame] | 54 | Testing has been performed with version 13.3.Rel1 (gcc 13.3) of the Arm |
Harrison Mutai | d7ceb9f | 2024-04-16 08:35:50 +0000 | [diff] [blame] | 55 | GNU compiler, which can be installed from the `Arm Developer website`_. |
| 56 | |
| 57 | In addition, a native compiler is required to build supporting tools. |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 58 | |
| 59 | .. note:: |
Boyan Karatotev | a4d03b7 | 2023-02-09 15:59:39 +0000 | [diff] [blame] | 60 | Versions greater than the ones specified are likely but not guaranteed to |
| 61 | work. This is predominantly because TF-A carries its own copy of compiler-rt, |
| 62 | which may be older than the version expected by the compiler. Fixes and bug |
| 63 | reports are always welcome. |
| 64 | |
| 65 | .. note:: |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 66 | For instructions on how to select the cross compiler refer to |
| 67 | :ref:`Performing an Initial Build`. |
| 68 | |
Harrison Mutai | d7ceb9f | 2024-04-16 08:35:50 +0000 | [diff] [blame] | 69 | OpenSSL |
| 70 | ^^^^^^^ |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 71 | |
Harrison Mutai | d7ceb9f | 2024-04-16 08:35:50 +0000 | [diff] [blame] | 72 | OpenSSL is required to build the cert_create, encrypt_fw, and fiptool tools. |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 73 | |
Harrison Mutai | d7ceb9f | 2024-04-16 08:35:50 +0000 | [diff] [blame] | 74 | If using OpenSSL 3, older Linux versions may require it to be built from |
| 75 | source code, as it may not be available in the default package repositories. |
| 76 | Please refer to the OpenSSL project documentation for more information. |
Juan Pablo Conde | 5286552 | 2022-06-28 16:56:32 -0400 | [diff] [blame] | 77 | |
Harrison Mutai | d7ceb9f | 2024-04-16 08:35:50 +0000 | [diff] [blame] | 78 | .. warning:: |
| 79 | Versions 1.0.x and from v3.0.0 up to v3.0.6 are strongly advised against due |
| 80 | to concerns regarding security vulnerabilities! |
Juan Pablo Conde | 5286552 | 2022-06-28 16:56:32 -0400 | [diff] [blame] | 81 | |
Harrison Mutai | d7ceb9f | 2024-04-16 08:35:50 +0000 | [diff] [blame] | 82 | Device Tree Compiler (DTC) |
| 83 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 84 | |
Harrison Mutai | d7ceb9f | 2024-04-16 08:35:50 +0000 | [diff] [blame] | 85 | Needed if you want to rebuild the provided Flattened Device Tree (FDT) |
| 86 | source files (``.dts`` files). DTC is available for Linux through the package |
| 87 | repositories of most distributions. |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 88 | |
Harrison Mutai | d7ceb9f | 2024-04-16 08:35:50 +0000 | [diff] [blame] | 89 | Arm Development Studio (`Arm-DS`_) |
| 90 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
Tamas Ban | 9e4a4f8 | 2023-06-06 13:58:21 +0200 | [diff] [blame] | 91 | |
Harrison Mutai | d7ceb9f | 2024-04-16 08:35:50 +0000 | [diff] [blame] | 92 | The standard software package used for debugging software on Arm development |
| 93 | platforms and |FVP| models. |
Tamas Ban | 9e4a4f8 | 2023-06-06 13:58:21 +0200 | [diff] [blame] | 94 | |
Harrison Mutai | d7ceb9f | 2024-04-16 08:35:50 +0000 | [diff] [blame] | 95 | Node.js |
| 96 | ^^^^^^^ |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 97 | |
Harrison Mutai | d7ceb9f | 2024-04-16 08:35:50 +0000 | [diff] [blame] | 98 | Highly recommended, and necessary in order to install and use the packaged |
| 99 | Git hooks and helper tools. Without these tools you will need to rely on the |
| 100 | CI for feedback on commit message conformance. |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 101 | |
Harrison Mutai | d7ceb9f | 2024-04-16 08:35:50 +0000 | [diff] [blame] | 102 | Poetry |
| 103 | ^^^^^^ |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 104 | |
Harrison Mutai | d7ceb9f | 2024-04-16 08:35:50 +0000 | [diff] [blame] | 105 | Required for managing Python dependencies, this will allow you to reliably |
Chris Kay | e0af907 | 2024-11-13 15:32:10 +0000 | [diff] [blame] | 106 | reproduce a Python environment to build documentation and run some of the |
| 107 | integrated Python tools. Most importantly, it ensures your system environment |
| 108 | will not be affected by dependencies in the Python scripts. |
| 109 | |
| 110 | For installation instructions, see the `official Poetry documentation`_. |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 111 | |
Harrison Mutai | d7ceb9f | 2024-04-16 08:35:50 +0000 | [diff] [blame] | 112 | .. _prerequisites_software_and_libraries: |
Chris Kay | 46e17f9 | 2020-12-09 12:56:27 +0000 | [diff] [blame] | 113 | |
Harrison Mutai | d7ceb9f | 2024-04-16 08:35:50 +0000 | [diff] [blame] | 114 | Package Installation (Linux) |
| 115 | ---------------------------- |
Harrison Mutai | b378ad4 | 2023-02-16 10:20:48 +0000 | [diff] [blame] | 116 | |
Harrison Mutai | d7ceb9f | 2024-04-16 08:35:50 +0000 | [diff] [blame] | 117 | |TF-A| can be compiled on both Linux and Windows-based machines. |
| 118 | However, we strongly recommend using a UNIX-compatible build environment. |
Harrison Mutai | b378ad4 | 2023-02-16 10:20:48 +0000 | [diff] [blame] | 119 | |
Harrison Mutai | d7ceb9f | 2024-04-16 08:35:50 +0000 | [diff] [blame] | 120 | Testing is performed using Ubuntu 22.04 LTS (64-bit), but other distributions |
| 121 | should also work, provided the necessary tools and libraries are installed. |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 122 | |
Harrison Mutai | d7ceb9f | 2024-04-16 08:35:50 +0000 | [diff] [blame] | 123 | The following are steps to install the required packages: |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 124 | |
| 125 | .. code:: shell |
| 126 | |
Harrison Mutai | d7ceb9f | 2024-04-16 08:35:50 +0000 | [diff] [blame] | 127 | sudo apt install build-essential |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 128 | |
| 129 | The optional packages can be installed using: |
| 130 | |
| 131 | .. code:: shell |
| 132 | |
| 133 | sudo apt install device-tree-compiler |
| 134 | |
Chris Kay | d855ae2 | 2022-10-10 14:34:23 +0100 | [diff] [blame] | 135 | Additionally, to install a version of Node.js compatible with TF-A's repository |
| 136 | scripts, you can use the `Node Version Manager`_. To install both NVM and an |
| 137 | appropriate version of Node.js, run the following **from the root directory of |
| 138 | the repository**: |
Chris Kay | 46e17f9 | 2020-12-09 12:56:27 +0000 | [diff] [blame] | 139 | |
| 140 | .. code:: shell |
| 141 | |
Chris Kay | d855ae2 | 2022-10-10 14:34:23 +0100 | [diff] [blame] | 142 | curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash |
| 143 | exec "$SHELL" -ic "nvm install; exec $SHELL" |
Chris Kay | 46e17f9 | 2020-12-09 12:56:27 +0000 | [diff] [blame] | 144 | |
| 145 | .. _Node Version Manager: https://github.com/nvm-sh/nvm#install--update-script |
| 146 | |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 147 | Supporting Files |
| 148 | ---------------- |
| 149 | |
| 150 | TF-A has been tested with pre-built binaries and file systems from `Linaro |
Zelalem | c005fdf | 2021-06-01 17:05:16 -0500 | [diff] [blame] | 151 | Release 20.01`_. Alternatively, you can build the binaries from source using |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 152 | instructions in :ref:`Performing an Initial Build`. |
| 153 | |
| 154 | .. _prerequisites_get_source: |
| 155 | |
Chris Kay | 46e17f9 | 2020-12-09 12:56:27 +0000 | [diff] [blame] | 156 | Additional Steps for Contributors |
| 157 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 158 | |
Chris Kay | 46e17f9 | 2020-12-09 12:56:27 +0000 | [diff] [blame] | 159 | If you are planning on contributing back to TF-A, there are some things you'll |
| 160 | want to know. |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 161 | |
Chris Kay | 46e17f9 | 2020-12-09 12:56:27 +0000 | [diff] [blame] | 162 | TF-A is hosted by a `Gerrit Code Review`_ server. Gerrit requires that all |
| 163 | commits include a ``Change-Id`` footer, and this footer is typically |
| 164 | automatically generated by a Git hook installed by you, the developer. |
| 165 | |
| 166 | If you have Node.js installed already, you can automatically install this hook, |
| 167 | along with any additional hooks and Javascript-based tooling that we use, by |
| 168 | running from within your newly-cloned repository: |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 169 | |
| 170 | .. code:: shell |
| 171 | |
Chris Kay | 2ff006b | 2021-05-17 11:18:56 +0100 | [diff] [blame] | 172 | npm install --no-save |
Chris Kay | 46e17f9 | 2020-12-09 12:56:27 +0000 | [diff] [blame] | 173 | |
| 174 | If you have opted **not** to install Node.js, you can install the Gerrit hook |
| 175 | manually by running: |
| 176 | |
| 177 | .. code:: shell |
| 178 | |
| 179 | curl -Lo $(git rev-parse --git-dir)/hooks/commit-msg https://review.trustedfirmware.org/tools/hooks/commit-msg |
| 180 | chmod +x $(git rev-parse --git-dir)/hooks/commit-msg |
| 181 | |
| 182 | You can read more about Git hooks in the *githooks* page of the Git |
| 183 | documentation, available `here <https://git-scm.com/docs/githooks>`_. |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 184 | |
| 185 | -------------- |
| 186 | |
Tamas Ban | 9e4a4f8 | 2023-06-06 13:58:21 +0200 | [diff] [blame] | 187 | *Copyright (c) 2021-2024, Arm Limited. All rights reserved.* |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 188 | |
Sandrine Bailleux | e356a18 | 2022-04-15 11:17:40 +0200 | [diff] [blame] | 189 | .. _Arm Developer website: https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/downloads |
Chris Kay | 46e17f9 | 2020-12-09 12:56:27 +0000 | [diff] [blame] | 190 | .. _Gerrit Code Review: https://www.gerritcodereview.com/ |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 191 | .. _Linaro Release Notes: https://community.arm.com/dev-platforms/w/docs/226/old-release-notes |
| 192 | .. _Linaro instructions: https://community.arm.com/dev-platforms/w/docs/304/arm-reference-platforms-deliverables |
Harrison Mutai | d7ceb9f | 2024-04-16 08:35:50 +0000 | [diff] [blame] | 193 | .. _Arm-DS: https://developer.arm.com/Tools%20and%20Software/Arm%20Development%20Studio |
Zelalem | c005fdf | 2021-06-01 17:05:16 -0500 | [diff] [blame] | 194 | .. _Linaro Release 20.01: http://releases.linaro.org/members/arm/platforms/20.01 |
Harrison Mutai | d7ceb9f | 2024-04-16 08:35:50 +0000 | [diff] [blame] | 195 | .. _TrustedFirmware.org: https://www.trustedfirmware.org/ |
Chris Kay | e0af907 | 2024-11-13 15:32:10 +0000 | [diff] [blame] | 196 | .. _official Poetry documentation: https://python-poetry.org/docs/#installation |