diff options
author | Paul Sokolovsky <paul.sokolovsky@linaro.org> | 2021-03-03 14:15:29 +0200 |
---|---|---|
committer | Paul Sokolovsky <paul.sokolovsky@linaro.org> | 2021-03-03 14:15:29 +0200 |
commit | b50521f2adbb6af0dac0a1aad1e93ad86cd2f1d8 (patch) | |
tree | 791581175391ce799b5913f6927760ead08daf5c /lite-aeolus | |
parent | ae6db3a645d49cd948a471c20bf90a2b740d8e14 (diff) |
lite-aeolus: Install Zephyr SDK.
Routines copied from zephyr-upstream job.
Change-Id: Ida3153405fdd7a09c2ba49fb0f77aee0f949c44d
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Diffstat (limited to 'lite-aeolus')
-rw-r--r-- | lite-aeolus/build-init.sh | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/lite-aeolus/build-init.sh b/lite-aeolus/build-init.sh index 0276286e07..e679005f56 100644 --- a/lite-aeolus/build-init.sh +++ b/lite-aeolus/build-init.sh @@ -63,11 +63,26 @@ case "${ZEPHYR_TOOLCHAIN_VARIANT}" in gccarmemb) export GCCARMEMB_TOOLCHAIN_PATH="${HOME}/srv/toolchain/gcc-arm-none-eabi-9-2019-q4-major" ;; - zephyr) - export ZEPHYR_SDK_INSTALL_DIR="${HOME}/srv/toolchain/zephyr-sdk-0.12.3" - ;; esac +# Note that Zephyr SDK is needed even when building with the gnuarmemb +# toolchain, ZEPHYR_SDK_INSTALL_DIR is needed to find things like conf +ZEPHYR_SDK_URL="https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v0.12.3/zephyr-sdk-0.12.3-x86_64-linux-setup.run" +export ZEPHYR_SDK_INSTALL_DIR="${HOME}/srv/toolchain/zephyr-sdk-0.12.3" + +install_zephyr_sdk() +{ + test -d ${ZEPHYR_SDK_INSTALL_DIR} && return 0 + test -f ${ZEPHYR_SDK_INSTALL_DIR}.lck && exit 1 + touch ${ZEPHYR_SDK_INSTALL_DIR}.lck + wget -q "${ZEPHYR_SDK_URL}" + chmod +x $(basename ${ZEPHYR_SDK_URL}) + ./$(basename ${ZEPHYR_SDK_URL}) --quiet --nox11 -- <<< ${ZEPHYR_SDK_INSTALL_DIR} + rm -f ${ZEPHYR_SDK_INSTALL_DIR}.lck +} + +install_zephyr_sdk + # Set build environment variables LANG=C ZEPHYR_BASE=${WORKSPACE} |