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

Wolfgang Denk wd at denx.de
Fri Jun 29 13:26:55 CEST 2012


Dear Matthias Fuchs,

In message <4FED7877.2020505 at esd.eu> you wrote:
> 
> I just noticed that using getenv (and friends)
> does not work on ARM (namely i.MX28) from board_init_f()
> after running through the init_sequence.

This is normal, and documented.  Before relocation, you must not use
getenv().  

> Env access does not work before env_relocate() in board_init_r().

It does, but you have to play by the rules, i. e. use getenv_f()
instead.

> Didn't this behave different sometimes before? Even after the big
> env rework?

No. The use of getenv() before relocation has never been supported.
It may have worked (by pure chance) on some systems, but that's all.

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
Time is an illusion perpetrated by the manufacturers of space.


More information about the U-Boot mailing list