CONFIG_BOOTSTD_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_BOOTSTD_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_BOOTSTD_DEFAULTS=y
CONFIG_OF_BOARD_SETUP=y
CONFIG_USE_PREBOOT=y
-CONFIG_PREBOOT="pci enum; usb start;"
+CONFIG_PREBOOT="pci enum; usb start; run mbr_check"
CONFIG_SYS_STDIO_DEREGISTER=y
# CONFIG_DISPLAY_CPUINFO is not set
# CONFIG_DISPLAY_BOARDINFO is not set
CONFIG_BOOTSTD_DEFAULTS=y
CONFIG_OF_BOARD_SETUP=y
CONFIG_USE_PREBOOT=y
-CONFIG_PREBOOT="pci enum; usb start;"
+CONFIG_PREBOOT="pci enum; usb start; run mbr_check"
CONFIG_SYS_STDIO_DEREGISTER=y
# CONFIG_DISPLAY_CPUINFO is not set
# CONFIG_DISPLAY_BOARDINFO is not set
"name=reserved2,size=125M,id=0x83;" \
""
+#define MBR_CHECK \
+ "env default mbr_parts; " \
+ "if mbr verify ${dfu_interface} ${dfu_device}; " \
+ "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; " \
+ "fi"
+
#ifdef CONFIG_TARGET_RPI_4_32B
#define TIZEN_VC_MEM "vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 swiotlb=8192 "
#else
"dfu_interface=mmc\0" \
"dfu_device=" __stringify(CONFIG_MMC_DEFAULT_DEV) "\0" \
"mbr_parts=" PARTS_DEFAULT "\0" \
+ "mbr_check=" MBR_CHECK "\0" \
""
#endif /* __CONFIG_TIZEN_RPI_H */