
Dear Oliver Dillinger,
In message loom.20101022T120849-268@post.gmane.org you wrote:
In env_relocate_spec(), env_flash is freed and set to NULL if CONFIG_ENV_OFFSET_REDUND is undefined. This leads to an "Environment SPI flash not initialized" error when performing a saveenv.
br, Oliver
Signed-off-by: line missing.
Please read http://www.denx.de/wiki/U-Boot/Patches
diff --git a/common/env_sf.c b/common/env_sf.c index fb0c39b..fc5f9f3 100644 --- a/common/env_sf.c +++ b/common/env_sf.c @@ -384,7 +384,10 @@ void env_relocate_spec(void) ret = env_import(buf, 1);
if (ret)
{
Incorrect brace style.
gd->env_valid = 1;
return;
Your patch is white-space corrupted.
Also, this patch is not correct. It is OK to call spi_flash_free() here.
The bug is in saveenv() for the non-redundant case. The function has not been dapted to the new environment code, at all; for example, it fails to actually export the internally stored environment [there is no call to hexport()].
Best regards,
Wolfgang Denk