blob: c239bbb334e2f8036cdcd617afc0bca02b7d5215 [file] [log] [blame]
Dean Birch62c4f082020-01-17 16:13:26 +00001#!/bin/bash
2#-------------------------------------------------------------------------------
3# Copyright (c) 2020, Arm Limited and Contributors. All rights reserved.
4#
5# SPDX-License-Identifier: BSD-3-Clause
6#
7#-------------------------------------------------------------------------------
8
9#
10# Builds a single configuration on Trusted Firmware M.
11# Relies on environment variables pre-populated.
12# These variables can be obtained using configs.py.
13# Expected to have trusted-firmware-m cloned to same level as this git tree
14#
15
16set -ex
Dean Birchd0f9f8c2020-03-26 11:10:33 +000017
18if [ -z "$CONFIG_NAME" ] ; then
19 echo "Set CONFIG_NAME to run a build."
20 exit 1
21fi
22
23build_commands=$(python3 tf-m-ci-scripts/configs.py -b -g all $CONFIG_NAME)
24
25if [ -z "$build_commands" ] ; then
26 echo "No build commands found."
27 exit 1
28fi
29
Dean Birch62c4f082020-01-17 16:13:26 +000030mkdir trusted-firmware-m/build
31cd trusted-firmware-m/build
Dean Birchd0f9f8c2020-03-26 11:10:33 +000032
33eval "set -ex ; $build_commands"