bionic-amd64-tf-a-build: Switch to use armclang's from S3 bucket
Arm Clang toolchains are no longer accessible via straight HTTP requests.
Instead, they are mirrored to an S3 bucket, files from which are made
available to build.sh, which in turn makes them available to Dockerfile.
Also, Arm Clang 6.8 is no longer accessible via the Arm download site,
so instead use 6.9.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Change-Id: I9639c49a1ba6cd44df03a546193af4a6498c23de
diff --git a/bionic-amd64-tf-a-build/Dockerfile b/bionic-amd64-tf-a-build/Dockerfile
index 2ca7c28..38916c3 100644
--- a/bionic-amd64-tf-a-build/Dockerfile
+++ b/bionic-amd64-tf-a-build/Dockerfile
@@ -61,6 +61,10 @@
COPY tf-*.install /tmp/
COPY setup-sshd /usr/sbin/setup-sshd
+# Copy armclang toolchains
+COPY DS500-BN-00026-r5p0-11rel0.tar.gz /tmp/
+COPY DS500-BN-00026-r5p0-19rel0.tar.gz /tmp/
+
RUN set -e ;\
echo 'locales locales/locales_to_be_generated multiselect C.UTF-8 UTF-8, en_US.UTF-8 UTF-8 ' | debconf-set-selections ;\
echo 'locales locales/default_environment_locale select en_US.UTF-8' | debconf-set-selections ;\
diff --git a/bionic-amd64-tf-a-build/build.sh b/bionic-amd64-tf-a-build/build.sh
index 311ec46..6e515c4 100755
--- a/bionic-amd64-tf-a-build/build.sh
+++ b/bionic-amd64-tf-a-build/build.sh
@@ -17,6 +17,10 @@
cp -a ../setup-sshd .
+# Copy armclang toolchains required for the build (previously fetched
+# from s3://trustedfirmware-private/armclang/ by build harness).
+cp ../DS500-BN-00026-r5p0-11rel0.tar.gz ../DS500-BN-00026-r5p0-19rel0.tar.gz .
+
image=trustedfirmware/ci-${ARCHITECTURE}-${PROJECT}-ubuntu:${DISTRIBUTION}${DOCKER_SUFFIX}
docker build --pull --no-cache --tag=$image .
echo $image > .docker-tag
diff --git a/bionic-amd64-tf-a-build/tf-dependencies.install b/bionic-amd64-tf-a-build/tf-dependencies.install
index 0472069..3c304f4 100755
--- a/bionic-amd64-tf-a-build/tf-dependencies.install
+++ b/bionic-amd64-tf-a-build/tf-dependencies.install
@@ -44,20 +44,27 @@
https://releases.linaro.org/components/toolchain/binaries/6.2-2016.11/aarch64-linux-gnu/gcc-linaro-6.2.1-2016.11-x86_64_aarch64-linux-gnu.tar.xz
tar -Jxf /tmp/gcc-linaro-x86_64_aarch64-linux-gnu.tar.xz -C ${TOOLS_DIR}
-# Install Arm Clang 6.8 toolchain (armclang)
+# 2022-11-11: No longer available at Arm download page
+## Install Arm Clang 6.8 toolchain (armclang)
+## NOTE: Toolchain is not available through PATH so to use it, CC should point to
+## CC=${TOOLS_DIR}/armclang-6.8/bin/armclang
+#mkdir -p /tmp/armclang-6.8
+#wget -O /tmp/DS500-BN-00026-r5p0-10rel0.tgz \
+# -q https://developer.arm.com/-/media/Files/downloads/compiler/DS500-BN-00026-r5p0-10rel0.tgz
+#tar -xf /tmp/DS500-BN-00026-r5p0-10rel0.tgz -C /tmp/armclang-6.8
+#/tmp/armclang-6.8/install_x86_64.sh --no-interactive --i-agree-to-the-contained-eula -d ${TOOLS_DIR}/armclang-6.8
+
+# This replaces unavailable Arm Clang 6.8 above
+# Install Arm Clang 6.9 toolchain (armclang)
# NOTE: Toolchain is not available through PATH so to use it, CC should point to
-# CC=${TOOLS_DIR}/armclang-6.8/bin/armclang
-mkdir -p /tmp/armclang-6.8
-wget -O /tmp/DS500-BN-00026-r5p0-10rel0.tgz \
- -q https://developer.arm.com/-/media/Files/downloads/compiler/DS500-BN-00026-r5p0-10rel0.tgz
-tar -xf /tmp/DS500-BN-00026-r5p0-10rel0.tgz -C /tmp/armclang-6.8
-/tmp/armclang-6.8/install_x86_64.sh --no-interactive --i-agree-to-the-contained-eula -d ${TOOLS_DIR}/armclang-6.8
+# CC=${TOOLS_DIR}/armclang-6.9/bin/armclang
+mkdir -p /tmp/armclang-6.9
+tar -xf /tmp/DS500-BN-00026-r5p0-11rel0.tar.gz -C /tmp/armclang-6.9
+/tmp/armclang-6.9/install_x86_64.sh --no-interactive --i-agree-to-the-contained-eula -d ${TOOLS_DIR}/armclang-6.9
# Install Arm Clang 6.17 toolchain (armclang)
mkdir -p /tmp/armclang-6.17
-wget -O /tmp/DS500-BN-00026-r5p0-19rel0.tgz \
- -q https://developer.arm.com/-/media/Files/downloads/compiler/DS500-BN-00026-r5p0-19rel0.tgz
-tar -xf /tmp/DS500-BN-00026-r5p0-19rel0.tgz -C /tmp/armclang-6.17
+tar -xf /tmp/DS500-BN-00026-r5p0-19rel0.tar.gz -C /tmp/armclang-6.17
/tmp/armclang-6.17/install_x86_64.sh --no-interactive --i-agree-to-the-contained-eula -d ${TOOLS_DIR}/armclang-6.17
# Install LLVM Clang toolchain (clang)