Leonardo Sandoval | 9dfdd1b | 2020-08-06 17:08:11 -0500 | [diff] [blame] | 1 | #!/usr/bin/env bash |
Fathi Boudra | 422bf77 | 2019-12-02 11:10:16 +0200 | [diff] [blame] | 2 | # |
Zelalem | 917b43e | 2020-08-04 11:39:55 -0500 | [diff] [blame] | 3 | # Copyright (c) 2019-2020, Arm Limited. All rights reserved. |
Fathi Boudra | 422bf77 | 2019-12-02 11:10:16 +0200 | [diff] [blame] | 4 | # |
| 5 | # SPDX-License-Identifier: BSD-3-Clause |
| 6 | # |
| 7 | |
| 8 | ci_root="$(readlink -f "$(dirname "$0")/../..")" |
| 9 | source "$ci_root/utils.sh" |
| 10 | |
| 11 | cd optee |
Zelalem | 917b43e | 2020-08-04 11:39:55 -0500 | [diff] [blame] | 12 | |
| 13 | # Setting up Python virtual environment with pyelftools and pycrypto |
| 14 | python3 -m venv python_virtualenv |
| 15 | source python_virtualenv/bin/activate |
| 16 | |
| 17 | # wheel is not specified as pycrypto dependency but it is necessary for |
| 18 | # installing it. |
| 19 | pip install wheel |
| 20 | pip install pyelftools pycrypto |
| 21 | |
| 22 | make PLATFORM=vexpress \ |
| 23 | PLATFORM_FLAVOR="${PLATFORM_FLAVOR:?}" \ |
| 24 | CFG_ARM64_core=y \ |
| 25 | CROSS_COMPILE32=arm-none-eabi- |
| 26 | |
| 27 | # Deactivating Python virtual environment |
| 28 | deactivate |
Fathi Boudra | 422bf77 | 2019-12-02 11:10:16 +0200 | [diff] [blame] | 29 | |
| 30 | # Remove header from tee.bin |
Zelalem | 917b43e | 2020-08-04 11:39:55 -0500 | [diff] [blame] | 31 | aarch64-none-elf-objcopy -O binary \ |
Fathi Boudra | 422bf77 | 2019-12-02 11:10:16 +0200 | [diff] [blame] | 32 | out/arm-plat-vexpress/core/tee.elf out/arm-plat-vexpress/core/tee.bin |
| 33 | |
| 34 | # Gather files to export in a single directory |
| 35 | mkdir -p "$workspace/artefacts" |
| 36 | cp out/arm-plat-vexpress/core/tee.bin "$workspace/artefacts" |