1
0
Fork 0
InfiniTime/docker/post_build.sh.in
Joe Eaves a7df0a0279 Unify the Dockerfiles by fleshing out build.sh
Script is written to handle it's own dependencies so it can be used within Docker or on the host system
2020-12-21 01:42:41 +00:00

25 lines
No EOL
791 B
Bash
Executable file

#!/bin/sh
export LC_ALL=C.UTF-8
export LANG=C.UTF-8
set -x
set -e
export PROJECT_VERSION="@PROJECT_VERSION_MAJOR@.@PROJECT_VERSION_MINOR@.@PROJECT_VERSION_PATCH@"
mkdir -p "$OUTPUT_DIR"
"$TOOLS_DIR"/mcuboot/scripts/imgtool.py create --version 1.0.0 \
--align 4 --header-size 32 --slot-size 475136 --pad-header \
"$BUILD_DIR/src/pinetime-mcuboot-app-$PROJECT_VERSION.bin" \
"$OUTPUT_DIR/image-$PROJECT_VERSION.bin"
adafruit-nrfutil dfu genpkg --dev-type 0x0052 \
--application "$OUTPUT_DIR/image-$PROJECT_VERSION.bin" \
"$OUTPUT_DIR/dfu-$PROJECT_VERSION.zip"
cp "$BUILD_DIR"/src/*.bin \
"$BUILD_DIR"/src/*.hex \
"$BUILD_DIR"/src/*.out \
"$BUILD_DIR"/src/*.map \
$OUTPUT_DIR
cp "$SOURCES_DIR"/bootloader/bootloader-5.0.4.bin $OUTPUT_DIR/bootloader.bin