summaryrefslogtreecommitdiffstats
path: root/meta-aspeed/recipes-bsp/u-boot/files/save-default-environment-on-crc-fail.patch
blob: a6b58b6dd628bc29f6feced539c0b19912396e41 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/common/env_common.c b/common/env_common.c
index 13db7dc..00ca394 100644
--- a/common/env_common.c
+++ b/common/env_common.c
@@ -122,6 +122,9 @@ void set_default_env(const char *s)
 			0, NULL) == 0)
 		error("Environment import failed: errno = %d\n", errno);
 
+	puts("Storing new environment in Flash\n\n");
+	saveenv();
+
 	gd->flags |= GD_FLG_ENV_READY;
 	gd->flags |= GD_FLG_ENV_DEFAULT;
 }
OpenPOWER on IntegriCloud