From 4895148009573491053a88b42929088aba46ef58 Mon Sep 17 00:00:00 2001 From: Jose Diaz de Grenu Date: Wed, 31 Jan 2018 13:36:52 +0100 Subject: [PATCH] u-boot-fw-utils: fix environment access functions In the old u-boot-fw-utils 2016.x the function 'fw_env_close' wrote the environment to the media. That is no longer the case, now that function only frees the memory used, and 'fw_env_flush' is used to write the environment. This was causing that userspace application using this library were not able to write changes to the environment. https://jira.digi.com/browse/DEL-5644 Signed-off-by: Jose Diaz de Grenu --- ...ement-U-Boot-environment-access-functions.patch | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-fw-utils/0002-Implement-U-Boot-environment-access-functions.patch b/meta-digi-arm/recipes-bsp/u-boot/u-boot-fw-utils/0002-Implement-U-Boot-environment-access-functions.patch index d9e1b8465..974bbe3cc 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-fw-utils/0002-Implement-U-Boot-environment-access-functions.patch +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-fw-utils/0002-Implement-U-Boot-environment-access-functions.patch @@ -6,9 +6,9 @@ Signed-off-by: Javier Viguera Signed-off-by: Jose Diaz de Grenu --- tools/env/Makefile | 2 +- - tools/env/ubootenv.c | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++ - tools/env/ubootenv.h | 46 ++++++++++++++++++++++++++++++++++++++ - 3 files changed, 109 insertions(+), 1 deletion(-) + tools/env/ubootenv.c | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++ + tools/env/ubootenv.h | 46 ++++++++++++++++++++++++++++++++++++ + 3 files changed, 113 insertions(+), 1 deletion(-) create mode 100644 tools/env/ubootenv.c create mode 100644 tools/env/ubootenv.h @@ -27,10 +27,10 @@ index c10ff66c7772..1d99e3b65dc6 100644 diff --git a/tools/env/ubootenv.c b/tools/env/ubootenv.c new file mode 100644 -index 000000000000..836fcd14a67f +index 000000000000..eb9ad5fce097 --- /dev/null +++ b/tools/env/ubootenv.c -@@ -0,0 +1,62 @@ +@@ -0,0 +1,66 @@ +/* + * Copyright (c) 2017, Digi International Inc. + * @@ -88,6 +88,10 @@ index 000000000000..836fcd14a67f + if (ret) + goto err; + ++ ret = fw_env_flush(NULL); ++ if (ret) ++ goto err; ++ + ret = fw_env_close(NULL); + +err: