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