summaryrefslogtreecommitdiff
path: root/tf-a-builder
diff options
context:
space:
mode:
authorLeonardo Sandoval <leonardo.sandoval@linaro.org>2020-07-28 13:48:59 -0500
committerLeonardo Sandoval <leonardo.sandoval@linaro.org>2020-07-28 14:04:25 -0500
commit03d9e71acad124e6c98d55a64f2b82d202996d7b (patch)
tree9d5382d5ab2c2da1aa890544e677ce95243e54e7 /tf-a-builder
parent196c8fef5f9674fa0810e40e54c8fd18f89ec05a (diff)
install linaro toolchain aarch64-linux-gnu version 6.2-2016-11
Besides installing the Linaro toolchain, it does some refactor of toolchain installation, turning into two functions: one install Linaro toolchains and a second the ARM ones. For the moment, the only Linaro Toolchain considered is aarch64-linux-gnu, but code allows to easily include another one in the future. The new toolchain is included into PATH, so no need to provide absolute path but if it is strictly needed, one can use it direclty: <WORKSPACE>/gcc-linaro-6.2.1-2016.11-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc or through the common environment variable CROSS_COMPILE export CROSS_COMPILE=<WORKSPACE>/gcc-linaro-6.2.1-2016.11-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu- Change-Id: Ibc109aff4e3d9c553ad107595511573bb318a63b Signed-off-by: Leonardo Sandoval <leonardo.sandoval@linaro.org>
Diffstat (limited to 'tf-a-builder')
-rwxr-xr-xtf-a-builder/builders.sh77
1 files changed, 57 insertions, 20 deletions
diff --git a/tf-a-builder/builders.sh b/tf-a-builder/builders.sh
index 7b2e4eb..b47f34c 100755
--- a/tf-a-builder/builders.sh
+++ b/tf-a-builder/builders.sh
@@ -2,6 +2,60 @@
set -ex
+# Toolchains from Linaro Releases: https://releases.linaro.org/components/toolchain/binaries
+function install-linaro-toolchains() {
+ local TC_VERSION="6.2-2016.11"
+ local TC_FULL_VERSION="6.2.1-2016.11"
+ local TC_URL="https://releases.linaro.org/components/toolchain/binaries/${TC_VERSION}"
+ local TC_AARCH64="gcc-linaro-${TC_FULL_VERSION}-x86_64_aarch64-linux-gnu.tar.xz"
+
+ # Install toolchains
+ for TC in ${TC_AARCH64}; do
+ cd ${WORKSPACE}
+ case $TC in
+ *aarch64-linux-gnu*)
+ TC_URL_INFIX=aarch64-linux-gnu
+ ;;
+ *)
+ echo "Invalid Toolchain \"$TC\" and not appended in PATH"
+ continue
+ ;;
+ esac
+ curl -sLSO -C - ${TC_URL}/${TC_URL_INFIX}/${TC}
+ tar -Jxf ${TC}
+ cd ${WORKSPACE}/${TC%.tar.xz}/bin
+ export PATH=${PWD}:${PATH}
+ done
+
+ # Basic TC checks
+ for param in -dumpmachine --version -v; do
+ aarch64-linux-gnu-gcc ${param}
+ done
+}
+
+# Toolchains from Arm Developer page: https://developer.arm.com/open-source/gnu-toolchain/gnu-a/downloads
+function install-arm-toolchains() {
+ local TC_VERSION="9.2-2019.12"
+ local TC_URL="https://developer.arm.com/-/media/Files/downloads/gnu-a/${TC_VERSION}/binrel"
+ local TC_AARCH64="gcc-arm-${TC_VERSION}-x86_64-aarch64-none-elf.tar.xz"
+ local TC_ARM="gcc-arm-${TC_VERSION}-x86_64-arm-none-eabi.tar.xz"
+
+ # Install toolchains
+ for TC in ${TC_AARCH64} ${TC_ARM}; do
+ cd ${WORKSPACE}
+ curl -sLSO -C - ${TC_URL}/${TC}
+ tar -Jxf ${TC}
+ cd ${WORKSPACE}/${TC%.tar.xz}/bin
+ export PATH=${PWD}:${PATH}
+ done
+
+ # Basic TC checks
+ for param in -dumpmachine --version -v; do
+ aarch64-none-elf-gcc ${param}
+ arm-none-eabi-gcc ${param}
+ done
+}
+
sudo apt update -q=2
sudo apt install -q=2 --yes --no-install-recommends build-essential device-tree-compiler git libssl-dev
@@ -15,26 +69,9 @@ if [ -z "${WORKSPACE}" ]; then
export WORKSPACE=${PWD}
fi
-# Toolchain from Arm Developer page: https://developer.arm.com/open-source/gnu-toolchain/gnu-a/downloads
-TC_VERSION="9.2-2019.12"
-TC_URL="https://developer.arm.com/-/media/Files/downloads/gnu-a/${TC_VERSION}/binrel"
-TC_AARCH64="gcc-arm-${TC_VERSION}-x86_64-aarch64-none-elf.tar.xz"
-TC_ARM="gcc-arm-${TC_VERSION}-x86_64-arm-none-eabi.tar.xz"
-
-# install toolchains
-for TC in ${TC_AARCH64} ${TC_ARM}; do
- cd ${WORKSPACE}
- curl -sLSO -C - ${TC_URL}/${TC}
- tar -Jxf ${TC}
- cd ${WORKSPACE}/${TC%.tar.xz}/bin
- export PATH=${PWD}:${PATH}
-done
-
-# Basic TC checks
-for param in -dumpmachine --version -v; do
- aarch64-none-elf-gcc ${param}
- arm-none-eabi-gcc ${param}
-done
+# Install toolchains
+install-linaro-toolchains
+install-arm-toolchains
# Additional binaries required (rootfs, etc...)
LINARO_VERSION=19.06