2021-06-12 14:38:58 -06:00
|
|
|
#!/bin/bash
|
|
|
|
# Need to be in root dir of jebbatime git archive.
|
|
|
|
# Get config
|
|
|
|
. ~/.config/jebbatime.conf
|
|
|
|
|
2021-06-12 14:42:19 -06:00
|
|
|
cd $JEBBATIMEGITROOT
|
|
|
|
|
2021-06-12 14:38:58 -06:00
|
|
|
# Download latest release. XXX better link to latest.
|
|
|
|
rm -f /tmp/micropython.zip
|
|
|
|
wget -O /tmp/micropython.zip \
|
2021-06-14 12:53:17 -06:00
|
|
|
https://spacecruft.org/attachments/84fb3527-4ef1-47e4-8a55-ef55688ed05f
|
2021-06-12 14:38:58 -06:00
|
|
|
|
|
|
|
# Reboot thang into bootloader
|
|
|
|
echo "Rebooting development PineTime watch into bootloader..."
|
|
|
|
./tools/wasptool \
|
|
|
|
--verbose \
|
|
|
|
--bootloader \
|
|
|
|
--device $JEBBATIMEMAC
|
|
|
|
|
|
|
|
echo "Waiting..."
|
|
|
|
sleep 4
|
|
|
|
|
|
|
|
# Flash
|
2021-06-12 14:47:20 -06:00
|
|
|
echo "Flashing, will take ~5 minutes..."
|
2021-06-12 14:38:58 -06:00
|
|
|
./tools/ota-dfu/dfu.py \
|
|
|
|
--legacy \
|
|
|
|
--verbose \
|
|
|
|
--address=$JEBBATIMEDFUMAC \
|
|
|
|
--zip=/tmp/micropython.zip
|
|
|
|
|
2021-06-12 16:54:56 -06:00
|
|
|
sleep 1
|
|
|
|
echo "Setting time on watch"
|
|
|
|
./tools/wasptool \
|
|
|
|
--rtc \
|
|
|
|
--device $JEBBATIMEMAC
|
2021-06-12 14:47:20 -06:00
|
|
|
|