Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modified zephyr create.sh to pull correct toolchain based on arch #499

Merged
merged 1 commit into from
Apr 18, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions config/zephyr/generic/create.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand Down