Hugo L'Hostis | a342bfe | 2021-04-29 14:31:37 +0100 | [diff] [blame] | 1 | ########################## |
| 2 | Using docker to build TF-M |
| 3 | ########################## |
| 4 | |
| 5 | This tool has been made to provide an easy way to build the trusted firmware m |
| 6 | project without having to set up a whole working environment.The only tool |
| 7 | necessary is docker. |
| 8 | |
| 9 | ************************ |
| 10 | Configuration Parameters |
| 11 | ************************ |
| 12 | |
| 13 | The config file /config/container_cfg is used to set up the tool. the following |
| 14 | parameters 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 | ***************** |
| 35 | Building an image |
| 36 | ***************** |
| 37 | |
| 38 | To build the docker images (TFM_Core, TFM_Armclang and TFM_documentation), |
| 39 | launch the build_images.sh script. |
| 40 | |
| 41 | **************** |
| 42 | Running an image |
| 43 | **************** |
| 44 | |
| 45 | To launch a container, launch the corresponding run_xxx.sh script. Your local |
| 46 | TFM repo will be mounted in the containerand the generated files will be |
| 47 | available in your local TFM repo after the build. |
| 48 | |
| 49 | To launch a container and build TFM manually, use the following command : |
| 50 | |
| 51 | docker 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 | |
| 55 | Note : Armclang currently uses the ARMLTD_LICENSE_FILE variable which should |
| 56 | point to a license server. |
| 57 | |
| 58 | -------------- |
| 59 | |
| 60 | *Copyright (c) 2021, Arm Limited. All rights reserved.* |
Elena Uziunaite | bd4d7a9 | 2023-10-24 15:58:31 +0100 | [diff] [blame] | 61 | *SPDX-License-Identifier: BSD-3-Clause* |