meshtastic-firmware/bin/build-all.sh

33 wiersze
937 B
Bash
Czysty Zwykły widok Historia

2020-02-20 20:49:34 +00:00
#!/bin/bash
2020-02-14 22:00:08 +00:00
set -e
2020-02-20 22:05:18 +00:00
VERSION=0.0.4
2020-02-20 20:49:34 +00:00
COUNTRIES="US EU CN JP"
SRCMAP=.pio/build/esp32/output.map
SRCBIN=.pio/build/esp32/firmware.bin
for COUNTRY in $COUNTRIES; do
COMMONOPTS="-DAPP_VERSION=$VERSION -DHW_VERSION_$COUNTRY -Wall -Wextra -Wno-missing-field-initializers -Isrc -Os -Wl,-Map,.pio/build/esp32/output.map -DAXP_DEBUG_PORT=Serial"
export PLATFORMIO_BUILD_FLAGS="-DT_BEAM_V10 $COMMONOPTS"
echo "Building with $PLATFORMIO_BUILD_FLAGS"
rm -f $SRCBIN $SRCMAP
pio run # -v
cp $SRCBIN release/firmware-TBEAM-$COUNTRY-$VERSION.bin
cp $SRCMAP release/firmware-TBEAM-$COUNTRY-$VERSION.map
export PLATFORMIO_BUILD_FLAGS="-DHELTEC_LORA32 $COMMONOPTS"
rm -f $SRCBIN $SRCMAP
pio run # -v
cp $SRCBIN release/firmware-HELTEC-$COUNTRY-$VERSION.bin
cp $SRCMAP release/firmware-HELTEC-$COUNTRY-$VERSION.map
done
2020-02-14 22:00:08 +00:00
2020-02-20 20:49:34 +00:00
zip release/firmware-$VERSION.zip release/firmware-*-$VERSION.bin
2020-02-14 22:00:08 +00:00
2020-02-20 20:49:34 +00:00
echo BUILT ALL