diff options
author | Raptor Engineering Development Team <support@raptorengineering.com> | 2020-02-15 04:35:28 +0000 |
---|---|---|
committer | Raptor Engineering Development Team <support@raptorengineering.com> | 2020-02-18 12:36:00 +0000 |
commit | ea54436651646c113e37193c72945357f524b0fc (patch) | |
tree | 176e40ef2538a38d8eb11d7c4fd80a5566b41d42 /meta-aspeed/recipes-bsp/u-boot/files/save-default-environment-on-crc-fail.patch | |
parent | 8d79031199906377d7b9716237eddb4a6b7b5260 (diff) | |
download | talos-openbmc-ea54436651646c113e37193c72945357f524b0fc.tar.gz talos-openbmc-ea54436651646c113e37193c72945357f524b0fc.zip |
Automatically write default U-boot environment into Flash if environment damaged on U-boot load
This allows the default environment string in the U-boot binary to be used versus the (potentially incorrect)
default environment string in fw_printenv / fw_setenv
Diffstat (limited to 'meta-aspeed/recipes-bsp/u-boot/files/save-default-environment-on-crc-fail.patch')
-rw-r--r-- | meta-aspeed/recipes-bsp/u-boot/files/save-default-environment-on-crc-fail.patch | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/meta-aspeed/recipes-bsp/u-boot/files/save-default-environment-on-crc-fail.patch b/meta-aspeed/recipes-bsp/u-boot/files/save-default-environment-on-crc-fail.patch new file mode 100644 index 000000000..a6b58b6dd --- /dev/null +++ b/meta-aspeed/recipes-bsp/u-boot/files/save-default-environment-on-crc-fail.patch @@ -0,0 +1,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; + } |