aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Rigby <john.rigby@linaro.org>2012-02-16 08:43:20 -0700
committerJohn Rigby <john.rigby@linaro.org>2012-02-16 08:43:20 -0700
commit2265c2ee2558a2a0daa1a82ccbb27d9242a8029d (patch)
tree3e9763ea746d4d95710ed9edb1d4775fa948d71f
parent6f43c28fc88820a040b6626e0f28b5b4e7a47b4e (diff)
downloadu-boot-linaro-stable-2265c2ee2558a2a0daa1a82ccbb27d9242a8029d.tar.gz
OMAP4: add preEnv.txt support
Signed-off-by: John Rigby <john.rigby@linaro.org>
-rw-r--r--include/configs/omap4_common.h20
1 files changed, 19 insertions, 1 deletions
diff --git a/include/configs/omap4_common.h b/include/configs/omap4_common.h
index a7f6cc16a..aa8e148ef 100644
--- a/include/configs/omap4_common.h
+++ b/include/configs/omap4_common.h
@@ -166,7 +166,12 @@
"loadbootscript=fatload mmc ${mmcdev} ${loadaddr} ${bootscr}\0" \
"bootscript=echo Running bootscript from mmc${mmcdev} ...; " \
"source ${loadaddr}\0" \
- "loadbootenv=fatload mmc ${mmcdev} ${loadaddr} uEnv.txt\0" \
+ "preenv=preEnv.txt\0" \
+ "loadpreenv=fatload mmc ${mmcdev} ${loadaddr} ${preenv}\0" \
+ "importpreenv=echo Importing preboot environment from mmc ...; " \
+ "env import -t $loadaddr $filesize\0" \
+ "bootenv=uEnv.txt\0" \
+ "loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenv}\0" \
"importbootenv=echo Importing environment from mmc ...; " \
"env import -t $loadaddr $filesize\0" \
"loaduimage=fatload mmc ${mmcdev} ${loadaddr} uImage\0" \
@@ -177,6 +182,19 @@
"ramdisk_addr_r=0x81600000\0" \
"pxefile_addr_r=0x86000000\0"
+#define CONFIG_PREBOOT \
+ "echo checking for ${preenv};" \
+ "if mmc rescan ${mmcdev}; then " \
+ "if run loadpreenv; then " \
+ "echo Loaded environment from ${preenv};" \
+ "run importpreenv;" \
+ "if test -n $preenvcmd; then " \
+ "echo Running preenvcmd ...;" \
+ "run preenvcmd;" \
+ "fi;" \
+ "fi; " \
+ "fi; " \
+
#define CONFIG_BOOTCOMMAND \
"if mmc rescan ${mmcdev}; then " \
"if run loadbootenv; then " \