[PATCH] env: Fix default environment saving issue

Tom Rini trini at konsulko.com
Tue Jul 18 15:58:48 CEST 2023


On Tue, Jul 04, 2023 at 12:16:07AM -0600, Ashok Reddy Soma wrote:

> When CONFIG_SYS_REDUNDAND_ENVIRONMENT is enabled, by default env is
> getting saved to redundant environment irrespective of primary env is
> present or not.
> 
> It means even if primary and redundant environment are not present, by
> default, env is getting stored to redundant environment. Even if primary
> env is present, it is choosing to store in redudndant env.
> 
> Ideally it should look for primary env and choose to store in primary env
> if it is present. If both primary and redundant env are not present then
> it should save in to primary env area.
> 
> Fix the issue by making env_valid = ENV_INVALID when both the
> environments are not present.
> 
> Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma at amd.com>
> Reviewed-by: Simon Glass <sjg at chromium.org>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20230718/3299210a/attachment.sig>


More information about the U-Boot mailing list