[U-Boot] [PATCH 1/3] env: Fix up invalid environment in env_init()

Simon Glass sjg at chromium.org
Sun Aug 20 10:45:13 UTC 2017


This should be set to valid, not invalid. Otherwise the environment will
not load after relocation.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

 env/env.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/env/env.c b/env/env.c
index 2b8b9611cf..8671f13f8d 100644
--- a/env/env.c
+++ b/env/env.c
@@ -138,7 +138,7 @@ int env_init(void)
 		ret = drv->init();
 	if (ret == -ENOENT) {
 		gd->env_addr = (ulong)&default_environment[0];
-		gd->env_valid = 0;
+		gd->env_valid = ENV_VALID;
 
 		return 0;
 	} else if (ret) {
-- 
2.14.1.480.gb18f417b89-goog



More information about the U-Boot mailing list