prerequisites.rst 5.43 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Prerequisites
=============

This document describes the software requirements for building |TF-A| for
AArch32 and AArch64 target platforms.

It may possible to build |TF-A| with combinations of software packages that are
different from those listed below, however only the software described in this
document can be officially supported.

Build Host
----------

|TF-A| can be built using either a Linux or a Windows machine as the build host.

A relatively recent Linux distribution is recommended for building |TF-A|. We
have performed tests using Ubuntu 16.04 LTS (64-bit) but other distributions
should also work fine as a base, provided that the necessary tools and libraries
can be installed.

.. _prerequisites_toolchain:

Toolchain
---------

|TF-A| can be built with any of the following *cross-compiler* toolchains that
target the Armv7-A or Armv8-A architectures:

29
- GCC >= 9.2-2019.12 (from the `Arm Developer website`_)
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
- Clang >= 4.0
- Arm Compiler >= 6.0

In addition, a native compiler is required to build the supporting tools.

.. note::
   The software has also been built on Windows 7 Enterprise SP1, using CMD.EXE,
   Cygwin, and Msys (MinGW) shells, using version 5.3.1 of the GNU toolchain.

.. note::
   For instructions on how to select the cross compiler refer to
   :ref:`Performing an Initial Build`.

.. _prerequisites_software_and_libraries:

Software and Libraries
----------------------

The following tools are required to obtain and build |TF-A|:

- An appropriate toolchain (see :ref:`prerequisites_toolchain`)
- GNU Make
- Git

The following libraries must be available to build one or more components or
supporting tools:

- OpenSSL >= 1.0.1

   Required to build the cert_create tool.

The following libraries are required for Trusted Board Boot support:

63
- mbed TLS == 2.26.0 (tag: ``mbedtls-2.26.0``)
64
65
66
67
68
69
70
71
72
73
74
75
76
77

These tools are optional:

- Device Tree Compiler (DTC) >= 1.4.6

   Needed if you want to rebuild the provided Flattened Device Tree (FDT)
   source files (``.dts`` files). DTC is available for Linux through the package
   repositories of most distributions.

- Arm `Development Studio 5 (DS-5)`_

   The standard software package used for debugging software on Arm development
   platforms and |FVP| models.

78
79
80
81
82
83
- Node.js >= 14

   Highly recommended, and necessary in order to install and use the packaged
   Git hooks and helper tools. Without these tools you will need to rely on the
   CI for feedback on commit message conformance.

84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
Package Installation (Linux)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^

If you are using the recommended Ubuntu distribution then you can install the
required packages with the following command:

.. code:: shell

    sudo apt install build-essential git libssl-dev

The optional packages can be installed using:

.. code:: shell

    sudo apt install device-tree-compiler

100
101
102
103
104
105
106
107
108
109
110
Additionally, to install an up-to-date version of Node.js, you can use the `Node
Version Manager`_ to install a version of your choosing (we recommend 14, but
later LTS versions might offer a more stable experience):

.. code:: shell

    curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | "$SHELL"
    exec "$SHELL" -ic "nvm install 14; exec $SHELL"

.. _Node Version Manager: https://github.com/nvm-sh/nvm#install--update-script

111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
Supporting Files
----------------

TF-A has been tested with pre-built binaries and file systems from `Linaro
Release 19.06`_. Alternatively, you can build the binaries from source using
instructions in :ref:`Performing an Initial Build`.

.. _prerequisites_get_source:

Getting the TF-A Source
-----------------------

Source code for |TF-A| is maintained in a Git repository hosted on
TrustedFirmware.org. To clone this repository from the server, run the following
in your shell:

.. code:: shell

129
    git clone "https://review.trustedfirmware.org/TF-A/trusted-firmware-a"
130

131
132
Additional Steps for Contributors
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
133

134
135
If you are planning on contributing back to TF-A, there are some things you'll
want to know.
136

137
138
139
140
141
142
143
TF-A is hosted by a `Gerrit Code Review`_ server. Gerrit requires that all
commits include a ``Change-Id`` footer, and this footer is typically
automatically generated by a Git hook installed by you, the developer.

If you have Node.js installed already, you can automatically install this hook,
along with any additional hooks and Javascript-based tooling that we use, by
running from within your newly-cloned repository:
144
145
146

.. code:: shell

147
148
149
150
151
152
153
154
155
156
157
158
    npm install

If you have opted **not** to install Node.js, you can install the Gerrit hook
manually by running:

.. code:: shell

    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

You can read more about Git hooks in the *githooks* page of the Git
documentation, available `here <https://git-scm.com/docs/githooks>`_.
159
160
161

--------------

162
*Copyright (c) 2021, Arm Limited. All rights reserved.*
163
164

.. _Arm Developer website: https://developer.arm.com/open-source/gnu-toolchain/gnu-a/downloads
165
.. _Gerrit Code Review: https://www.gerritcodereview.com/
166
167
168
169
.. _Linaro Release Notes: https://community.arm.com/dev-platforms/w/docs/226/old-release-notes
.. _Linaro instructions: https://community.arm.com/dev-platforms/w/docs/304/arm-reference-platforms-deliverables
.. _Development Studio 5 (DS-5): https://developer.arm.com/products/software-development-tools/ds-5-development-studio
.. _Linaro Release 19.06: http://releases.linaro.org/members/arm/platforms/19.06