android_ab: Try backup booloader_message

Some devices keep 2 copies of the bootloader_message in the misc
partition and write each in sequence when updating. This ensures that
there is always one valid copy of the bootloader_message. Teach u-boot
to optionally try a backup bootloader_message from a specified offset if
the primary one fails its CRC check.

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
This commit is contained in:
Joshua Watt
2023-07-03 10:07:13 -05:00
committed by Tom Rini
parent 55a4244372
commit 3430f24bc6
3 changed files with 79 additions and 11 deletions

View File

@@ -31,6 +31,12 @@ boot script. This command analyzes and processes A/B metadata stored on a
special partition (e.g. ``misc``) and determines which slot should be used for
booting up.
If the A/B metadata partition has a backup bootloader_message block that is used
to ensure one is always valid even in the event of interruption when writing, it
can be enabled in your board configuration file::
CONFIG_ANDROID_AB_BACKUP_OFFSET=0x1000
Command usage
-------------