meshtastic / web-flasher

Official online flasher for Meshtastic device firmware
https://flasher.meshtastic.org
GNU General Public License v3.0
63 stars 25 forks source link

Hot-swap TZ offset with browser locale in firmware binary #107

Open thebentern opened 2 hours ago

thebentern commented 2 hours ago

Flow in bash: sed -i 's/tzplaceholder /CST6CDT,M3.2.0,M11.1.0\x0/' firmware.bin truncate --size=-32 firmware.bin sha256sum firmware.bin | xxd -r -ps >> firmware.bin

thebentern commented 2 hours ago

https://github.com/nayarsystems/posix_tz_db/blob/master/zones.csv

jp-bennett commented 1 hour ago

We will need to ask esptool to generate a byte of checksum, and replace the 33rd byte from the end of the file. Then the last 32 bytes can be trimmed and replaced with the sha256sum.