]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
configs: meson64_android: add PANIC stage for SYSTEM fails
authorNeil Armstrong <narmstrong@baylibre.com>
Wed, 17 Nov 2021 11:04:11 +0000 (12:04 +0100)
committerNeil Armstrong <narmstrong@baylibre.com>
Fri, 19 Nov 2021 17:15:26 +0000 (18:15 +0100)
If bootloader was updated without running oem format, reboot will cause
boot loop because the SYSTEM stage fails.

Add a final PANIC stage running fastboot to permit recovery.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
include/configs/meson64_android.h

index 93d8f8ec99de6b760dcc5971a7dec7840fe529d8..7cd1ab034118ce9f8017cbf96fdcc2d8beb62362 100644 (file)
                        "echo Running Android...;" \
                        BOOT_CMD \
                "fi;" \
-               "echo Failed to boot Android...;" \
-               "reset\0"
+               "echo Failed to boot Android...;\0"
 
 #define BOOTENV_DEV_NAME_SYSTEM(devtypeu, devtypel, instance)  \
                "system "
 
+#define BOOTENV_DEV_PANIC(devtypeu, devtypel, instance) \
+       "bootcmd_panic=" \
+               "fastboot " __stringify(CONFIG_FASTBOOT_USB_DEV) "; " \
+               "reset\0"
+
+#define BOOTENV_DEV_NAME_PANIC(devtypeu, devtypel, instance)   \
+               "panic "
+
 #define BOOT_TARGET_DEVICES(func) \
        func(FASTBOOT, fastboot, na) \
        func(RECOVERY, recovery, na) \
        func(SYSTEM, system, na) \
+       func(PANIC, panic, na) \
 
 #define PREBOOT_LOAD_LOGO \
        "if test \"${boot_source}\" != \"usb\" && " \