
w.wegner@astro-kom.de writes:
I just had the problem of fw_{print,save}env not being able to access the environment because I was using the default (builtin) environment after flashing U-Boot. I wonder if I am the only one having this problem, or is it common practice to flash the environment together with U-Boot during production?
I just made this small patch to auto-save the environment if it is not found in flash but am wondering if
- I missed something and such a possibility does already exist? (I could not find a possibility to check from the command-line if the current environment comes from flash or is the built-in default environment, else it would be easier to make a script check and call saveenv before booting.)
AFAIK there is currently no way to check this from the U-Boot shell. Nevertheless I think that would be the way to go instead of hard-coding this. How about setting an environment variable like "env_default" if the default environment is used? That way scripts can be used to run saveenv but could also do more complex initialization.
Best regards
Markus Klotzbuecher
-- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office@denx.de