Skip to content

Commit dc1023f

Browse files
committed
Search more generic for the bootloader.
1 parent f065c39 commit dc1023f

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

.github/workflows/ci.yml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -101,13 +101,15 @@ jobs:
101101
102102
- name: Package firmware
103103
run: |
104-
if [ -f "/github/home/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/bin/bootloader_dio_40m.bin" ]; then
105-
cp /github/home/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/bin/bootloader_dio_40m.bin 0x01000.bin
104+
set -euxo pipefail
105+
if [ -f "/github/home/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/bin/bootloader_dio_40m.elf" ]; then
106+
cp /github/home/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/bin/bootloader_dio_40m.elf 0x01000.elf
106107
elif [ -f "/github/home/.platformio/packages/framework-arduinoespressif32/tools/sdk/bin/bootloader_dio_40m.bin" ]; then
107108
cp /github/home/.platformio/packages/framework-arduinoespressif32/tools/sdk/bin/bootloader_dio_40m.bin 0x01000.bin
108109
else
109110
echo could not find bootloader_dio_40m.bin, new location?
110-
find /github/home/.platformio/ -name "bootloader_dio_40m.bin"
111+
find /github/home/.platformio/ -name "bootloader*.bin"
112+
find /github/home/.platformio/ -name "bootloader*.elf"
111113
exit 1
112114
fi
113115
cp bin/.pio/build/esp32dev/partitions.bin 0x08000.bin
@@ -123,11 +125,15 @@ jobs:
123125
# 0x08000 0x08000.bin \
124126
# 0x0e000 0x0e000.bin \
125127
# 0x10000 0x10000.bin
126-
echo Original bootloader params
127-
${ESPTOOL} --chip esp32 image_info --version 2 0x01000.bin || echo image_info for original bootloader failed
128+
${ESPTOOL} --trace --chip esp32 elf2image \
129+
--dont-append-digest \
130+
--flash_freq 40m --flash_mode dio \
131+
0x01000.elf
132+
echo Original bootloader params after elf2image
133+
${ESPTOOL} --chip esp32 image_info --version 2 0x01000.bin || echo image_info for converted bootloader failed
128134
mv 0x01000.bin 0x01000.bin.org
129-
${ESPTOOL} --trace --chip esp32 merge_bin --output 0x01000.bin \
130-
--flash_freq keep --flash_mode dio --flash_size 4MB \
135+
${ESPTOOL} --trace --chip esp32 merge_bin --output 0x01000.bin \
136+
--flash_freq 40m --flash_mode dio --flash_size 4MB \
131137
--target-offset 0x01000 \
132138
0x01000 0x01000.bin.org
133139
echo OpenBikeSensor bootloader params

0 commit comments

Comments
 (0)