Add upgrade tools
- Download an update
- Unpack an update as the "next" bank
- Setup rollback (cleanup of update) in current release
- Setup and execute reboot via kexec to update
- Validate a new update after boot
- Rollback (reboot and cleanup) if validation fails
- Update active (re: "current") bank
- Cleanup old release on successful update
- Possibly kexec so that the system is now actually on the "current" bank.
The active bank update only happens after the kexec and validation because if we fail validation then nothing has changed and the system can simply boot back to the old version and clean up the downloaded update.
This methodology probably needs an update to the init script in the initramfs that supports specifying which bank to boot. The kexec would tell the init "use the 'next' bank instead of 'current'" when it mounts the overlay.
These don't need to be automated into an unattended update yet. They just need to provide the tools that an automatic update could use.