blob: 1dab2b4f3c932e0fb2a9b34119be1567dda58f1f [file] [log] [blame]
Arthur Shefebfe862024-07-29 14:43:19 +08001#!/bin/sh
2
3set -e
4
Arthur She74d569d2024-08-15 10:57:22 +08005IAR_BINARY=$(echo $@ | grep -o "IAR_PACKAGE=.*" | sed "s/^.*=//")
6IAR_PACKAGE=${IAR_BINARY:-bxarm-9.40.2.deb}
Arthur Shed1af0682024-09-06 15:24:20 -07007IAR_ECR=${IAR_ECR:-local}
Arthur She0df05302024-07-30 16:37:56 +08008
Arthur Shefebfe862024-07-29 14:43:19 +08009trap cleanup_exit INT TERM EXIT
10
11cleanup_exit()
12{
13 rm -f *.list *.key
14}
15
16export LANG=C
17
18DISTRIBUTION=$(basename ${PWD} | cut -f1 -d '-')
19ARCHITECTURE=$(basename ${PWD} | cut -f2 -d '-')
20PROJECT="tf-m-iar"
21
22cp -a ../setup-sshd .
23
24# Copy armclang toolchains required for the build (previously fetched
25# from s3://trustedfirmware-private/armclang/ by build harness).
26cp ../ARMCompiler6.21_standalone_linux-x86_64.tar.gz .
27
Arthur She0df05302024-07-30 16:37:56 +080028# Copy IAR toolchains required for the build (previously fetched
29# from s3://trustedfirmware-iar by build harness).
30cp ../$IAR_PACKAGE .
31
Arthur Shed1af0682024-09-06 15:24:20 -070032image=${IAR_ECR}:${DISTRIBUTION}-tf-m-iar
Arthur Shea35c34a2024-07-29 15:30:47 +080033docker build $@ --pull --tag=$image .
Arthur Shefebfe862024-07-29 14:43:19 +080034echo $image > .docker-tag