summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Warren <swarren@wwwdotorg.org>2014-02-06 03:49:22 (GMT)
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>2014-02-21 14:30:18 (GMT)
commit5c92d4823d2d5de03ea63cb3fbfc898c39cf199c (patch)
treed8f354f2c7ef054360f5a3b613f501385e7afa87
parent29235b73373f28f2516d2eafbf6ec76ecf8051a3 (diff)
downloadu-boot-fsl-qoriq-5c92d4823d2d5de03ea63cb3fbfc898c39cf199c.tar.xz
ARM: rpi_b: load /uEnv.txt from MMC at startup
The Pi has no flash to store an environment in the usual fashion. However, the user may wish to customize the environment. We know that the SD card must be present, since that's where the boot ROM has loaded U-Boot from. So, load uEnv.txt from there early during boot. This allows the user to e.g. customize boot_targets, in order to automatically select network boot. Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
-rw-r--r--include/configs/rpi_b.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/configs/rpi_b.h b/include/configs/rpi_b.h
index 202c9c3..4b5a0c2 100644
--- a/include/configs/rpi_b.h
+++ b/include/configs/rpi_b.h
@@ -95,6 +95,11 @@
#define CONFIG_SYS_LOAD_ADDR 0x1000000
#define CONFIG_CONSOLE_MUX
#define CONFIG_SYS_CONSOLE_IS_IN_ENV
+#define CONFIG_PREBOOT \
+ "if load mmc 0:1 ${loadaddr} /uEnv.txt; then " \
+ "env import -t ${loadaddr} ${filesize}; " \
+ "fi"
+
/*
* Memory layout for where various images get loaded by boot scripts:
*