summaryrefslogtreecommitdiffstats
path: root/include/configs/ti_armv7_common.h
diff options
context:
space:
mode:
authorLokesh Vutla <lokeshvutla@ti.com>2016-03-09 15:39:35 +0530
committerTom Rini <trini@konsulko.com>2016-03-15 21:30:17 -0400
commit18c534bbfbe9355fc5373547f4f89384a29da516 (patch)
tree9d92c14c0dc5fad3fc2a896f30feaa7b1b02bce1 /include/configs/ti_armv7_common.h
parent592bc5e2696b681715f9a937d7ca0949d613f816 (diff)
downloadtalos-obmc-uboot-18c534bbfbe9355fc5373547f4f89384a29da516.tar.gz
talos-obmc-uboot-18c534bbfbe9355fc5373547f4f89384a29da516.zip
ti_armv7_common: env: Consolidate support for loading script and text env files
Support for loading bootscript and text env file is duplicated in all TI platforms. Add this information to DEFAULT_MMC_TI_ARGS so that it can be reused in all TI platforms. Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'include/configs/ti_armv7_common.h')
-rw-r--r--include/configs/ti_armv7_common.h25
1 files changed, 24 insertions, 1 deletions
diff --git a/include/configs/ti_armv7_common.h b/include/configs/ti_armv7_common.h
index 3afd6d7e88..787d04a144 100644
--- a/include/configs/ti_armv7_common.h
+++ b/include/configs/ti_armv7_common.h
@@ -63,7 +63,30 @@
"args_mmc=run finduuid;setenv bootargs console=${console} " \
"${optargs} " \
"root=PARTUUID=${uuid} rw " \
- "rootfstype=${mmcrootfstype}\0"
+ "rootfstype=${mmcrootfstype}\0" \
+ "loadbootscript=load mmc ${mmcdev} ${loadaddr} boot.scr\0" \
+ "bootscript=echo Running bootscript from mmc${mmcdev} ...; " \
+ "source ${loadaddr}\0" \
+ "bootenvfile=uEnv.txt\0" \
+ "importbootenv=echo Importing environment from mmc${mmcdev} ...; " \
+ "env import -t ${loadaddr} ${filesize}\0" \
+ "loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenvfile}\0" \
+ "envboot=mmc dev ${mmcdev}; " \
+ "if mmc rescan; then " \
+ "echo SD/MMC found on device ${mmcdev};" \
+ "if run loadbootscript; then " \
+ "run bootscript;" \
+ "else " \
+ "if run loadbootenv; then " \
+ "echo Loaded env from ${bootenvfile};" \
+ "run importbootenv;" \
+ "fi;" \
+ "if test -n $uenvcmd; then " \
+ "echo Running uenvcmd ...;" \
+ "run uenvcmd;" \
+ "fi;" \
+ "fi;" \
+ "fi;\0" \
/*
* DDR information. If the CONFIG_NR_DRAM_BANKS is not defined,
OpenPOWER on IntegriCloud