u-boot/common
David Anderson a6a7bd8883 common: android_ab: do not attempt to round-robin bootable slots.
This feature does not quite fit within the A/B flow.

The intent of A/B is to provide an automatic rollback option for broken
OTAs. Once an OTA has been applied, the slot may not boot for a number
of reasons (power loss, broken package, etc), and it is important to
make consistent attempts to boot to the new slot rather than find *a*
bootable slot (otherwise, the update may not take).

Note that once a slot has been marked bootable, encryption keys are
upgraded, and old slots will not work. Trying to rotate between slots
is not likely to succeed.

Note that Android ensures that the active slot always has the
highest priority. In the current u-boot implementation, this affords no
possibility of rollback.

To match the expected A/B flow, this patch makes the following changes:
 - When initializing the BCB, set the "_a" slot to have the highest
   priority.
 - Pick the highest priority slot that has been marked successful OR has
   boot tries remaining.
 - If no such slot exists, the system is not bootable.

Link: https://android-review.googlesource.com/c/platform/external/u-boot/+/1446442
Signed-off-by: Guillaume La Roque <glaroque@baylibre.com>
2022-05-12 11:49:16 -05:00
..
eeprom
init CONFIG_NR_DRAM_BANKS: Remove unreferenced code as its always defined 2020-08-26 09:19:16 +02:00
spl spl: fit: Skip attempting to load 0 length image 2022-01-04 14:41:34 -06:00
Kconfig common: update: add a generic interface for FIT image 2020-10-30 14:20:27 +01:00
Kconfig.boot x86: Use CONFIG_CHROMEOS_VBOOT for verified boot 2020-11-06 09:51:31 +08:00
Makefile common: make: Support show_board_info() as part of SPL build 2021-06-29 17:49:02 -05:00
android_ab.c common: android_ab: do not attempt to round-robin bootable slots. 2022-05-12 11:49:16 -05:00
autoboot.c common: rename getc() to getchar() 2020-10-22 09:54:53 -04:00
avb_verify.c avb: Make AVB independent of fastboot 2020-08-24 14:11:13 -04:00
bedbug.c common: Drop asm/ptrace.h from common header 2020-05-18 21:19:23 -04:00
bloblist.c bloblist: Allow custom alignment for blobs 2020-10-06 09:07:54 -06:00
board_f.c board: Show memory for frame buffers 2020-10-22 09:54:52 -04:00
board_info.c common: Drop init.h from common header 2020-05-18 17:33:33 -04:00
board_r.c Pull request for UEFI sub-system for efi-2021-01-rc2 (2) 2020-11-01 10:56:37 -05:00
boot_fit.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
bootm.c bootm: Store OS start and end info in images structure 2021-07-21 13:14:44 -05:00
bootm_os.c efi_loader: returning from UEFI FIT images 2020-07-22 12:32:42 +02:00
bootretry.c
bootstage.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
bouncebuf.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
cli.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
cli_hush.c cli_hush.c: remove broken sanity check 2020-10-22 09:54:53 -04:00
cli_readline.c common: rename getc() to getchar() 2020-10-22 09:54:53 -04:00
cli_simple.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
command.c command: Drop #ifdef for MEM_SUPPORT_64BIT_DATA 2020-07-08 17:21:46 -04:00
common_fit.c common: fit: add missing newline 2020-11-19 09:45:49 -05:00
console.c common: rename getc() to getchar() 2020-10-22 09:54:53 -04:00
cros_ec.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
ddr_spd.c
dfu.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
dlmalloc.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
dlmalloc.src
edid.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
exports.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
fdt_region.c lib: libfdt: fdt_region: avoid NULL pointer access 2020-07-25 14:46:57 -06:00
fdt_support.c spl: fdt: Record load/entry fit-images entries in 64bit format 2020-10-27 08:13:32 +01:00
flash.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
hash.c common: hash: Remove a debug printf statement 2020-06-16 11:36:30 -04:00
hwconfig.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
image-android-dt.c
image-android.c image: android: fix abootimg support 2020-06-02 13:06:12 -04:00
image-cipher.c fit: cipher: aes: allow to read the IV in the FIT image 2020-10-12 21:30:38 -04:00
image-fdt.c cmd: Fixup DT to pass PStore Ramoops parameters 2020-10-14 11:16:34 -04:00
image-fit-sig.c vboot: add DTB policy for supporting multiple required conf keys 2020-10-12 21:30:37 -04:00
image-fit.c common: fit: Update board_fit_image_post_process() to pass fit and node_offset 2021-03-23 17:18:13 -05:00
image-sig.c Add support for SHA384 and SHA512 2020-06-12 13:14:07 -04:00
image.c cosmetic: image: Fix comments and the order of definitions 2020-10-22 09:54:52 -04:00
iomux.c
iotrace.c common: Drop linux/bug.h from common header 2020-05-18 21:19:23 -04:00
kallsyms.c
kgdb.c common: Drop asm/ptrace.h from common header 2020-05-18 21:19:23 -04:00
kgdb_stubs.c common: Drop asm/ptrace.h from common header 2020-05-18 21:19:23 -04:00
lcd.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
lcd_console.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
lcd_console_rotation.c
lcd_simplefb.c
log.c x86: zimage: Add a little more logging 2020-11-06 09:51:34 +08:00
log_console.c log: Add a flag to enable log drivers 2020-10-10 16:50:11 -04:00
log_syslog.c log: syslog: Handle errors in net_init 2020-10-10 16:50:12 -04:00
lynxkdi.c
main.c common: Drop bootstage.h from common header 2020-05-18 17:33:33 -04:00
malloc_simple.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
memsize.c
menu.c menu: add support for client defined statusline function 2020-05-07 09:01:42 -04:00
miiphyutil.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
s_record.c
splash.c splash: Fix build warning on 64 bits CPU 2020-06-28 01:03:09 +02:00
splash_source.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
stdio.c eb_cpu5282: fix CONFIG_DM_VIDEO build warnings 2020-10-26 20:55:29 +01:00
system_map.c
update.c common: update: fix an "unused" warning against update_flash() 2020-12-02 16:21:58 -05:00
usb.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
usb_hub.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
usb_kbd.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
usb_storage.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
xyzModem.c common: rename getc() to getchar() 2020-10-22 09:54:53 -04:00