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 <jh80.chung@samsung.com>
CONFIG_DEBUG_UART=y
CONFIG_OF_BOARD_SETUP=y
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_DISPLAY_CPUINFO is not set
CONFIG_DEBUG_UART=y
CONFIG_OF_BOARD_SETUP=y
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_DISPLAY_CPUINFO is not set
CONFIG_SYS_PROMPT="Khadas VIM3L> "
CONFIG_DEBUG_UART=y
CONFIG_OF_BOARD_SETUP=y
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_DISPLAY_CPUINFO is not set
CONFIG_DEBUG_UART=y
CONFIG_OF_BOARD_SETUP=y
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_DISPLAY_CPUINFO is not set
"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" \
"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" \