xref: /rk3399_ARM-atf/docs/getting_started/prerequisites.rst (revision f35e5ab39cc9e107779a5bc673e6159cd119aee0)
143f35ef5SPaul BeesleyPrerequisites
243f35ef5SPaul Beesley=============
343f35ef5SPaul Beesley
443f35ef5SPaul BeesleyThis document describes the software requirements for building |TF-A| for
543f35ef5SPaul BeesleyAArch32 and AArch64 target platforms.
643f35ef5SPaul Beesley
743f35ef5SPaul BeesleyIt may possible to build |TF-A| with combinations of software packages that are
843f35ef5SPaul Beesleydifferent from those listed below, however only the software described in this
943f35ef5SPaul Beesleydocument can be officially supported.
1043f35ef5SPaul Beesley
1143f35ef5SPaul BeesleyBuild Host
1243f35ef5SPaul Beesley----------
1343f35ef5SPaul Beesley
1443f35ef5SPaul Beesley|TF-A| can be built using either a Linux or a Windows machine as the build host.
1543f35ef5SPaul Beesley
1643f35ef5SPaul BeesleyA relatively recent Linux distribution is recommended for building |TF-A|. We
1743f35ef5SPaul Beesleyhave performed tests using Ubuntu 16.04 LTS (64-bit) but other distributions
1843f35ef5SPaul Beesleyshould also work fine as a base, provided that the necessary tools and libraries
1943f35ef5SPaul Beesleycan be installed.
2043f35ef5SPaul Beesley
2143f35ef5SPaul Beesley.. _prerequisites_toolchain:
2243f35ef5SPaul Beesley
2343f35ef5SPaul BeesleyToolchain
2443f35ef5SPaul Beesley---------
2543f35ef5SPaul Beesley
2643f35ef5SPaul Beesley|TF-A| can be built with any of the following *cross-compiler* toolchains that
2743f35ef5SPaul Beesleytarget the Armv7-A or Armv8-A architectures:
2843f35ef5SPaul Beesley
29*f35e5ab3SMadhukar Pappireddy- GCC >= 9.2-2019.12 (from the `Arm Developer website`_)
3043f35ef5SPaul Beesley- Clang >= 4.0
3143f35ef5SPaul Beesley- Arm Compiler >= 6.0
3243f35ef5SPaul Beesley
3343f35ef5SPaul BeesleyIn addition, a native compiler is required to build the supporting tools.
3443f35ef5SPaul Beesley
3543f35ef5SPaul Beesley.. note::
3643f35ef5SPaul Beesley   The software has also been built on Windows 7 Enterprise SP1, using CMD.EXE,
3743f35ef5SPaul Beesley   Cygwin, and Msys (MinGW) shells, using version 5.3.1 of the GNU toolchain.
3843f35ef5SPaul Beesley
3943f35ef5SPaul Beesley.. note::
4043f35ef5SPaul Beesley   For instructions on how to select the cross compiler refer to
4143f35ef5SPaul Beesley   :ref:`Performing an Initial Build`.
4243f35ef5SPaul Beesley
4343f35ef5SPaul Beesley.. _prerequisites_software_and_libraries:
4443f35ef5SPaul Beesley
4543f35ef5SPaul BeesleySoftware and Libraries
4643f35ef5SPaul Beesley----------------------
4743f35ef5SPaul Beesley
4843f35ef5SPaul BeesleyThe following tools are required to obtain and build |TF-A|:
4943f35ef5SPaul Beesley
5043f35ef5SPaul Beesley- An appropriate toolchain (see :ref:`prerequisites_toolchain`)
5143f35ef5SPaul Beesley- GNU Make
5243f35ef5SPaul Beesley- Git
5343f35ef5SPaul Beesley
5443f35ef5SPaul BeesleyThe following libraries must be available to build one or more components or
5543f35ef5SPaul Beesleysupporting tools:
5643f35ef5SPaul Beesley
5743f35ef5SPaul Beesley- OpenSSL >= 1.0.1
5843f35ef5SPaul Beesley
5943f35ef5SPaul Beesley   Required to build the cert_create tool.
6043f35ef5SPaul Beesley
6143f35ef5SPaul BeesleyThe following libraries are required for Trusted Board Boot support:
6243f35ef5SPaul Beesley
6343f35ef5SPaul Beesley- mbed TLS == 2.16.2 (tag: ``mbedtls-2.16.2``)
6443f35ef5SPaul Beesley
6543f35ef5SPaul BeesleyThese tools are optional:
6643f35ef5SPaul Beesley
6743f35ef5SPaul Beesley- Device Tree Compiler (DTC) >= 1.4.6
6843f35ef5SPaul Beesley
6943f35ef5SPaul Beesley   Needed if you want to rebuild the provided Flattened Device Tree (FDT)
7043f35ef5SPaul Beesley   source files (``.dts`` files). DTC is available for Linux through the package
7143f35ef5SPaul Beesley   repositories of most distributions.
7243f35ef5SPaul Beesley
7343f35ef5SPaul Beesley- Arm `Development Studio 5 (DS-5)`_
7443f35ef5SPaul Beesley
7543f35ef5SPaul Beesley   The standard software package used for debugging software on Arm development
7643f35ef5SPaul Beesley   platforms and |FVP| models.
7743f35ef5SPaul Beesley
7843f35ef5SPaul BeesleyPackage Installation (Linux)
7943f35ef5SPaul Beesley^^^^^^^^^^^^^^^^^^^^^^^^^^^^
8043f35ef5SPaul Beesley
8143f35ef5SPaul BeesleyIf you are using the recommended Ubuntu distribution then you can install the
8243f35ef5SPaul Beesleyrequired packages with the following command:
8343f35ef5SPaul Beesley
8443f35ef5SPaul Beesley.. code:: shell
8543f35ef5SPaul Beesley
8643f35ef5SPaul Beesley    sudo apt install build-essential git libssl-dev
8743f35ef5SPaul Beesley
8843f35ef5SPaul BeesleyThe optional packages can be installed using:
8943f35ef5SPaul Beesley
9043f35ef5SPaul Beesley.. code:: shell
9143f35ef5SPaul Beesley
9243f35ef5SPaul Beesley    sudo apt install device-tree-compiler
9343f35ef5SPaul Beesley
9443f35ef5SPaul BeesleySupporting Files
9543f35ef5SPaul Beesley----------------
9643f35ef5SPaul Beesley
9743f35ef5SPaul BeesleyTF-A has been tested with pre-built binaries and file systems from `Linaro
9843f35ef5SPaul BeesleyRelease 19.06`_. Alternatively, you can build the binaries from source using
9943f35ef5SPaul Beesleyinstructions in :ref:`Performing an Initial Build`.
10043f35ef5SPaul Beesley
10143f35ef5SPaul Beesley.. _prerequisites_get_source:
10243f35ef5SPaul Beesley
10343f35ef5SPaul BeesleyGetting the TF-A Source
10443f35ef5SPaul Beesley-----------------------
10543f35ef5SPaul Beesley
10643f35ef5SPaul BeesleySource code for |TF-A| is maintained in a Git repository hosted on
10743f35ef5SPaul BeesleyTrustedFirmware.org. To clone this repository from the server, run the following
10843f35ef5SPaul Beesleyin your shell:
10943f35ef5SPaul Beesley
11043f35ef5SPaul Beesley.. code:: shell
11143f35ef5SPaul Beesley
11243f35ef5SPaul Beesley    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)
11343f35ef5SPaul Beesley
11443f35ef5SPaul BeesleyThis will clone the Git repository also install a *commit hook* that
11543f35ef5SPaul Beesleyautomatically inserts appropriate *Change-Id:* lines at the end of your
11643f35ef5SPaul Beesleycommit messages. These change IDs are required when committing changes that you
11743f35ef5SPaul Beesleyintend to push for review via our Gerrit system.
11843f35ef5SPaul Beesley
11943f35ef5SPaul BeesleyYou can read more about Git hooks in the *githooks* page of the Git documentation,
12043f35ef5SPaul Beesleyavailable at: https://git-scm.com/docs/githooks
12143f35ef5SPaul Beesley
12243f35ef5SPaul BeesleyAlternatively, you can clone without the commit hook using:
12343f35ef5SPaul Beesley
12443f35ef5SPaul Beesley.. code:: shell
12543f35ef5SPaul Beesley
12643f35ef5SPaul Beesley    git clone "https://review.trustedfirmware.org/TF-A/trusted-firmware-a"
12743f35ef5SPaul Beesley
12843f35ef5SPaul Beesley--------------
12943f35ef5SPaul Beesley
13043f35ef5SPaul Beesley*Copyright (c) 2019, Arm Limited. All rights reserved.*
13143f35ef5SPaul Beesley
13243f35ef5SPaul Beesley.. _Arm Developer website: https://developer.arm.com/open-source/gnu-toolchain/gnu-a/downloads
13343f35ef5SPaul Beesley.. _Linaro Release Notes: https://community.arm.com/dev-platforms/w/docs/226/old-release-notes
13443f35ef5SPaul Beesley.. _Linaro instructions: https://community.arm.com/dev-platforms/w/docs/304/arm-reference-platforms-deliverables
13543f35ef5SPaul Beesley.. _Development Studio 5 (DS-5): https://developer.arm.com/products/software-development-tools/ds-5-development-studio
13643f35ef5SPaul Beesley.. _Linaro Release 19.06: http://releases.linaro.org/members/arm/platforms/19.06
137