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