Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -112,4 +112,4 @@ Tightened the live-data findings after checking the full capture: the Launch use
|
||||
|
||||
## [2026-09-26] build | OTA updates for Controller A
|
||||
|
||||
Repartitioned A to dual OTA slots (2 x 7.9 MB, SPIFFS dropped, nvs/otadata offsets kept - tunables v150 survived the one-time USB flash on COM10, verified). New src/modules/ota_update.cpp + include/config/ota_config.h: manual `ota status|check|install|rollback` console; HTTPS pull from the (now public) Gitea repo's latest release, ECDSA P-256 signature over "patrol-a|version|sha256" checked before download, image hashed while streaming, parked gate before download and before slot switch, rollback via verifyRollbackLater() override + 30 s confirm. TLS trusts ISRG Root X1 + Root YR (both verified against the server chain). CI: .gitea/workflows/firmware.yml (main -> rolling unsigned pre-release main-latest; v* tag -> signed release with manifest.txt). Decisions: manual trigger (future Diagnostics screen), public repos instead of a device token, Controller B to be updated by A over ESP-NOW (wire is one-way). Wrote pages/ota-updates.md. Pending: FIRMWARE_SIGNING_KEY repo secret, enable repo Actions, first v* tag to test end-to-end.
|
||||
Repartitioned A to dual OTA slots (2 x 7.9 MB, SPIFFS dropped, nvs/otadata offsets kept - tunables v150 survived the one-time USB flash on COM10, verified). New src/modules/ota_update.cpp + include/config/ota_config.h: manual `ota status|check|install|rollback` console; HTTPS pull from the (now public) Gitea repo's latest release, ECDSA P-256 signature over "patrol-a|version|sha256" checked before download, image hashed while streaming, parked gate before download and before slot switch, rollback via verifyRollbackLater() override + 30 s confirm. TLS trusts ISRG Root X1 + Root YR (both verified against the server chain). CI: .gitea/workflows/firmware.yml (main -> rolling unsigned pre-release main-latest; v* tag -> signed release with manifest.txt). Decisions: manual trigger (future Diagnostics screen), public repos instead of a device token, Controller B to be updated by A over ESP-NOW (wire is one-way). Wrote pages/ota-updates.md. Pending: BMW_NISSAN_FIRMWARE_SIGNING_KEY repo secret, enable repo Actions, first v* tag to test end-to-end.
|
||||
|
||||
@@ -13,7 +13,7 @@ How Controller A updates itself from this repo's Gitea releases, why each piece
|
||||
```
|
||||
git push tag vX.Y.Z ──► Gitea Actions (.gitea/workflows/firmware.yml, runner ubuntu-latest)
|
||||
pio run (-DFW_VERSION="vX.Y.Z")
|
||||
sign "patrol-a|vX.Y.Z|<sha256>" with secret FIRMWARE_SIGNING_KEY
|
||||
sign "patrol-a|vX.Y.Z|<sha256>" with secret BMW_NISSAN_FIRMWARE_SIGNING_KEY
|
||||
release vX.Y.Z: firmware.bin + firmware.elf + manifest.txt
|
||||
│ public repo, HTTPS, no token
|
||||
Controller A `ota install` ◄──────┘ (parked, Wi-Fi joined)
|
||||
@@ -60,7 +60,7 @@ Wi-Fi must be joined via the Settings screen first. Joining an AP moves the radi
|
||||
|
||||
## Secrets and keys
|
||||
|
||||
- `FIRMWARE_SIGNING_KEY` — Gitea **repo secret** (Settings → Actions → Secrets), the EC P-256 private key PEM. Generated 2026-09-26; keep an offline backup. Losing it means devices only accept updates after one USB flash with a new public key.
|
||||
- `BMW_NISSAN_FIRMWARE_SIGNING_KEY` — Gitea **repo secret** (Settings → Actions → Secrets), the EC P-256 private key PEM. Generated 2026-09-26; keep an offline backup. Losing it means devices only accept updates after one USB flash with a new public key.
|
||||
- Public key: compiled in (`OTA_SIGNING_PUBKEY_PEM`) and in `tools/ota/firmware_signing_pub.pem` (CI self-checks each signature against it before publishing).
|
||||
- Rotating the key: new keypair → update both public-key copies → USB-flash once (a device only trusts the key it was built with).
|
||||
|
||||
|
||||
Reference in New Issue
Block a user