[PATCH] Revert "env: Load env when ENV_IS_NOWHERE is only location selected"

Tom Rini trini at konsulko.com
Sun Apr 10 17:20:57 CEST 2022


On Sun, Apr 10, 2022 at 06:46:52AM +0200, Marek Vasut wrote:

> This reverts commit 8d61237edbf6314a701cf78da2c5893a73ff5438.
> 
> This commit broke environment on literally every board I have access
> to, with this revert in place, environment works as it should again.
> The problem I observe with this patch is that saved environment in
> either SPI NOR or eMMC is never used, the system always falls back
> to default environment. The 'saveenv' command does succeed, but then
> after reset, the default env is again used.
> 
> Furthermore, the commit introduced duplicate code in env_init(), this:
> "
> 	if (!prio) {
> 		gd->env_addr = (ulong)&default_environment[0];
> 		gd->env_valid = ENV_INVALID;
> 
> 		return 0;
> 	}
> 
> 	if (ret == -ENOENT) {
> 		gd->env_addr = (ulong)&default_environment[0];
> 		gd->env_valid = ENV_INVALID;
> 
> 		return 0;
> 	}
> "
> 
> Furthermore, the commit is missing DCO SoB line.
> 
> Also note that upstream does not support UltraZed EG board, so
> this might have been a patch pulled from downstream which did
> depend on some other downstream behavior.
> 
> Signed-off-by: Marek Vasut <marex at denx.de>
> Cc: Felix.Vietmeyer at jila.colorado.edu <felix.vietmeyer at jila.colorado.edu>
> Cc: Tom Rini <trini at konsulko.com>

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/20220410/2c3875b8/attachment.sig>


More information about the U-Boot mailing list