-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrelease.sh
executable file
·17 lines (16 loc) · 920 Bytes
/
release.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#! /bin/bash
# Requires the installation of
# - jq
# - esptool
# - platformio
#
VDPTAG=`curl "https://api.github.com/repos/AgonConsole8/agon-vdp/tags" | jq -r '.[0].name'`
MOSTAG=`curl "https://api.github.com/repos/AgonConsole8/agon-mos/tags" | jq -r '.[0].name'`
RELEASE=MOS_$MOSTAG-VDP_$VDPTAG.bin
rm ./data/MOS.bin
wget https://github.com/AgonConsole8/agon-mos/releases/latest/download/MOS.bin -P ./data
rm ./firmware/input/firmware.bin
wget https://github.com/AgonConsole8/agon-vdp/releases/latest/download/firmware.bin -P ./firmware/input
pio run --target buildfs
pio run
python3 -m esptool --chip esp32 merge_bin -o ./firmware/merged.bin --flash_mode dio --flash_freq 40m --flash_size 4MB 0x1000 "./.pio/build/esp32dev/bootloader.bin" 0x8000 "./.pio/build/esp32dev/partitions.bin" 0x10000 "./.pio/build/esp32dev/firmware.bin" 0x150000 "./firmware/input/firmware.bin" 0x290000 "./.pio/build/esp32dev/spiffs.bin"