blob: e2c527e72cf331a566c681f48e54c5fcb6709603 [file] [log] [blame]
Paul Beesleyd2fcc4e2019-05-29 13:59:40 +01001Prerequisites
2=============
3
4This document describes the software requirements for building |TF-A| for
5AArch32 and AArch64 target platforms.
6
7It may possible to build |TF-A| with combinations of software packages that are
8different from those listed below, however only the software described in this
9document can be officially supported.
10
11Build Host
12----------
13
14|TF-A| can be built using either a Linux or a Windows machine as the build host.
15
16A relatively recent Linux distribution is recommended for building |TF-A|. We
17have performed tests using Ubuntu 16.04 LTS (64-bit) but other distributions
18should also work fine as a base, provided that the necessary tools and libraries
19can be installed.
20
21.. _prerequisites_toolchain:
22
23Toolchain
24---------
25
26|TF-A| can be built with any of the following *cross-compiler* toolchains that
27target the Armv7-A or Armv8-A architectures:
28
Madhukar Pappireddyc0ba2482020-01-10 16:11:18 -060029- GCC >= 9.2-2019.12 (from the `Arm Developer website`_)
Paul Beesleyd2fcc4e2019-05-29 13:59:40 +010030- Clang >= 4.0
31- Arm Compiler >= 6.0
32
33In 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
45Software and Libraries
46----------------------
47
48The 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
54The following libraries must be available to build one or more components or
55supporting tools:
56
57- OpenSSL >= 1.0.1
58
59 Required to build the cert_create tool.
60
61The following libraries are required for Trusted Board Boot support:
62
Manish V Badarkhecaf657a2021-04-14 10:15:06 +010063- mbed TLS == 2.26.0 (tag: ``mbedtls-2.26.0``)
Paul Beesleyd2fcc4e2019-05-29 13:59:40 +010064
65These 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
78Package Installation (Linux)
79^^^^^^^^^^^^^^^^^^^^^^^^^^^^
80
81If you are using the recommended Ubuntu distribution then you can install the
82required packages with the following command:
83
84.. code:: shell
85
86 sudo apt install build-essential git libssl-dev
87
88The optional packages can be installed using:
89
90.. code:: shell
91
92 sudo apt install device-tree-compiler
93
94Supporting Files
95----------------
96
97TF-A has been tested with pre-built binaries and file systems from `Linaro
98Release 19.06`_. Alternatively, you can build the binaries from source using
99instructions in :ref:`Performing an Initial Build`.
100
101.. _prerequisites_get_source:
102
103Getting the TF-A Source
104-----------------------
105
106Source code for |TF-A| is maintained in a Git repository hosted on
107TrustedFirmware.org. To clone this repository from the server, run the following
108in your shell:
109
110.. code:: shell
111
112 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
114This will clone the Git repository also install a *commit hook* that
115automatically inserts appropriate *Change-Id:* lines at the end of your
116commit messages. These change IDs are required when committing changes that you
117intend to push for review via our Gerrit system.
118
119You can read more about Git hooks in the *githooks* page of the Git documentation,
120available at: https://git-scm.com/docs/githooks
121
122Alternatively, you can clone without the commit hook using:
123
124.. code:: shell
125
126 git clone "https://review.trustedfirmware.org/TF-A/trusted-firmware-a"
127
128--------------
129
130*Copyright (c) 2019, Arm Limited. All rights reserved.*
131
132.. _Arm Developer website: https://developer.arm.com/open-source/gnu-toolchain/gnu-a/downloads
133.. _Linaro Release Notes: https://community.arm.com/dev-platforms/w/docs/226/old-release-notes
134.. _Linaro instructions: https://community.arm.com/dev-platforms/w/docs/304/arm-reference-platforms-deliverables
135.. _Development Studio 5 (DS-5): https://developer.arm.com/products/software-development-tools/ds-5-development-studio
136.. _Linaro Release 19.06: http://releases.linaro.org/members/arm/platforms/19.06