Skip to contentSkip to conversation

configs: omap4_common: support load from uEnv.txt

PATCH New Nishanth Menon 1 participant 2 messages Jan 11, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 configs: omap4_common: support load from uEnv.txt

if traditionally used boot.scr is not found see if uEnv.txt is available to load environment. uenvcmd is executed after load of uEnv.txt if it is defined in the environment text file

---
 include/configs/omap4_common.h |   12 ++++++++++++
 1 file changed, 12 insertions(+)
include/configs/omap4_common.h +12 -0
index a32369a..8b71beb 100644
@@ -159,6 +159,10 @@
 	"loadbootscript=fatload mmc ${mmcdev} ${loadaddr} boot.scr\0" \
 	"bootscript=echo Running bootscript from mmc${mmcdev} ...; " \
 		"source ${loadaddr}\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" \
 	"mmcboot=echo Booting from mmc${mmcdev} ...; " \
 		"run mmcargs; " \
@@ -169,6 +173,14 @@
 		"if run loadbootscript; then " \
 			"run bootscript; " \
 		"else " \
+			"if run loadbootenv; then " \
+				"echo Loaded environment from ${bootenv};" \
+				"run importbootenv;" \
+				"if test -n $uenvcmd; then " \
+					"echo Running uenvcmd ...;" \
+					"run uenvcmd;" \
+				"fi;" \
+			"fi;" \
 			"if run loaduimage; then " \
 				"run mmcboot; " \
 			"fi; " \
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/1 configs: omap4_common: support load from uEnv.txt

Quoted 42 lines · Nishanth Menon

if traditionally used boot.scr is not found see if uEnv.txt is available to load environment. uenvcmd is executed after load of uEnv.txt if it is defined in the environment text file

---
 include/configs/omap4_common.h |   12 ++++++++++++
 1 file changed, 12 insertions(+)
include/configs/omap4_common.h +12 -0
index a32369a..8b71beb 100644
@@ -159,6 +159,10 @@
 	"loadbootscript=fatload mmc ${mmcdev} ${loadaddr} boot.scr\0" \
 	"bootscript=echo Running bootscript from mmc${mmcdev} ...; " \
 		"source ${loadaddr}\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" \
 	"mmcboot=echo Booting from mmc${mmcdev} ...; " \
 		"run mmcargs; " \
@@ -169,6 +173,14 @@
 		"if run loadbootscript; then " \
 			"run bootscript; " \
 		"else " \
+			"if run loadbootenv; then " \
+				"echo Loaded environment from ${bootenv};" \
+				"run importbootenv;" \
+				"if test -n $uenvcmd; then " \
+					"echo Running uenvcmd ...;" \
+					"run uenvcmd;" \
+				"fi;" \
+			"fi;" \
 			"if run loaduimage; then " \
 				"run mmcboot; " \
 			"fi; " \
Signature · 1 line
1.7.9.5

Thanks to Tom pointing in IRC, patch
http://patchwork.ozlabs.org/patch/209925/
prefer that patch be merged instead of mine.

Signature · 2 lines
Regards,
Nishanth Menon