Merge remote-tracking branch 'origin/keymindCascade' into keymindCascade

This commit is contained in:
mikecarper committed 2026-10-23 18:08:25 -07:00
commit 170c1761d0
21 files changed
+1658 -41

No files matched your search

+32 -5
View File
@@ -6,9 +6,12 @@
An opt-in Repeater or Room Server build can carry its application firmware and
the exact board's [OTAFIX 2.4.12 bootloader](https://github.com/mikecarper/Adafruit_nRF52_Bootloader_OTAFIX/releases/tag/v0.11.0-OTAFIX2.4.12)
in one application image. Install that application first, then activate the
bootloader replacement with an authenticated admin command. Booting the image
does not flash the bootloader automatically.
in one application image. After installing that application, it checks the
bootloader once at 70 seconds after startup and updates it when needed. The
check waits for idle radio and OTA activity, and skips a valid matching
bootloader at the same or newer version. Recovery and unrecognized bootloaders
are excluded from automatic installation. Ordinary firmware has no automatic
bootloader update.
This follows the internal-flash bridge in
[MeshEnvy firmware PR #2](https://github.com/MeshEnvy/meshcore-firmware/pull/2).
@@ -74,8 +77,10 @@ P1 image, not a recovery image.
updater. An internal-only legacy receiver needs a delta from its exact
installed application; this image does not give a stock bootloader its first
LoRa update capability.
2. After the new application is running, use the local CLI or authenticated
remote admin CLI:
2. Leave the new application running for at least 70 seconds. It checks once
when radio and OTA activity are idle, then waits for the usual 1.5-second
grace and persistence checks before replacement and reboot. To start sooner,
use the local CLI or authenticated remote admin CLI:
```text
ota bootloader update
@@ -92,6 +97,28 @@ P1 image, not a recovery image.
`ota bootloader embedded install HASH16` command remains available with the
confirmation shown by `status`.
Automatic installation is limited to one attempt per firmware image. A saved
40-byte record in `/bl_auto` contains the full SHA-256 of the running image,
including its version trailer. It survives reboots and power cycles. Flashing
a different firmware image permits a new check; recovery bootloaders remain
excluded. Older recovery images without a recognizable normal bootloader label
also skip automatic installation.
The record is committed before inspecting the bootloader, so an interrupted or
failed check also requires manual retry or different firmware. Missing persistent
storage, corrupt records, or an unfinished file transaction block automatic updates.
Manual `ota bootloader update` remains available under its existing identity,
version and persistence checks. The first lock write changes the filesystem
audit hash; it does not change the application or SoftDevice.
The retained reboot guard still covers the initial checks and copy. A guard
from the previous firmware does not prevent a verified different image from
qualifying again. Status reports `auto=locked for this firmware`, `auto=recovery`,
`auto=unrecognized`, `auto=storage unavailable`, or `auto=blocked` when relevant.
These guards prevent repeated update attempts; they cannot repair a bootloader
that fails before the application starts. Erasing the filesystem also erases
the saved firmware lock.
The bridge validates the live application, candidate hash, installed identity,
chip/layout, MBR addresses, watchdog and flash protection before copying. A
protected region is refused; the bridge does not unlock it. Existing staged