aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Sokolovsky <paul.sokolovsky@linaro.org>2019-11-14 20:17:11 +0200
committerPaul Sokolovskyy <paul.sokolovsky@linaro.org>2019-11-14 18:26:52 +0000
commit53505f27d37881a14a18f6a555bf7f601060311c (patch)
tree262efa43616e84634eb1b41e3e2c02973c103a9e
parent66130fcbbaf159f846f7c7279f636d34070008a2 (diff)
downloadconfigs-53505f27d37881a14a18f6a555bf7f601060311c.tar.gz
zephyr-upstream: Upgrade gnuarmemb toolchain, and d/l it to persistent loc
Toolchains are location at ${HOME}/srv/toolchain/, which is backed by a persistent Docker volume. Originally, new versions of toolchains were installed to this volume manually on the host, but we can as well do it "online" during the build, as long as we take care to avoid downloading one if it's already available (i.e. was downloaded previously and cached). Based on the suggestion by Fathi Boudra. Change-Id: I7543682cce9b6ace68134c2a421845b8426f2997 Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
-rwxr-xr-xzephyr-upstream/builders.sh28
1 files changed, 22 insertions, 6 deletions
diff --git a/zephyr-upstream/builders.sh b/zephyr-upstream/builders.sh
index 5132a8d74..2a7ef7fc0 100755
--- a/zephyr-upstream/builders.sh
+++ b/zephyr-upstream/builders.sh
@@ -40,15 +40,31 @@ echo "GIT_COMMIT_ID=$(git rev-parse --short=8 HEAD)" > ${WORKSPACE}/env_var_para
head -5 Makefile
-# Toolchains are pre-installed and come from:
-# https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu-rm/7-2018q2/gcc-arm-none-eabi-7-2018-q2-update-linux.tar.bz2
+# Zephyr SDK is pre-installed and comes from:
# https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v0.10.3/zephyr-sdk-0.10.3-setup.run
-# To install Zephyr SDK: ./zephyr-sdk-0.10.3-setup.run --quiet --nox11 -- <<< "${HOME}/srv/toolchain/zephyr-sdk-0.10.3"
-
-export GNUARMEMB_TOOLCHAIN_PATH="${HOME}/srv/toolchain/gcc-arm-none-eabi-7-2018-q2-update"
-# We building with the gnuarmemb toolchain, we need ZEPHYR_SDK_INSTALL_DIR to find things like conf
+# To install: ./zephyr-sdk-0.10.3-setup.run --quiet --nox11 -- <<< "${HOME}/srv/toolchain/zephyr-sdk-0.10.3"
+# Note that Zephyr SDK is needed even when building with the gnuarmemb
+# toolchain, ZEPHYR_SDK_INSTALL_DIR is needed to find things like conf
export ZEPHYR_SDK_INSTALL_DIR="${HOME}/srv/toolchain/zephyr-sdk-0.10.3"
+# GNU ARM Embedded is downloaded once (per release) and cached in a persistent
+# docker volume under ${HOME}/srv/toolchain/.
+GNUARMEMB_TOOLCHAIN_URL="https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu-rm/9-2019q4/RC2.1/gcc-arm-none-eabi-9-2019-q4-major-x86_64-linux.tar.bz2"
+export GNUARMEMB_TOOLCHAIN_PATH="${HOME}/srv/toolchain/gcc-arm-none-eabi-9-2019-q4-major"
+
+install_arm_toolchain()
+{
+ test -d ${GNUARMEMB_TOOLCHAIN_PATH} && return 0
+ wget "${GNUARMEMB_TOOLCHAIN_URL}"
+ top=$(dirname ${GNUARMEMB_TOOLCHAIN_PATH})
+ rm -rf ${top}/_tmp
+ mkdir -p ${top}/_tmp
+ tar -C ${top}/_tmp -xaf $(basename ${GNUARMEMB_TOOLCHAIN_URL})
+ mv ${top}/_tmp/$(basename ${GNUARMEMB_TOOLCHAIN_PATH}) ${top}
+}
+
+install_arm_toolchain
+
# Set build environment variables
export LANG=C.UTF-8
ZEPHYR_BASE=${WORKSPACE}/zephyr