[U-Boot] environment access before relocation does not work on (some) arm

Wolfgang Denk wd at denx.de
Tue Jul 3 20:04:39 CEST 2012


Dear Matthias Fuchs,

In message <4FF306FC.9040305 at esd.eu> you wrote:
> 
> > This is normal, and documented.  Before relocation, you must not use
> > getenv().  
> Yes, I am aware of this. I even think that the getenv() implementation
> falls back to getenv_f() before relocation.

This is not guaranteed to work.

> Yes, I did not care about where my env comes from :-) So env_sf.c does
> not support an early env at all. Running on an i.MX28 with env in a SPI
> flash I probably need SPI support in my SPL and an improved env_sf.c.

This is a bigger topic.  We all wait anxiously for Mareks group to
implement a clean device driver model, so we can clean up and unify
all this code.  I am aware that it needs it.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"Remember, Information is not knowledge;  Knowledge  is  not  Wisdom;
Wisdom is not truth; Truth is not beauty; Beauty is not love; Love is
not music; Music is the best."                          - Frank Zappa


More information about the U-Boot mailing list