From: Marek Szyprowski Date: Thu, 28 Jan 2021 08:55:49 +0000 (+0100) Subject: tizen: rpi: move MBR check to tizen-boot-rpi{3,4}.scr X-Git-Tag: submit/tizen/20211123.233157~31 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=07e50467279e25a3792219bb67355cee4d936bf1;p=platform%2Fkernel%2Fu-boot.git tizen: rpi: move MBR check to tizen-boot-rpi{3,4}.scr Move the MBR check to tizen-boot-rpi{3,4}.scr and adjust it to the optional USB boot. User request is changed to 'Press ENTER to continue' if verify fails to allow script continuation. Signed-off-by: Marek Szyprowski Change-Id: I45e530d63c449a21b4befbfeee0d55551d95b3c4 --- diff --git a/configs/rpi_3_32b_defconfig b/configs/rpi_3_32b_defconfig index db7a3e2b13..94e5142abb 100644 --- a/configs/rpi_3_32b_defconfig +++ b/configs/rpi_3_32b_defconfig @@ -10,11 +10,11 @@ CONFIG_DEFAULT_DEVICE_TREE="bcm2837-rpi-3-b" CONFIG_DISTRO_DEFAULTS=y CONFIG_OF_BOARD_SETUP=y CONFIG_USE_PREBOOT=y -CONFIG_PREBOOT="run mbr_check" # CONFIG_DISPLAY_CPUINFO is not set # CONFIG_DISPLAY_BOARDINFO is not set CONFIG_MISC_INIT_R=y CONFIG_SYS_PROMPT="U-Boot> " +CONFIG_CMD_ASKENV=y CONFIG_CMD_GPIO=y CONFIG_CMD_MBR=y CONFIG_CMD_MMC=y diff --git a/configs/rpi_3_defconfig b/configs/rpi_3_defconfig index 5014d6aaa8..2dfbfcac5e 100644 --- a/configs/rpi_3_defconfig +++ b/configs/rpi_3_defconfig @@ -10,11 +10,11 @@ CONFIG_DEFAULT_DEVICE_TREE="bcm2837-rpi-3-b" CONFIG_DISTRO_DEFAULTS=y CONFIG_OF_BOARD_SETUP=y CONFIG_USE_PREBOOT=y -CONFIG_PREBOOT="run mbr_check" # CONFIG_DISPLAY_CPUINFO is not set # CONFIG_DISPLAY_BOARDINFO is not set CONFIG_MISC_INIT_R=y CONFIG_SYS_PROMPT="U-Boot> " +CONFIG_CMD_ASKENV=y CONFIG_CMD_GPIO=y CONFIG_CMD_MBR=y CONFIG_CMD_MMC=y diff --git a/configs/rpi_4_32b_defconfig b/configs/rpi_4_32b_defconfig index 6777e0fb0d..c9d4099c45 100644 --- a/configs/rpi_4_32b_defconfig +++ b/configs/rpi_4_32b_defconfig @@ -7,13 +7,14 @@ CONFIG_ENV_SIZE=0x4000 CONFIG_DISTRO_DEFAULTS=y CONFIG_OF_BOARD_SETUP=y CONFIG_USE_PREBOOT=y -CONFIG_PREBOOT="pci enum; usb start; run mbr_check" +CONFIG_PREBOOT="pci enum; usb start" CONFIG_SYS_STDIO_DEREGISTER=y # CONFIG_DISPLAY_CPUINFO is not set # CONFIG_DISPLAY_BOARDINFO is not set CONFIG_MISC_INIT_R=y CONFIG_SYS_PROMPT="U-Boot> " CONFIG_CMD_THOR_DOWNLOAD=y +CONFIG_CMD_ASKENV=y CONFIG_CMD_DFU=y CONFIG_CMD_GPIO=y CONFIG_CMD_MBR=y diff --git a/configs/rpi_4_defconfig b/configs/rpi_4_defconfig index d1b57b5779..46f2bc2344 100644 --- a/configs/rpi_4_defconfig +++ b/configs/rpi_4_defconfig @@ -7,13 +7,14 @@ CONFIG_ENV_SIZE=0x4000 CONFIG_DISTRO_DEFAULTS=y CONFIG_OF_BOARD_SETUP=y CONFIG_USE_PREBOOT=y -CONFIG_PREBOOT="pci enum; usb start; run mbr_check" +CONFIG_PREBOOT="pci enum; usb start" CONFIG_SYS_STDIO_DEREGISTER=y # CONFIG_DISPLAY_CPUINFO is not set # CONFIG_DISPLAY_BOARDINFO is not set CONFIG_MISC_INIT_R=y CONFIG_SYS_PROMPT="U-Boot> " CONFIG_CMD_THOR_DOWNLOAD=y +CONFIG_CMD_ASKENV=y CONFIG_CMD_DFU=y CONFIG_CMD_GPIO=y CONFIG_CMD_MBR=y diff --git a/include/samsung/tizen_rpi.h b/include/samsung/tizen_rpi.h index 08f22edfaf..5919c19400 100644 --- a/include/samsung/tizen_rpi.h +++ b/include/samsung/tizen_rpi.h @@ -57,11 +57,11 @@ #define MBR_CHECK \ "env default mbr_parts; " \ - "if mbr verify ${dfu_interface} ${dfu_device}; " \ + "if mbr verify ${bootdev} ${mmcbootdev}; " \ "then true; else " \ "echo \"MBR partition layout does not match flashed bootloader!\"; " \ - "echo \"Please format SD card with recent sd_fusing_rpi3.sh script or Ctrl-C to continue.\"; " \ - "while sleep 2; do echo .\\\\\\\\c; done; echo; " \ + "echo \"Please format SD card with recent sd_fusing_rpi3.sh script.\"; " \ + "askenv tmp \"Press ENTER to continue\"; " \ "fi" #ifdef CONFIG_TARGET_RPI_4_32B diff --git a/tizen/bootscript/tizen-boot-rpi3.scr b/tizen/bootscript/tizen-boot-rpi3.scr index 0cbe8a8a83..fc59caf53a 100644 --- a/tizen/bootscript/tizen-boot-rpi3.scr +++ b/tizen/bootscript/tizen-boot-rpi3.scr @@ -7,6 +7,9 @@ if test "${target}" = "usb0"; then; setenv bootdev usb fi +echo "Tizen: checking partition layout on boot device" +run mbr_check + if test -e $bootdev $mmcbootdev:$mmcinformpart $rebootparamfile; then; ext4load $bootdev $mmcbootdev:$mmcinformpart $rebootparam_addr $rebootparamfile; if itest.l *${rebootparam_addr} == ${upgrade_val}; then; diff --git a/tizen/bootscript/tizen-boot-rpi4.scr b/tizen/bootscript/tizen-boot-rpi4.scr index 1ee425d241..6a8b8afde9 100644 --- a/tizen/bootscript/tizen-boot-rpi4.scr +++ b/tizen/bootscript/tizen-boot-rpi4.scr @@ -7,6 +7,9 @@ if test "${target}" = "usb0"; then; setenv bootdev usb fi +echo "Tizen: checking partition layout on boot device" +run mbr_check + if test -e $bootdev $mmcbootdev:$mmcinformpart $rebootparamfile; then; ext4load $bootdev $mmcbootdev:$mmcinformpart $rebootparam_addr $rebootparamfile; if itest.l *${rebootparam_addr} == ${upgrade_val}; then;