Skip to contentSkip to conversation

common/env: Point default envirenoment for GD

RFC New Prabhakar Kushwaha 1 participant 1 message Sep 16, 2013

lore
Share & tools
lore
#0 lore raw

RFC 3/5 common/env: Point default envirenoment for GD

GD(Global Data) structure has pointer to envirenoment variable array. but, it is not being assigned for SPL framwork.

So update GD pointer with env variable array.

---
 common/env_common.c |    3 +++
 1 file changed, 3 insertions(+)
common/env_common.c +3 -0
index 1ac3377..84843e1 100644
@@ -162,6 +162,9 @@ int env_import(const char *buf, int check)
 	if (himport_r(&env_htab, (char *)ep->data, ENV_SIZE, '\0', 0,
 			0, NULL)) {
 		gd->flags |= GD_FLG_ENV_READY;
+#ifdef CONFIG_SPL_BUILD
+		gd->env_addr = ep->data;
+#endif
 		return 1;
 	}
 
Signature · 1 line
1.7.9.5