aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMarek Vasut <marex@denx.de>2021-09-12 00:40:00 +0200
committerStefano Babic <sbabic@denx.de>2021-10-19 12:36:51 +0200
commitabc6eee0e76f5418f64f8a95878ac2bd6d2b2e69 (patch)
tree60c6d83f63b48bebdd313906ceaff3fa00af3ab7 /include
parent521418daee7a1a78503d763c756df424b8fde821 (diff)
downloadu-boot-abc6eee0e76f5418f64f8a95878ac2bd6d2b2e69.zip
u-boot-abc6eee0e76f5418f64f8a95878ac2bd6d2b2e69.tar.gz
u-boot-abc6eee0e76f5418f64f8a95878ac2bd6d2b2e69.tar.bz2
ARM: imx: mx5: Add altbootcmd and resets to M53Menlo
Bulletproof the default boot command with reset statements in case any command in the chain would fail. In case a failure were to happen, the board will reset, increment boot counter and retry the procedure. In case the failures persist and the boot counter reaches the bootlimit, U-Boot starts altbootcmd instead of the default bootcmd boot command. The altbootcmd swaps the default boot partition for the other boot partition, which is an identical copy or an older copy, and tries booting from that one instead. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Stefano Babic <sbabic@denx.de>
Diffstat (limited to 'include')
-rw-r--r--include/configs/m53menlo.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/include/configs/m53menlo.h b/include/configs/m53menlo.h
index 5dd5dda..375a758 100644
--- a/include/configs/m53menlo.h
+++ b/include/configs/m53menlo.h
@@ -161,6 +161,13 @@
"splashfile=boot/usplash.bmp.gz\0" \
"splashimage=0x88000000\0" \
"splashpos=m,m\0" \
+ "altbootcmd=" \
+ "if test ${mmcpart} -eq 1 ; then " \
+ "setenv mmcpart 2 ; " \
+ "else " \
+ "setenv mmcpart 1 ; " \
+ "fi ; " \
+ "boot\0" \
"stdout=serial,vidconsole\0" \
"stderr=serial,vidconsole\0" \
"addcons=" \
@@ -175,14 +182,14 @@
"setenv bootargs ${bootargs} ${miscargs}\0" \
"addargs=run addcons addmisc addmtd\0" \
"mmcload=" \
- "mmc rescan ; load mmc ${mmcdev}:${mmcpart} " \
- "${kernel_addr_r} ${bootfile}\0" \
+ "mmc rescan || reset ; load mmc ${mmcdev}:${mmcpart} " \
+ "${kernel_addr_r} ${bootfile} || reset\0" \
"miscargs=nohlt panic=1\0" \
"mmcargs=setenv bootargs root=/dev/mmcblk0p${mmcpart} rw " \
"rootwait\0" \
"mmc_mmc=" \
- "run mmcload mmcargs addargs ; " \
- "bootm ${kernel_addr_r}\0" \
+ "run mmcload mmcargs addargs || reset ; " \
+ "bootm ${kernel_addr_r} ; reset\0" \
"netload=tftp ${kernel_addr_r} ${hostname}/${bootfile}\0" \
"net_nfs=" \
"run netload nfsargs addip addargs ; " \