configs: ge_bx50v3: automatic partition selection and video output failure message
The exact definition of a successful boot is defined by user-space. Determine the boot partition automatically. A partition is selected if file `/boot/bootcause/firstboot' exists (meaning that the partition has freshly installed software) OR if file `/boot/fitImage' exists. When userspace determines that new software was successfully installed, it must (1) delete `/boot/fitImage' on the _inactive_ partition and (2) remove `/boot/bootcause/firstboot'. Enable video, but do not display logos or other version information. Silence kernel console logging by default. Print a message to VGA screen in case of boot failure and reset bootcount to allow the user to attempt boot again. Signed-off-by: Ian Ray <ian.ray@ge.com> Signed-off-by: Martyn Welch <martyn.welch@collabora.co.uk> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
This commit is contained in:
parent
f41a45830b
commit
9e41b54a2e
@ -108,39 +108,62 @@
|
|||||||
#define CONFIG_SYS_TEXT_BASE 0x17800000
|
#define CONFIG_SYS_TEXT_BASE 0x17800000
|
||||||
|
|
||||||
#define CONFIG_EXTRA_ENV_SETTINGS \
|
#define CONFIG_EXTRA_ENV_SETTINGS \
|
||||||
"script=boot.scr\0" \
|
"bootcause=POR\0" \
|
||||||
"bootlimit=10\0" \
|
"bootlimit=10\0" \
|
||||||
"image=/boot/fitImage\0" \
|
"image=/boot/fitImage\0" \
|
||||||
|
"fdt_high=0xffffffff\0" \
|
||||||
|
"dev=mmc\0" \
|
||||||
|
"devnum=1\0" \
|
||||||
|
"rootdev=mmcblk0p\0" \
|
||||||
|
"quiet=quiet loglevel=0\0" \
|
||||||
"console=" CONSOLE_DEV "\0" \
|
"console=" CONSOLE_DEV "\0" \
|
||||||
"fdt_high=0xffffffff\0" \
|
"setargs=setenv bootargs root=/dev/${rootdev}${partnum} " \
|
||||||
"sddev=0\0" \
|
"ro rootwait cma=128M " \
|
||||||
"emmcdev=1\0" \
|
"bootcause=${bootcause} " \
|
||||||
"partnum=1\0" \
|
"${quiet} console=${console} " \
|
||||||
"setargs=setenv bootargs console=${console},${baudrate} " \
|
|
||||||
"root=/dev/${rootdev} ro rootwait cma=128M " \
|
|
||||||
BX50V3_BOOTARGS_EXTRA "\0" \
|
BX50V3_BOOTARGS_EXTRA "\0" \
|
||||||
|
"doquiet=" \
|
||||||
|
"if ext2load ${dev} ${devnum}:5 0x7000A000 /boot/console; " \
|
||||||
|
"then setenv quiet; fi\0" \
|
||||||
|
"hasfirstboot=" \
|
||||||
|
"ext2load ${dev} ${devnum}:${partnum} 0x7000A000 " \
|
||||||
|
"/boot/bootcause/firstboot\0" \
|
||||||
|
"swappartitions=" \
|
||||||
|
"setexpr partnum 3 - ${partnum}\0" \
|
||||||
|
"failbootcmd=" \
|
||||||
|
"msg=\"Monitor failed to start. Try again, or contact GE Service for support.\"; " \
|
||||||
|
"echo $msg; " \
|
||||||
|
"setenv stdout vga; " \
|
||||||
|
"echo \"\n\n\n\n \" $msg; " \
|
||||||
|
"setenv stdout serial; " \
|
||||||
|
"mw.b 0x7000A000 0xbc; " \
|
||||||
|
"mw.b 0x7000A001 0x00; " \
|
||||||
|
"ext4write ${dev} ${devnum}:5 0x7000A000 /boot/failures 2\0" \
|
||||||
|
"altbootcmd=" \
|
||||||
|
"run doquiet; " \
|
||||||
|
"setenv partnum 1; run hasfirstboot || setenv partnum 2; " \
|
||||||
|
"run hasfirstboot || setenv partnum 0; " \
|
||||||
|
"if test ${partnum} != 0; then " \
|
||||||
|
"setenv bootcause REVERT; " \
|
||||||
|
"run swappartitions loadimage doboot; " \
|
||||||
|
"fi; " \
|
||||||
|
"run failbootcmd\0" \
|
||||||
"loadimage=" \
|
"loadimage=" \
|
||||||
"ext2load ${dev} ${devnum}:${partnum} ${loadaddr} ${image}\0" \
|
"ext2load ${dev} ${devnum}:${partnum} ${loadaddr} ${image}\0" \
|
||||||
"tryboot=" \
|
"doboot=" \
|
||||||
"if run loadimage; then " \
|
"echo Booting from ${dev}:${devnum}:${partnum} ...; " \
|
||||||
"run doboot; " \
|
|
||||||
"fi;\0" \
|
|
||||||
"doboot=echo Booting from ${dev}:${devnum}:${partnum} ...; " \
|
|
||||||
"run setargs; " \
|
"run setargs; " \
|
||||||
"bootm ${loadaddr}#conf@${confidx};\0 " \
|
"bootm ${loadaddr}#conf@${confidx}\0" \
|
||||||
|
"tryboot=" \
|
||||||
|
"setenv partnum 1; run hasfirstboot || setenv partnum 2; " \
|
||||||
|
"run loadimage || run swappartitions && run loadimage || " \
|
||||||
|
"setenv partnum 0 && echo MISSING IMAGE;" \
|
||||||
|
"run doboot; " \
|
||||||
|
"run failbootcmd\0" \
|
||||||
|
|
||||||
#define CONFIG_MMCBOOTCOMMAND \
|
#define CONFIG_MMCBOOTCOMMAND \
|
||||||
"setenv dev mmc; " \
|
|
||||||
"setenv devnum ${emmcdev}; " \
|
|
||||||
\
|
|
||||||
"if ext2load ${dev} ${devnum}:5 0x7000A000 /boot/active/boot.img ; " \
|
|
||||||
"then " \
|
|
||||||
"source 0x7000A000; " \
|
|
||||||
"fi; " \
|
|
||||||
\
|
|
||||||
"setenv rootdev mmcblk0p${partnum}; " \
|
|
||||||
\
|
|
||||||
"if mmc dev ${devnum}; then " \
|
"if mmc dev ${devnum}; then " \
|
||||||
|
"run doquiet; " \
|
||||||
"run tryboot; " \
|
"run tryboot; " \
|
||||||
"fi; " \
|
"fi; " \
|
||||||
|
|
||||||
@ -195,16 +218,17 @@
|
|||||||
#define CONFIG_SYS_FSL_USDHC_NUM 3
|
#define CONFIG_SYS_FSL_USDHC_NUM 3
|
||||||
|
|
||||||
/* Framebuffer */
|
/* Framebuffer */
|
||||||
|
#define CONFIG_VIDEO
|
||||||
#ifdef CONFIG_VIDEO
|
#ifdef CONFIG_VIDEO
|
||||||
#define CONFIG_VIDEO_IPUV3
|
#define CONFIG_VIDEO_IPUV3
|
||||||
#define CONFIG_VIDEO_BMP_RLE8
|
#define CONFIG_CFB_CONSOLE
|
||||||
#define CONFIG_SPLASH_SCREEN
|
#define CONFIG_VGA_AS_SINGLE_DEVICE
|
||||||
#define CONFIG_SPLASH_SCREEN_ALIGN
|
#define CONFIG_SYS_CONSOLE_FG_COL 0xFF
|
||||||
#define CONFIG_BMP_16BPP
|
#define CONFIG_SYS_CONSOLE_BG_COL 0x00
|
||||||
#define CONFIG_VIDEO_LOGO
|
#define CONFIG_HIDE_LOGO_VERSION
|
||||||
#define CONFIG_VIDEO_BMP_LOGO
|
|
||||||
#define CONFIG_IMX_HDMI
|
#define CONFIG_IMX_HDMI
|
||||||
#define CONFIG_IMX_VIDEO_SKIP
|
#define CONFIG_IMX_VIDEO_SKIP
|
||||||
|
#define CONFIG_CMD_BMP
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define CONFIG_PWM_IMX
|
#define CONFIG_PWM_IMX
|
||||||
|
Loading…
Reference in New Issue
Block a user