[U-Boot-Users] problem with saveenv command if CFG_ENV_IS_IN_EEPROM...

Wolfgang Denk wd at denx.de
Sat Jun 12 10:36:05 CEST 2004


Dear Sean,

in message <6cf7690b67f9.40c9d89f at usc.edu> you wrote:
> 
> If I have my environment variables stored in eeprom (i.e. define CFG_ENV_IS_IN_EEPROM), I should be able to use the saveenv command to save any user modified env values back to eeprom right?

Sure. That's how it works on quite a lot of boards.

> But U_BOOT_CMD saveenv does not get compiled unless I have defined both CFG_CMD_ENV and CFG_CMD_FLASH.  Also, if you look at the function do_saveenv, which is called when user uses the saveenv command, it does get compiled if I only define CFG_ENV_IS_IN_EEPROM alone.


Will you please restrict your line legth to some 70 characters or so? thanks.

Yes, the "saveenv" command entry only gets compiled when  the  CFG_CMD_ENV  or
CFG_CMD_FLASH options are enabled in your CONFIG_COMMANDS settings.

And the do_saveenv() code only gets compiled when the CFG_CMD_ENV  or
CFG_CMD_FLASH  options  are enabled in your CONFIG_COMMANDS settings,
or when your environment is in EEPROM or in NVRAM.

> Am I missing something or is there a problem?  Any help is greatly appreciated.

There is no problem.

Why are you asking?

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
Good manners are the settled  medium  of  social,  as  specie  is  of
commercial, life; returns are equally expected for both.
           - Lord Chesterfield _Letters to his Son_, 25 December 1753




More information about the U-Boot mailing list