summaryrefslogtreecommitdiff
path: root/include/configs/meson64_android.h
diff options
context:
space:
mode:
authorMattijs Korpershoek <mkorpershoek@baylibre.com>2021-07-30 14:28:08 +0200
committerNeil Armstrong <narmstrong@baylibre.com>2021-07-30 14:54:03 +0200
commit9d0ac61642a9f4a627ce43760e45987859772a73 (patch)
tree0a7626948108f03ac868e7e2a3506414a172c608 /include/configs/meson64_android.h
parent143e153385f67943f66832d702c29e0087a3512c (diff)
configs: meson64_android: use BCB for reboot to bootloader
As of today, we use a "vendor specific" secure monitor call for the reboot reason (sm). We should not need this. Android uses the BCB (Bootloader Control Block) to communicate with the bootloader. Implement "reboot into bootloader" using the standard BCB way instead of using sm calls. Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Acked-by: Neil Armstrong <narmstrong@baylibre.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Diffstat (limited to 'include/configs/meson64_android.h')
-rw-r--r--include/configs/meson64_android.h26
1 files changed, 13 insertions, 13 deletions
diff --git a/include/configs/meson64_android.h b/include/configs/meson64_android.h
index 3b61d5f703..d732032d1f 100644
--- a/include/configs/meson64_android.h
+++ b/include/configs/meson64_android.h
@@ -17,9 +17,12 @@
#define LOGO_PARTITION "logo"
#endif
+#ifndef CONTROL_PARTITION
+#define CONTROL_PARTITION "misc"
+#endif
+
#define BOOTENV_DEV_FASTBOOT(devtypeu, devtypel, instance) \
"bootcmd_fastboot=" \
- "sm reboot_reason reason;" \
"setenv run_fastboot 0;" \
"if test \"${boot_source}\" = \"usb\"; then " \
"echo Fastboot forced by usb rom boot;" \
@@ -30,18 +33,15 @@
"echo Broken MMC partition scheme;" \
"setenv run_fastboot 1;" \
"fi;" \
- "if test \"${reason}\" = \"bootloader\" -o " \
- "\"${reason}\" = \"fastboot\"; then " \
- "echo Fastboot asked by reboot reason;" \
- "setenv run_fastboot 1;" \
- "fi;" \
- "if test \"${skip_fastboot}\" -eq 1; then " \
- "echo Fastboot skipped by environment;" \
- "setenv run_fastboot 0;" \
- "fi;" \
- "if test \"${force_fastboot}\" -eq 1; then " \
- "echo Fastboot forced by environment;" \
- "setenv run_fastboot 1;" \
+ "if bcb load " __stringify(CONFIG_FASTBOOT_FLASH_MMC_DEV) " " \
+ CONTROL_PARTITION "; then " \
+ "if bcb test command = bootonce-bootloader; then " \
+ "echo BCB: Bootloader boot...; " \
+ "bcb clear command; bcb store; " \
+ "setenv run_fastboot 1;" \
+ "fi; " \
+ "else " \
+ "echo Warning: BCB is corrupted or does not exist; " \
"fi;" \
"if test \"${run_fastboot}\" -eq 1; then " \
"echo Running Fastboot...;" \