web-flasher icon indicating copy to clipboard operation
web-flasher copied to clipboard

Hot-swap TZ offset with browser locale in firmware binary

Open thebentern opened this issue 1 year ago • 3 comments

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 avatar Oct 03 '24 20:10 thebentern

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

thebentern avatar Oct 03 '24 20:10 thebentern

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.

jp-bennett avatar Oct 03 '24 20:10 jp-bennett

Rak4631 doesn't need any hashing or checksum modifications. Just overwrite the placeholder bytes with the right string and null-terminate it. RP 2040 still to be checked.

jp-bennett avatar Oct 04 '24 02:10 jp-bennett