Commit Graph

15 Commits

Author SHA1 Message Date
Will Miles
f28cbea2c2 Metadata compatibility cleanup
- Remove unnecessary checks
- Remove unnecessary constructions
- Fix unsafe buffer-to-String
2026-03-16 18:20:41 -04:00
Will Miles
3b256eed1e Merge branch 'main' into copilot/allow-upgrade-to-esp32 2026-03-16 18:17:51 -04:00
copilot-swe-agent[bot]
5e1ae99767 Refactor normalizeReleaseName to use Arduino String for cleaner code
Co-authored-by: netmindz <442066+netmindz@users.noreply.github.com>
2026-03-08 09:58:05 +00:00
copilot-swe-agent[bot]
9ae1ef506c Allow OTA upgrade between ESP32_V4 and ESP32 release names
Co-authored-by: netmindz <442066+netmindz@users.noreply.github.com>
2026-03-06 07:01:10 +00:00
Will Miles
51a14ede8b OTA: Report metadata v1 as workaround
Report the older structure version until sufficient penetration
of the previous patch.
2025-12-19 20:44:03 -05:00
Will Miles
788c09972e Remove OTA metadata structure version block
If we cap the acceptable version, it becomes impossible to increase it:
older firmwares will reject it.  Instead we must guarantee
backwards compatibility so long as the magic number is the same.
If a breaking change is required in the future, a new magic number
should be used to identify it.
2025-12-19 20:44:03 -05:00
Will Miles
ba21ab55f8 Implement correct update version check 2025-12-19 20:44:03 -05:00
Will Miles
1585cab3ba Add source version check to OTA update
Add a field to the OTA metadata structure indicating the oldest base
version it's safe to install this update /from/.  This provides a clear
path forward in case there are incompatibilities, eg. some case
(bootloader compatibility) where 0.16.0 cannot be installed safely from
0.15.2, but a transitional 0.15.3 can arrange the groundwork.
2025-12-19 20:44:03 -05:00
Will Miles
304c59e09b Revert "Add old version check to OTA update" (#5212) 2025-12-19 20:24:26 -05:00
Will Miles
5bf1fc38b1 Implement correct update version check 2025-11-08 19:18:27 -05:00
Will Miles
d55a3f078a Add source version check to OTA update
Add a field to the OTA metadata structure indicating the oldest base
version it's safe to install this update /from/.  This provides a clear
path forward in case there are incompatibilities, eg. some case
(bootloader compatibility) where 0.16.0 cannot be installed safely from
0.15.2, but a transitional 0.15.3 can arrange the groundwork.
2025-11-08 19:00:57 -05:00
Will Miles
c66d67dd19 Fix metadata includes 2025-10-25 09:57:18 -04:00
Will Miles
0c22163fd9 Fix unaligned reads during metadata search 2025-10-25 09:57:03 -04:00
Will Miles
5ca10f35d1 Process metadata only in metadata.cpp
Improves cache utilization as fewer things are passed via CFLAGS to
all files.  In the event that no metadata is available, let the cpp
file handle warning about default usage.
2025-10-06 21:52:16 -04:00
copilot-swe-agent[bot]
a073bf32e4 Implement OTA release compatibility checking system
Implement a comprehensive solution for validating a firmware before an
OTA updated is committed.  WLED metadata such as version and release
is moved to a data structure located at near the start of the firmware
binary, where it can be identified and validated.

Co-authored-by: netmindz <442066+netmindz@users.noreply.github.com>
2025-10-06 21:50:23 -04:00