Skip to content

Commit

Permalink
werker.sh変更
Browse files Browse the repository at this point in the history
- nRF9160DK, Thingy91のバイナリも生成するように変更
- HEXだけではなくFOTA用binファイルもアーカイブに含むように変更
  • Loading branch information
f-okuhara committed Feb 28, 2022
1 parent f521823 commit 4f62f9b
Showing 1 changed file with 20 additions and 12 deletions.
32 changes: 20 additions & 12 deletions wercker.sh
Original file line number Diff line number Diff line change
@@ -1,26 +1,34 @@
#!/bin/sh

BOARD=scm-ltem1nrf_nrf9160ns
BOARDS="scm-ltem1nrf_nrf9160ns nrf9160dk_nrf9160_ns thingy91_nrf9160_ns"

if [ "$DEBUG" = "1" ]; then
TARGETS="develop"
else
TARGETS="production staging develop"
TARGETS="production"
#TARGETS="production staging develop"
fi

rm -rf build/
mkdir -p dist/bin

for TARGET in ${TARGETS}
do
echo "${TARGET}"
./build.sh ${TARGET} ${BOARD}
RESULT="$?"
if [ "${RESULT}" -ne 0 ]; then
echo "Failed"
exit ${RESULT}
fi
cp -v "build/${BOARD}/${TARGET}/zephyr/merged.hex" "dist/bin/${BOARD}_${TARGET}-merged.hex"
for BOARD in ${BOARDS}
do
echo "${TARGET}"
./build.sh ${TARGET} ${BOARD}
RESULT="$?"
if [ "${RESULT}" -ne 0 ]; then
echo "Failed"
exit ${RESULT}
fi

DIST_DIR="dist/${BOARD}/${TARGET}/"
mkdir -p "${DIST_DIR}/hex"
cp -v "build/${BOARD}/${TARGET}/zephyr/merged.hex" "${DIST_DIR}/hex/${BOARD}_${TARGET}-merged.hex"
mkdir -p "${DIST_DIR}/update"
cp -v "build/${BOARD}/${TARGET}/zephyr/app_update.bin" "${DIST_DIR}/update/"
done
done

tar zcvf dist/sipf-std-client_nrf9160.tar.gz -C dist bin
tar zcvf dist/sipf-std-client_nrf9160.tar.gz -C dist ${BOARDS}

0 comments on commit 4f62f9b

Please sign in to comment.