From 3430f24bc69d61eadf5b09999d58c468ac67c9fe Mon Sep 17 00:00:00 2001 From: Joshua Watt Date: Mon, 3 Jul 2023 10:07:13 -0500 Subject: 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 --- common/Kconfig | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'common') diff --git a/common/Kconfig b/common/Kconfig index 42baca2..f5ad63c 100644 --- a/common/Kconfig +++ b/common/Kconfig @@ -936,6 +936,15 @@ config ANDROID_AB allows a bootloader to try a new version of the system but roll back to previous version if the new one didn't boot all the way. +config ANDROID_AB_BACKUP_OFFSET + hex "Offset of backup bootloader control" + depends on ANDROID_AB + default 0x0 + help + If non-zero, a backup bootloader message starting at this offset in + the partition will tried in the event that the primary one (starting + at offset 0) fails its checksum. + endmenu menu "Blob list" -- cgit v1.1