From: Jaehoon Chung Date: Mon, 21 Dec 2020 05:06:57 +0000 (+0900) Subject: configs: amlogic: check a reboot reason to enter download mode X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7aee9d82f444573e087d0cc5545fd5294d4c15ad;p=platform%2Fkernel%2Fu-boot.git configs: amlogic: check a reboot reason to enter download mode Check a reboot reason to enter download mode. If reboot reason is download, it will be entered to download mode. Change-Id: I9a2223962ad49a19a2b084711107dd23e6c17b95 Signed-off-by: Jaehoon Chung --- diff --git a/configs/khadas-vim3_defconfig b/configs/khadas-vim3_defconfig index ba13efc9bd..c0f97b4e91 100644 --- a/configs/khadas-vim3_defconfig +++ b/configs/khadas-vim3_defconfig @@ -16,7 +16,7 @@ CONFIG_DEBUG_UART=y CONFIG_OF_BOARD_SETUP=y # CONFIG_DISPLAY_CPUINFO is not set CONFIG_USE_PREBOOT=y -CONFIG_PREBOOT="run mbr_check; echo Checking Func button state (for THOR download mode): \\\\\\\\c; sleep 0.25; if button Function; then thor; fi" +CONFIG_PREBOOT="run mbr_check; echo Checking Func button state (for THOR download mode): \\\\\\\\c; sleep 0.25; if button Function; then thor; fi; run reboot_check" # CONFIG_CONSOLE_MUX is not set CONFIG_MISC_INIT_R=y CONFIG_SYS_PROMPT="Khadas VIM3> " diff --git a/configs/khadas-vim3l_defconfig b/configs/khadas-vim3l_defconfig index 66f0bfb89f..24655a26ed 100644 --- a/configs/khadas-vim3l_defconfig +++ b/configs/khadas-vim3l_defconfig @@ -16,7 +16,7 @@ CONFIG_DEBUG_UART=y CONFIG_OF_BOARD_SETUP=y # CONFIG_DISPLAY_CPUINFO is not set CONFIG_USE_PREBOOT=y -CONFIG_PREBOOT="run mbr_check; echo Checking Func button state (for THOR download mode): \\\\\\\\c; sleep 0.25; if button Function; then thor; fi" +CONFIG_PREBOOT="run mbr_check; echo Checking Func button state (for THOR download mode): \\\\\\\\c; sleep 0.25; if button Function; then thor; fi; run reboot_check" CONFIG_MISC_INIT_R=y CONFIG_SYS_PROMPT="Khadas VIM3L> " # CONFIG_CMD_BDI is not set diff --git a/configs/odroid-c4_defconfig b/configs/odroid-c4_defconfig index e9fa74f621..90460d5a14 100644 --- a/configs/odroid-c4_defconfig +++ b/configs/odroid-c4_defconfig @@ -16,7 +16,7 @@ CONFIG_DEBUG_UART=y CONFIG_OF_BOARD_SETUP=y # CONFIG_DISPLAY_CPUINFO is not set CONFIG_USE_PREBOOT=y -CONFIG_PREBOOT="run mbr_check" +CONFIG_PREBOOT="run mbr_check; run reboot_check" # CONFIG_CONSOLE_MUX is not set CONFIG_MISC_INIT_R=y CONFIG_SYS_PROMPT="Odroid C4> " diff --git a/configs/odroid-n2_defconfig b/configs/odroid-n2_defconfig index f138325933..07de831159 100644 --- a/configs/odroid-n2_defconfig +++ b/configs/odroid-n2_defconfig @@ -16,7 +16,7 @@ CONFIG_DEBUG_UART=y CONFIG_OF_BOARD_SETUP=y # CONFIG_DISPLAY_CPUINFO is not set CONFIG_USE_PREBOOT=y -CONFIG_PREBOOT="run mbr_check" +CONFIG_PREBOOT="run mbr_check; run reboot_check" # CONFIG_CONSOLE_MUX is not set CONFIG_MISC_INIT_R=y CONFIG_SYS_PROMPT="Odroid N2> " diff --git a/include/samsung/tizen_amlogic.h b/include/samsung/tizen_amlogic.h index cf067c30c7..03a89939d1 100644 --- a/include/samsung/tizen_amlogic.h +++ b/include/samsung/tizen_amlogic.h @@ -128,6 +128,13 @@ "thor; " \ "fi" +#define REBOOT_CHECK \ + "sm reboot_reason reason; " \ + "echo \"reboot ${reason}\"; " \ + "if test ${reason} = download; then " \ + "thor; " \ + "fi" + #define TIZEN_ENV_SETTING \ "mmcbootpart=1\0" \ "mmcrootpart=2\0" \ @@ -147,6 +154,7 @@ "boot_prefixes=" TIZEN_BOOT_PREFIX "\0" \ "mbr_parts=" PARTS_DEFAULT "\0" \ "mbr_check=" MBR_CHECK "\0" \ + "reboot_check=" REBOOT_CHECK "\0" \ "splashimage=0x2000000\0" \ "splashsource=mmc_fs\0" \ "splashfile=tizen_logo.bmp.gz\0" \