From 5121d7a48c6c59aebe8760221779d9d01fba5190 Mon Sep 17 00:00:00 2001 From: Drew Hoener <84148896+ahoenerBE@users.noreply.github.com> Date: Mon, 18 Apr 2022 02:03:14 -0400 Subject: [PATCH] Modified zephyr create.sh to pull correct toolchain based on arch (#499) (cherry picked from commit 8793b5a7a2a606cd5d2abaeb154bf8fd453d3f88) --- config/zephyr/generic/create.sh | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/config/zephyr/generic/create.sh b/config/zephyr/generic/create.sh index d920b351..aa613243 100755 --- a/config/zephyr/generic/create.sh +++ b/config/zephyr/generic/create.sh @@ -15,6 +15,8 @@ if ! (( $CMAKE_VERSION_MAJOR_NUMBER > 3 || \ fi export PATH=~/.local/bin:"$PATH" +export ZEPHYR_VERSION="v0.12.4" +export ARCH=$(uname -m) pushd $FW_TARGETDIR >/dev/null @@ -29,12 +31,22 @@ pushd $FW_TARGETDIR >/dev/null pip3 install -r zephyrproject/zephyr/scripts/requirements.txt if [ "$PLATFORM" = "host" ]; then - export TOOLCHAIN_VERSION=zephyr-sdk-0.12.4-x86_64-linux-setup.run + if [ "$ARCH" = "aarch64" ]; then + export TOOLCHAIN_VERSION=zephyr-sdk-0.13.1-linux-aarch64-setup.run + export ZEPHYR_VERSION="v0.13.1" + else + export TOOLCHAIN_VERSION=zephyr-sdk-0.12.4-x86_64-linux-setup.run + fi else - export TOOLCHAIN_VERSION=zephyr-toolchain-arm-0.12.4-x86_64-linux-setup.run + if [ "$ARCH" = "aarch64" ]; then + export TOOLCHAIN_VERSION=zephyr-toolchain-arm-0.13.1-linux-aarch64-setup.run + export ZEPHYR_VERSION="v0.13.1" + else + export TOOLCHAIN_VERSION=zephyr-toolchain-arm-0.12.4-x86_64-linux-setup.run + fi fi - wget https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v0.12.4/$TOOLCHAIN_VERSION + wget https://github.com/zephyrproject-rtos/sdk-ng/releases/download/$ZEPHYR_VERSION/$TOOLCHAIN_VERSION chmod +x $TOOLCHAIN_VERSION ./$TOOLCHAIN_VERSION -- -d $(pwd)/zephyr-sdk -y