blob: e28dc13eec8e0aa74e667ff1dee8edb7291a7d15 [file] [log] [blame]
Hugo L'Hostisa342bfe2021-04-29 14:31:37 +01001##########################
2Using docker to build TF-M
3##########################
4
5This tool has been made to provide an easy way to build the trusted firmware m
6project without having to set up a whole working environment.The only tool
7necessary is docker.
8
9************************
10Configuration Parameters
11************************
12
13The config file /config/container_cfg is used to set up the tool. the following
14parameters are available :
15
16- CORE_IMG_NAME : Name of the main docker image running GNUARM
17- ARMCLANG_IMG_NAME : Name of the image using ARMCLANG. This image is based
18 on the core image.
19- DOCS_IMG_NAME : Name of the image used to build the documentation. This
20 image is based on the core image.
21- BUILD_DIR : Name of the directory where the build files will be generated. If
22 your current TFM repository has a directory named the same, it will be
23 deleted.
24- DOCS_DIR : Name of the directory where the documentation files will be
25 generated. If your current TFM repository has a directory named the same,
26 it will be deleted.
27
28- LOCAL_TFM_REPO : path to your local tfm repository. this parameter is
29 mandatory
30- PLATFORM : Name of the platform used for the TFM build.
31- ADDITIONNAL_PARAMETERS (optionnal) : additionnal parameters for the TFM
32 build.
33
34*****************
35Building an image
36*****************
37
38To build the docker images (TFM_Core, TFM_Armclang and TFM_documentation),
39launch the build_images.sh script.
40
41****************
42Running an image
43****************
44
45To launch a container, launch the corresponding run_xxx.sh script. Your local
46TFM repo will be mounted in the containerand the generated files will be
47available in your local TFM repo after the build.
48
49To launch a container and build TFM manually, use the following command :
50
51docker run -it --rm --user $(id -u):$(id -g) -v /etc/group:/etc/group:ro \
52 -v /etc/passwd:/etc/passwd:ro -v /etc/shadow:/etc/shadow:ro -v \
53 $LOCAL_TFM_REPO:/opt/trusted-firmware-m --entrypoint /bin/bash $CORE_IMG_NAME
54
55Note : Armclang currently uses the ARMLTD_LICENSE_FILE variable which should
56point to a license server.
57
58--------------
59
60*Copyright (c) 2021, Arm Limited. All rights reserved.*
Elena Uziunaitebd4d7a92023-10-24 15:58:31 +010061*SPDX-License-Identifier: BSD-3-Clause*