-
Notifications
You must be signed in to change notification settings - Fork 54
Description
Forgot secrets / formatted the file partition and recreated a fresh secrets, a known issue with running on battery.
The firmware includes various checks for file system availability, secrets file readability, json corruption, etc, and a basic low battery voltage can cause repeated boot looping as the wifi comes online the power brownout occurs. Eventually the flash reports a mount/init failure and so the code assumes a corrupt partition and formats it.
Resolved in #656, but now needs a bit of cleanup/refactor as over 6months old.
Basic idea is to detect power on reason, and if not a clean boot (power related) then don't touch the filesystem even if it errors or is in an unusable state (just report in serial/LED).
Latest changes to touch boot log (write airlift FW version) would need to be folded in to the bit which checks the old boot log contents before writing the desired new contents (if match then no unnecessary write).