If you enable environment in the flash, but disable the embedded option,
and you disable the saveenv command, then the #if nested logic will trigger
a compile failure:
env_flash.c: In function ‘env_relocate_spec’:
env_flash.c:399: error: ‘flash_addr’ undeclared (first use in this function)
The fix is to add CMD_SAVEENV ifdef protection like everywhere else.
Signed-off-by: Mike Frysinger <[EMAIL PROTECTED]>
---
common/env_flash.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/common/env_flash.c b/common/env_flash.c
index eccfb62..a92160d 100644
--- a/common/env_flash.c
+++ b/common/env_flash.c
@@ -378,7 +378,9 @@ void env_relocate_spec (void)
puts ("*** Warning - some problems detected "
"reading environment; recovered successfully\n\n");
#endif /* CFG_ENV_ADDR_REDUND */
+#ifdef CMD_SAVEENV
memcpy (env_ptr, (void*)flash_addr, CFG_ENV_SIZE);
+#endif
#endif /* ! ENV_IS_EMBEDDED || CFG_ENV_ADDR_REDUND */
}
--
1.5.5.1
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
U-Boot-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/u-boot-users