All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 5/10] common/env: Point default environment for GD
@ 2014-03-31 10:04 Prabhakar Kushwaha
  2014-04-01 22:04 ` Scott Wood
  0 siblings, 1 reply; 6+ messages in thread
From: Prabhakar Kushwaha @ 2014-03-31 10:04 UTC (permalink / raw)
  To: u-boot

GD(Global Data) structure has pointer to environment variable array.
but, it always point to default_environment assuming it is running from
final location.

So update GD pointer with env variable array during SPL boot.

Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
---
 common/env_common.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/common/env_common.c b/common/env_common.c
index c0bfc2f..043150a 100644
--- a/common/env_common.c
+++ b/common/env_common.c
@@ -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 = (unsigned long)ep->data;
+#endif
 		return 1;
 	}
 
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-04-08 23:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-31 10:04 [U-Boot] [PATCH 5/10] common/env: Point default environment for GD Prabhakar Kushwaha
2014-04-01 22:04 ` Scott Wood
2014-04-02  3:42   ` Prabhakar Kushwaha
2014-04-04 23:51     ` Scott Wood
2014-04-07  6:40       ` Prabhakar Kushwaha
2014-04-08 23:00         ` Scott Wood

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.