[U-Boot] Avoiding Relocation on ARM When Earlier Bootloader Inits RAM?

Wolfgang Denk wd at denx.de
Mon Feb 14 22:22:40 CET 2011


Dear Tim Kryger,

In message <loom.20110214T194343-739 at post.gmane.org> you wrote:
> 
> My memory map is fixed but my board specific U-Boot code is still under
> development and if I can't guarantee the address U-Boot is loaded will be
> exactly the same as the computed address I am in trouble.  If it changes ever so
> slightly, I could find myself in the situation where U-Boot tries to relocate on
> top of itself which would be much worse than the current inefficient but safe
> relocation.

Please be careful in the use of terms. It appears you are using
"relocating" when you actually mean "copying".  Keep in mind that
these are two very different operations.

> I am considering creating a linker directives script for my board that will
> align the end of BSS to the next larger power of two from its current address. 
> This doesn't seem like the cleanest solution but it I believe it would allow me
> to make code changes without too much fear of causing a change to the relocation
> address.  Do you think this would be a reasonable approach to take?

Note that there is no guarantee that such an approach will continue to
work in future releases.  Also note that you will then have to
maintain your own linker script and keep it in sync with all other
changes - which just adds maintenance efforts.

Why exactly do you care about this?  What is the problem you're trying
to address?

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
Build a system that even a fool can use and only a fool will want  to
use it.


More information about the U-Boot mailing list