summaryrefslogtreecommitdiff
path: root/include/configs
diff options
context:
space:
mode:
authorJagan Teki <jagan@amarulasolutions.com>2017-05-06 21:13:02 (GMT)
committerStefano Babic <sbabic@denx.de>2017-05-18 09:23:31 (GMT)
commit9786496cdc6fd6c31a16f2b8e8d7570c01e69de5 (patch)
tree6f2a901cdc20121ad7d7fad3da6071f974af66b7 /include/configs
parent4bbd40596b52203158333cfcd56f64f92b04a7f3 (diff)
downloadu-boot-fsl-qoriq-9786496cdc6fd6c31a16f2b8e8d7570c01e69de5.tar.xz
geam6ul: Add modeboot env via board_late_init
Add runtime, modeboot env which is setting mmcboot, or nandboot based on the bootdevice so-that conditional macros b/w MMC and NAND for CONFIG_BOOTCOMMAND should be avoided in config files. Cc: Matteo Lisi <matteo.lisi@engicam.com> Cc: Michael Trimarchi <michael@amarulasolutions.com> Cc: Stefano Babic <sbabic@denx.de> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Diffstat (limited to 'include/configs')
-rw-r--r--include/configs/imx6ul_geam.h35
1 files changed, 16 insertions, 19 deletions
diff --git a/include/configs/imx6ul_geam.h b/include/configs/imx6ul_geam.h
index 8bffacd..e9a1a06 100644
--- a/include/configs/imx6ul_geam.h
+++ b/include/configs/imx6ul_geam.h
@@ -63,7 +63,7 @@
"fitboot=echo Booting FIT image from mmc ...; " \
"run mmcargs; " \
"bootm ${loadaddr}\0" \
- "mmcboot=echo Booting from mmc ...; " \
+ "_mmcboot=run mmcargs; " \
"run mmcargs; " \
"if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
"if run loadfdt; then " \
@@ -78,6 +78,20 @@
"else " \
"bootm; " \
"fi\0" \
+ "mmcboot=echo Booting from mmc ...; " \
+ "if mmc rescan; then " \
+ "if run loadbootscript; then " \
+ "run bootscript; " \
+ "else " \
+ "if run loadfit; then " \
+ "run fitboot; " \
+ "else " \
+ "if run loadimage; then " \
+ "run _mmcboot; " \
+ "fi; " \
+ "fi; " \
+ "fi; " \
+ "fi\0" \
"nandboot=echo Booting from nand ...; " \
"if mtdparts; then " \
"echo Starting nand boot ...; " \
@@ -89,24 +103,7 @@
"nand read ${fdt_addr} dtb 0x100000; " \
"bootm ${loadaddr} - ${fdt_addr}\0"
-#ifdef CONFIG_NAND_MXS
-# define CONFIG_BOOTCOMMAND "run nandboot"
-#else
-# define CONFIG_BOOTCOMMAND \
- "if mmc rescan; then " \
- "if run loadbootscript; then " \
- "run bootscript; " \
- "else " \
- "if run loadfit; then " \
- "run fitboot; " \
- "else " \
- "if run loadimage; then " \
- "run mmcboot; " \
- "fi; " \
- "fi; " \
- "fi; " \
- "fi"
-#endif
+#define CONFIG_BOOTCOMMAND "run $modeboot"
/* Miscellaneous configurable options */
#define CONFIG_SYS_MEMTEST_START 0x80000000