prerequisites.rst 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. Prerequisites
  2. =============
  3. This document describes the software requirements for building |TF-A| for
  4. AArch32 and AArch64 target platforms.
  5. It may possible to build |TF-A| with combinations of software packages that are
  6. different from those listed below, however only the software described in this
  7. document can be officially supported.
  8. Getting the TF-A Source
  9. -----------------------
  10. Source code for |TF-A| is maintained in a Git repository hosted on
  11. `TrustedFirmware.org`_. To clone this repository from the server, run the following
  12. in your shell:
  13. .. code:: shell
  14. git clone "https://review.trustedfirmware.org/TF-A/trusted-firmware-a"
  15. Requirements
  16. ------------
  17. ======================== =====================
  18. Program Min supported version
  19. ======================== =====================
  20. Arm Compiler 6.18
  21. Arm GNU Compiler 13.3
  22. Clang/LLVM 11.0.0
  23. Device Tree Compiler 1.4.7
  24. GNU make 3.81
  25. mbed TLS\ [#f1]_ 3.6.1
  26. Node.js [#f2]_ 16
  27. OpenSSL 1.0.0
  28. Poetry 1.3.2
  29. QCBOR\ [#f3]_ 1.2
  30. Sphinx\ [#f2]_ 2.4.4
  31. ======================== =====================
  32. .. [#f1] Required for Trusted Board Boot and Measured Boot.
  33. .. [#f2] Required only for building TF-A documentation.
  34. .. [#f3] Required only when enabling DICE Protection Environment support.
  35. Toolchain
  36. ^^^^^^^^^
  37. |TF-A| can be compiled using any cross-compiler toolchain specified in the
  38. preceding table that target Armv7-A or Armv8-A. For AArch32 and
  39. AArch64 builds, the respective targets required are ``arm-none-eabi`` and
  40. ``aarch64-none-elf``.
  41. Testing has been performed with version 13.3.Rel1 (gcc 13.3) of the Arm
  42. GNU compiler, which can be installed from the `Arm Developer website`_.
  43. In addition, a native compiler is required to build supporting tools.
  44. .. note::
  45. Versions greater than the ones specified are likely but not guaranteed to
  46. work. This is predominantly because TF-A carries its own copy of compiler-rt,
  47. which may be older than the version expected by the compiler. Fixes and bug
  48. reports are always welcome.
  49. .. note::
  50. For instructions on how to select the cross compiler refer to
  51. :ref:`Performing an Initial Build`.
  52. OpenSSL
  53. ^^^^^^^
  54. OpenSSL is required to build the cert_create, encrypt_fw, and fiptool tools.
  55. If using OpenSSL 3, older Linux versions may require it to be built from
  56. source code, as it may not be available in the default package repositories.
  57. Please refer to the OpenSSL project documentation for more information.
  58. .. warning::
  59. Versions 1.0.x and from v3.0.0 up to v3.0.6 are strongly advised against due
  60. to concerns regarding security vulnerabilities!
  61. Device Tree Compiler (DTC)
  62. ^^^^^^^^^^^^^^^^^^^^^^^^^^
  63. Needed if you want to rebuild the provided Flattened Device Tree (FDT)
  64. source files (``.dts`` files). DTC is available for Linux through the package
  65. repositories of most distributions.
  66. Arm Development Studio (`Arm-DS`_)
  67. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  68. The standard software package used for debugging software on Arm development
  69. platforms and |FVP| models.
  70. Node.js
  71. ^^^^^^^
  72. Highly recommended, and necessary in order to install and use the packaged
  73. Git hooks and helper tools. Without these tools you will need to rely on the
  74. CI for feedback on commit message conformance.
  75. Poetry
  76. ^^^^^^
  77. Required for managing Python dependencies, this will allow you to reliably
  78. reproduce a Python environment to build documentation and run some of the
  79. integrated Python tools. Most importantly, it ensures your system environment
  80. will not be affected by dependencies in the Python scripts.
  81. For installation instructions, see the `official Poetry documentation`_.
  82. .. _prerequisites_software_and_libraries:
  83. Package Installation (Linux)
  84. ----------------------------
  85. |TF-A| can be compiled on both Linux and Windows-based machines.
  86. However, we strongly recommend using a UNIX-compatible build environment.
  87. Testing is performed using Ubuntu 22.04 LTS (64-bit), but other distributions
  88. should also work, provided the necessary tools and libraries are installed.
  89. The following are steps to install the required packages:
  90. .. code:: shell
  91. sudo apt install build-essential
  92. The optional packages can be installed using:
  93. .. code:: shell
  94. sudo apt install device-tree-compiler
  95. Additionally, to install a version of Node.js compatible with TF-A's repository
  96. scripts, you can use the `Node Version Manager`_. To install both NVM and an
  97. appropriate version of Node.js, run the following **from the root directory of
  98. the repository**:
  99. .. code:: shell
  100. curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
  101. exec "$SHELL" -ic "nvm install; exec $SHELL"
  102. .. _Node Version Manager: https://github.com/nvm-sh/nvm#install--update-script
  103. Supporting Files
  104. ----------------
  105. TF-A has been tested with pre-built binaries and file systems from `Linaro
  106. Release 20.01`_. Alternatively, you can build the binaries from source using
  107. instructions in :ref:`Performing an Initial Build`.
  108. .. _prerequisites_get_source:
  109. Additional Steps for Contributors
  110. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  111. If you are planning on contributing back to TF-A, there are some things you'll
  112. want to know.
  113. TF-A is hosted by a `Gerrit Code Review`_ server. Gerrit requires that all
  114. commits include a ``Change-Id`` footer, and this footer is typically
  115. automatically generated by a Git hook installed by you, the developer.
  116. If you have Node.js installed already, you can automatically install this hook,
  117. along with any additional hooks and Javascript-based tooling that we use, by
  118. running from within your newly-cloned repository:
  119. .. code:: shell
  120. npm install --no-save
  121. If you have opted **not** to install Node.js, you can install the Gerrit hook
  122. manually by running:
  123. .. code:: shell
  124. curl -Lo $(git rev-parse --git-dir)/hooks/commit-msg https://review.trustedfirmware.org/tools/hooks/commit-msg
  125. chmod +x $(git rev-parse --git-dir)/hooks/commit-msg
  126. You can read more about Git hooks in the *githooks* page of the Git
  127. documentation, available `here <https://git-scm.com/docs/githooks>`_.
  128. --------------
  129. *Copyright (c) 2021-2024, Arm Limited. All rights reserved.*
  130. .. _Arm Developer website: https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/downloads
  131. .. _Gerrit Code Review: https://www.gerritcodereview.com/
  132. .. _Linaro Release Notes: https://community.arm.com/dev-platforms/w/docs/226/old-release-notes
  133. .. _Linaro instructions: https://community.arm.com/dev-platforms/w/docs/304/arm-reference-platforms-deliverables
  134. .. _Arm-DS: https://developer.arm.com/Tools%20and%20Software/Arm%20Development%20Studio
  135. .. _Linaro Release 20.01: http://releases.linaro.org/members/arm/platforms/20.01
  136. .. _TrustedFirmware.org: https://www.trustedfirmware.org/
  137. .. _official Poetry documentation: https://python-poetry.org/docs/#installation