[U-Boot] [RFC PATCH] arm: provide a CONFIG flag for disabling relocation

Simon Glass sjg at chromium.org
Mon Oct 3 05:34:47 CEST 2011


Hi Albert,

On Sat, Oct 1, 2011 at 12:01 AM, Albert ARIBAUD
<albert.u.boot at aribaud.net> wrote:
> Hi Simon,
>
> Le 23/09/2011 18:04, Simon Glass a écrit :
>
>>> Are you looking for CONFIG_SYS_SKIP_ARM_RELOCATION? I think Anthony is
>>> only fixing couple of issues uncovered by the original 'skip
>>> relocation' patch but I don't think CONFIG_SYS_SKIP_ARM_RELOCATION
>>> itself is getting accepted.
>>
>> I see. That is sad, because skipping relocation is very useful for
>> development. Why do we make things harder for devs than they need to
>> be?
>
> There is at least a possibility to avoid relocation without introducing the
> CONFIG_SYS_SKIP_ARM_RELOCATION flag; set CONFIG_SKIP_LOWLEVEL_INIT and
> adjust CONFIG_SYS_TEXT_BASE to be the base address where your code will be
> located. It is a two-round process (you need a first run with the 'wrong'
> CONFIG_SYS_TEXT_BASE in order to find its 'right' value) and will work only
> for a given board variant (same available RAM amount always) but might be
> enough to cover the use case(s) you are looking for?

In other words, still relocation, but we 'know' where it will relocate
to after it does its maths.

It works, but it's a little brittle, and I would prefer a simple
option to disable relocation for devs. I keep such a patch around for
when I am using an ICE. Is the concern that people might use it in
their boards? Should be easy enough to refuse patches which do include
it.

Regards,
Simon
>
> Amicalement,
> --
> Albert.
>


More information about the U-Boot mailing list