summaryrefslogtreecommitdiff
path: root/include/configs/nokia_rx51.h
diff options
context:
space:
mode:
authorPali Rohár <pali@kernel.org>2021-06-18 15:27:04 +0200
committerLokesh Vutla <lokeshvutla@ti.com>2021-07-15 17:56:05 +0530
commitf75b7b82a3b63fd7abac8d89bff1f6bd51f41378 (patch)
treeceb71d6206d84ceebebcd4ee3259b85bbcacd10a /include/configs/nokia_rx51.h
parentcc434fccba4ccf8e3645346f3ae49e7b33733dc9 (diff)
downloadu-boot-f75b7b82a3b63fd7abac8d89bff1f6bd51f41378.tar.gz
u-boot-f75b7b82a3b63fd7abac8d89bff1f6bd51f41378.tar.bz2
u-boot-f75b7b82a3b63fd7abac8d89bff1f6bd51f41378.zip
Nokia RX-51: Load bootmenu also from uSD card
By default bootmenu is loaded only from eMMC. After this change U-Boot first tries to load bootmenu from uSD card and if it fails then fallback to eMMC. People want to boot alternative OS from removable uSD without need to modify eMMC content. So this backward compatible change allows it. Part of this change is also optimization of trymmc* macros so they can be used in preboot macro for loading bootmenu. Signed-off-by: Pali Rohár <pali@kernel.org> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Link: https://lore.kernel.org/r/20210618132704.32066-2-pali@kernel.org
Diffstat (limited to 'include/configs/nokia_rx51.h')
-rw-r--r--include/configs/nokia_rx51.h35
1 files changed, 9 insertions, 26 deletions
diff --git a/include/configs/nokia_rx51.h b/include/configs/nokia_rx51.h
index 742c1a6465..7ef25ea838 100644
--- a/include/configs/nokia_rx51.h
+++ b/include/configs/nokia_rx51.h
@@ -138,23 +138,10 @@ int rx51_kp_getc(struct stdio_dev *sdev);
"setenv setup_omap_atag 1;" \
"bootm ${attkernaddr} || bootz ${attkernaddr};" \
"setenv setup_omap_atag\0" \
- "trymmcscriptboot=if run switchmmc; then " \
- "if run scriptload; then " \
- "run scriptboot;" \
- "fi;" \
- "fi\0" \
- "trymmckernboot=if run switchmmc; then " \
- "if run kernload; then " \
- "run kernboot;" \
- "fi;" \
- "fi\0" \
- "trymmckerninitrdboot=if run switchmmc; then " \
- "if run initrdload; then " \
- "if run kernload; then " \
- "run kerninitrdboot;" \
- "fi;" \
- "fi; " \
- "fi\0" \
+ "trymmcscriptboot=run switchmmc && run scriptload && run scriptboot\0" \
+ "trymmckernboot=run switchmmc && run kernload && run kernboot\0" \
+ "trymmckerninitrdboot=run switchmmc && run initrdload && " \
+ "run kernload && run kerninitrdboot\0" \
"trymmcpartboot=setenv mmcscriptfile boot.scr; run trymmcscriptboot;" \
"setenv mmckernfile uImage; run trymmckernboot;" \
"setenv mmckernfile zImage; run trymmckernboot\0" \
@@ -170,15 +157,11 @@ int rx51_kp_getc(struct stdio_dev *sdev);
"fi\0" \
"emmcboot=setenv mmcnum 1; run trymmcboot\0" \
"sdboot=setenv mmcnum 0; run trymmcboot\0" \
- "preboot=setenv mmcnum 1; setenv mmcpart 1;" \
- "setenv mmcscriptfile bootmenu.scr;" \
- "if run switchmmc; then " \
- "setenv mmctype fat;" \
- "if run scriptload; then run scriptboot; else " \
- "setenv mmctype ext4;" \
- "if run scriptload; then run scriptboot; fi;" \
- "fi;" \
- "fi;" \
+ "trymmcbootmenu=setenv mmctype fat && run trymmcscriptboot || " \
+ "setenv mmctype ext4 && run trymmcscriptboot\0" \
+ "preboot=setenv mmcpart 1; setenv mmcscriptfile bootmenu.scr;" \
+ "setenv mmcnum 0 && run trymmcbootmenu || " \
+ "setenv mmcnum 1 && run trymmcbootmenu;" \
"if run slide; then true; else " \
"setenv bootmenu_delay 0;" \
"setenv bootdelay 0;" \