OTA updates for Controller A: dual-slot partitions, signed Gitea releases

- partition table: two 7.9 MB OTA slots, SPIFFS dropped, nvs/otadata offsets
  unchanged (tunables survived the one-time USB flash)
- ota_update.cpp: manual `ota status|check|install|rollback` console; HTTPS
  pull from the public repo's latest release, ECDSA P-256 signature over
  "patrol-a|version|sha256" checked before download, streamed image must match,
  parked gate before download and before the slot switch, 30 s
  confirm-or-rollback (verifyRollbackLater override)
- ota_config.h: server/repo, ISRG Root X1 + Root YR, signing public key
- .gitea/workflows/firmware.yml: main -> rolling unsigned pre-release
  main-latest; v* tag -> signed release (needs secret FIRMWARE_SIGNING_KEY)
- wiki: pages/ota-updates.md (design, decisions, B-over-ESP-NOW plan);
  CLAUDE.md, index, log, open-questions #12 updated

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-09-26 21:59:46 +02:00
parent da4c96903b
commit effa949429
12 changed files with 915 additions and 14 deletions
+10 -4
View File
@@ -1,7 +1,13 @@
# ESP32-S3-WROOM-1-N16R8 Partition Table (16MB Flash)
# ESP32-S3-WROOM-1-N16R8 Partition Table (16MB Flash) - dual-slot OTA
# Name, Type, SubType, Offset, Size, Flags
#
# nvs + otadata keep their original offsets so saved settings/tunables survive
# the change. Two equal app slots for OTA (src/modules/ota_update.cpp): the
# running image writes the new one into the idle slot and flips otadata.
# SPIFFS was dropped (nothing used it) to give each slot ~7.9 MB; firmware is
# ~1.5 MB. Changing this table needs one USB flash; OTA works after that.
nvs, data, nvs, 0x9000, 0x5000,
otadata, data, ota, 0xe000, 0x2000,
app0, app, ota_0, 0x10000, 0xC80000,
spiffs, data, spiffs, 0xC90000, 0x360000,
coredump, data, coredump,0xFF0000, 0x10000,
app0, app, ota_0, 0x10000, 0x7F0000,
app1, app, ota_1, 0x800000, 0x7F0000,
coredump, data, coredump,0xFF0000, 0x10000,
1 # ESP32-S3-WROOM-1-N16R8 Partition Table (16MB Flash) # ESP32-S3-WROOM-1-N16R8 Partition Table (16MB Flash) - dual-slot OTA
2 # Name, Type, SubType, Offset, Size, Flags # Name, Type, SubType, Offset, Size, Flags
3 #
4 # nvs + otadata keep their original offsets so saved settings/tunables survive
5 # the change. Two equal app slots for OTA (src/modules/ota_update.cpp): the
6 # running image writes the new one into the idle slot and flips otadata.
7 # SPIFFS was dropped (nothing used it) to give each slot ~7.9 MB; firmware is
8 # ~1.5 MB. Changing this table needs one USB flash; OTA works after that.
9 nvs, data, nvs, 0x9000, 0x5000, nvs, data, nvs, 0x9000, 0x5000,
10 otadata, data, ota, 0xe000, 0x2000, otadata, data, ota, 0xe000, 0x2000,
11 app0, app, ota_0, 0x10000, 0xC80000, app0, app, ota_0, 0x10000, 0x7F0000,
12 spiffs, data, spiffs, 0xC90000, 0x360000, app1, app, ota_1, 0x800000, 0x7F0000,
13 coredump, data, coredump,0xFF0000, 0x10000, coredump, data, coredump,0xFF0000, 0x10000,