Skip to content
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
20 changes: 18 additions & 2 deletions docker/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ export npm_config_cache="${NPM_DIR}"

export BUILD_TYPE=${BUILD_TYPE:=Release}
export GCC_ARM_VER=${GCC_ARM_VER:="10.3-2021.10"}
export NRF_SDK_VER=${NRF_SDK_VER:="nrf5sdk153059ac345"}
export NRF_SDK_VER=${NRF_SDK_VER:="nRF5_SDK_15.3.0_59ac345"}
# convert to lower case and remove _ and . character
# the download URL uses the SLUG, but the extracted folder is named like the original value
NRF_SDK_VER_SLUG=${NRF_SDK_VER,,}
export NRF_SDK_VER_SLUG=${NRF_SDK_VER_SLUG//[_.]/}

MACHINE="$(uname -m)"
[ "$MACHINE" = "arm64" ] && MACHINE="aarch64"
Expand Down Expand Up @@ -47,17 +51,29 @@ main() {

GetGcc() {
wget -q https://developer.arm.com/-/media/Files/downloads/gnu-rm/$GCC_ARM_VER/$GCC_ARM_PATH-$MACHINE-linux.tar.bz2 -O - | tar -xj -C $TOOLS_DIR/
if [ ! -d "$TOOLS_DIR/$GCC_ARM_PATH" ]; then
echo "missing GCC path: $TOOLS_DIR/$GCC_ARM_PATH"
return 1
fi
}

GetMcuBoot() {
git clone https://github.com/mcu-tools/mcuboot.git "$TOOLS_DIR/mcuboot"
pip3 install -r "$TOOLS_DIR/mcuboot/scripts/requirements.txt"
if [ ! -d "$TOOLS_DIR/mcuboot" ]; then
echo "missing mcuboot path: $TOOLS_DIR/mcuboot"
return 1
fi
}

GetNrfSdk() {
wget -q "https://nsscprodmedia.blob.core.windows.net/prod/software-and-other-downloads/sdks/nrf5/binaries/$NRF_SDK_VER.zip" -O /tmp/$NRF_SDK_VER
wget -q "https://nsscprodmedia.blob.core.windows.net/prod/software-and-other-downloads/sdks/nrf5/binaries/$NRF_SDK_VER_SLUG.zip" -O /tmp/$NRF_SDK_VER
unzip -q /tmp/$NRF_SDK_VER -d "$TOOLS_DIR/"
rm /tmp/$NRF_SDK_VER
if [ ! -d "$TOOLS_DIR/$NRF_SDK_VER" ]; then
echo "missing NRF_SDK path: $TOOLS_DIR/$NRF_SDK_VER"
return 1
fi
}

CmakeGenerate() {
Expand Down
Loading