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 | |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 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 |
Boyan Karatotev | 60c168c | 2022-11-15 17:39:22 +0000 | [diff] [blame] | 17 | have performed tests using Ubuntu 20.04 LTS (64-bit) but other distributions |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 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 | |
Jayanth Dodderi Chidanand | 8b957ed | 2022-09-12 14:50:12 +0100 | [diff] [blame] | 29 | - GCC >= 11.3.Rel1 (from the `Arm Developer website`_) |
Boyan Karatotev | daf0ef6 | 2022-10-27 14:47:18 +0100 | [diff] [blame] | 30 | |
| 31 | You will need the targets ``arm-none-eabi`` and ``aarch64-none-elf`` for |
| 32 | AArch32 and AArch64 builds respectively. |
| 33 | |
Harrison Mutai | 38a293a | 2022-02-23 11:37:12 +0000 | [diff] [blame] | 34 | - Clang >= 14.0.0 |
| 35 | - Arm Compiler >= 6.18 |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 36 | |
| 37 | In addition, a native compiler is required to build the supporting tools. |
| 38 | |
| 39 | .. note:: |
| 40 | The software has also been built on Windows 7 Enterprise SP1, using CMD.EXE, |
| 41 | Cygwin, and Msys (MinGW) shells, using version 5.3.1 of the GNU toolchain. |
| 42 | |
| 43 | .. note:: |
| 44 | For instructions on how to select the cross compiler refer to |
| 45 | :ref:`Performing an Initial Build`. |
| 46 | |
| 47 | .. _prerequisites_software_and_libraries: |
| 48 | |
| 49 | Software and Libraries |
| 50 | ---------------------- |
| 51 | |
| 52 | The following tools are required to obtain and build |TF-A|: |
| 53 | |
| 54 | - An appropriate toolchain (see :ref:`prerequisites_toolchain`) |
| 55 | - GNU Make |
| 56 | - Git |
| 57 | |
| 58 | The following libraries must be available to build one or more components or |
| 59 | supporting tools: |
| 60 | |
Juan Pablo Conde | 3539c74 | 2022-10-25 19:41:02 -0400 | [diff] [blame] | 61 | - OpenSSL >= 1.1.1 (v3.0.0 to v3.0.6 highly discouraged due to security issues) |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 62 | |
Juan Pablo Conde | 3539c74 | 2022-10-25 19:41:02 -0400 | [diff] [blame] | 63 | Required to build the cert_create, encrypt_fw, and fiptool tools. |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 64 | |
Juan Pablo Conde | 5286552 | 2022-06-28 16:56:32 -0400 | [diff] [blame] | 65 | .. note:: |
| 66 | |
Juan Pablo Conde | 3539c74 | 2022-10-25 19:41:02 -0400 | [diff] [blame] | 67 | If using OpenSSL 3, older Linux versions may require it to be built from |
| 68 | source code, as it may not be available in the default package repositories. |
| 69 | Please refer to the OpenSSL project documentation for more information. |
Juan Pablo Conde | 5286552 | 2022-06-28 16:56:32 -0400 | [diff] [blame] | 70 | |
Sandrine Bailleux | 878a998 | 2022-04-22 15:47:31 +0200 | [diff] [blame] | 71 | The following libraries are required for Trusted Board Boot and Measured Boot |
| 72 | support: |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 73 | |
Daniel Boulby | 831e4bc | 2022-09-23 09:37:20 +0100 | [diff] [blame] | 74 | - mbed TLS == 2.28.1 (tag: ``mbedtls-2.28.1``) |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 75 | |
| 76 | These tools are optional: |
| 77 | |
| 78 | - Device Tree Compiler (DTC) >= 1.4.6 |
| 79 | |
| 80 | Needed if you want to rebuild the provided Flattened Device Tree (FDT) |
| 81 | source files (``.dts`` files). DTC is available for Linux through the package |
| 82 | repositories of most distributions. |
| 83 | |
Daniel Boulby | df83a83 | 2022-05-03 16:46:16 +0100 | [diff] [blame] | 84 | - Arm `Development Studio (Arm-DS)`_ |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 85 | |
| 86 | The standard software package used for debugging software on Arm development |
| 87 | platforms and |FVP| models. |
| 88 | |
Chris Kay | 32b292d | 2021-11-02 10:19:37 +0000 | [diff] [blame] | 89 | - Node.js >= 16 |
Chris Kay | 46e17f9 | 2020-12-09 12:56:27 +0000 | [diff] [blame] | 90 | |
| 91 | Highly recommended, and necessary in order to install and use the packaged |
| 92 | Git hooks and helper tools. Without these tools you will need to rely on the |
| 93 | CI for feedback on commit message conformance. |
| 94 | |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 95 | Package Installation (Linux) |
| 96 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 97 | |
| 98 | If you are using the recommended Ubuntu distribution then you can install the |
| 99 | required packages with the following command: |
| 100 | |
| 101 | .. code:: shell |
| 102 | |
Juan Pablo Conde | 5286552 | 2022-06-28 16:56:32 -0400 | [diff] [blame] | 103 | sudo apt install build-essential git |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 104 | |
| 105 | The optional packages can be installed using: |
| 106 | |
| 107 | .. code:: shell |
| 108 | |
| 109 | sudo apt install device-tree-compiler |
| 110 | |
Chris Kay | d855ae2 | 2022-10-10 14:34:23 +0100 | [diff] [blame] | 111 | Additionally, to install a version of Node.js compatible with TF-A's repository |
| 112 | scripts, you can use the `Node Version Manager`_. To install both NVM and an |
| 113 | appropriate version of Node.js, run the following **from the root directory of |
| 114 | the repository**: |
Chris Kay | 46e17f9 | 2020-12-09 12:56:27 +0000 | [diff] [blame] | 115 | |
| 116 | .. code:: shell |
| 117 | |
Chris Kay | d855ae2 | 2022-10-10 14:34:23 +0100 | [diff] [blame] | 118 | curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash |
| 119 | exec "$SHELL" -ic "nvm install; exec $SHELL" |
Chris Kay | 46e17f9 | 2020-12-09 12:56:27 +0000 | [diff] [blame] | 120 | |
| 121 | .. _Node Version Manager: https://github.com/nvm-sh/nvm#install--update-script |
| 122 | |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 123 | Supporting Files |
| 124 | ---------------- |
| 125 | |
| 126 | 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] | 127 | Release 20.01`_. Alternatively, you can build the binaries from source using |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 128 | instructions in :ref:`Performing an Initial Build`. |
| 129 | |
| 130 | .. _prerequisites_get_source: |
| 131 | |
| 132 | Getting the TF-A Source |
| 133 | ----------------------- |
| 134 | |
| 135 | Source code for |TF-A| is maintained in a Git repository hosted on |
| 136 | TrustedFirmware.org. To clone this repository from the server, run the following |
| 137 | in your shell: |
| 138 | |
| 139 | .. code:: shell |
| 140 | |
Chris Kay | 46e17f9 | 2020-12-09 12:56:27 +0000 | [diff] [blame] | 141 | git clone "https://review.trustedfirmware.org/TF-A/trusted-firmware-a" |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 142 | |
Chris Kay | 46e17f9 | 2020-12-09 12:56:27 +0000 | [diff] [blame] | 143 | Additional Steps for Contributors |
| 144 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 145 | |
Chris Kay | 46e17f9 | 2020-12-09 12:56:27 +0000 | [diff] [blame] | 146 | If you are planning on contributing back to TF-A, there are some things you'll |
| 147 | want to know. |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 148 | |
Chris Kay | 46e17f9 | 2020-12-09 12:56:27 +0000 | [diff] [blame] | 149 | TF-A is hosted by a `Gerrit Code Review`_ server. Gerrit requires that all |
| 150 | commits include a ``Change-Id`` footer, and this footer is typically |
| 151 | automatically generated by a Git hook installed by you, the developer. |
| 152 | |
| 153 | If you have Node.js installed already, you can automatically install this hook, |
| 154 | along with any additional hooks and Javascript-based tooling that we use, by |
| 155 | running from within your newly-cloned repository: |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 156 | |
| 157 | .. code:: shell |
| 158 | |
Chris Kay | 2ff006b | 2021-05-17 11:18:56 +0100 | [diff] [blame] | 159 | npm install --no-save |
Chris Kay | 46e17f9 | 2020-12-09 12:56:27 +0000 | [diff] [blame] | 160 | |
| 161 | If you have opted **not** to install Node.js, you can install the Gerrit hook |
| 162 | manually by running: |
| 163 | |
| 164 | .. code:: shell |
| 165 | |
| 166 | curl -Lo $(git rev-parse --git-dir)/hooks/commit-msg https://review.trustedfirmware.org/tools/hooks/commit-msg |
| 167 | chmod +x $(git rev-parse --git-dir)/hooks/commit-msg |
| 168 | |
| 169 | You can read more about Git hooks in the *githooks* page of the Git |
| 170 | documentation, available `here <https://git-scm.com/docs/githooks>`_. |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 171 | |
| 172 | -------------- |
| 173 | |
Harrison Mutai | 38a293a | 2022-02-23 11:37:12 +0000 | [diff] [blame] | 174 | *Copyright (c) 2021-2022, Arm Limited. All rights reserved.* |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 175 | |
Sandrine Bailleux | e356a18 | 2022-04-15 11:17:40 +0200 | [diff] [blame] | 176 | .. _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] | 177 | .. _Gerrit Code Review: https://www.gerritcodereview.com/ |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 178 | .. _Linaro Release Notes: https://community.arm.com/dev-platforms/w/docs/226/old-release-notes |
| 179 | .. _Linaro instructions: https://community.arm.com/dev-platforms/w/docs/304/arm-reference-platforms-deliverables |
Daniel Boulby | df83a83 | 2022-05-03 16:46:16 +0100 | [diff] [blame] | 180 | .. _Development Studio (Arm-DS): https://developer.arm.com/Tools%20and%20Software/Arm%20Development%20Studio |
Zelalem | c005fdf | 2021-06-01 17:05:16 -0500 | [diff] [blame] | 181 | .. _Linaro Release 20.01: http://releases.linaro.org/members/arm/platforms/20.01 |