[U-Boot] [PATCH] [NEXT] da830: fixup ARM relocation support

Nick Thompson nick.thompson at ge.com
Wed Sep 22 17:15:58 CEST 2010


On 22/09/10 16:07, Ben Gardiner wrote:
> On Wed, Sep 22, 2010 at 10:15 AM, Nick Thompson <nick.thompson at ge.com> wrote:
>> On 22/09/10 14:43, Ben Gardiner wrote:
>>> What about removing "#define CONFIG_SKIP_RELOCATE_UBOOT" as in commit
>>> ab86f72c354f9b2572340f72b74ca0a258c451bd ?
>>
>> Hmmm. It wouldn't hurt I guess. The UBL copies the code to the correct
>> address though doesn't it? The copy is not executed and so the code is
>> redundant - or did I miss something?
> 
> Yeah, good point. UBL does copy the code to the correct address -- but
> I also remember that I needed to remove that define in my testing of
> Heiko's patches on the da850.
> 
> I'll get around to testing -next again soon and I'll try with
> CONFIG_SKIP_RELOCATE_UBOOT defined.

No, don't do that. I just did some testing myself. The relocation address
is calculated at run time and includes the size of u-boot itself. I got
away with it once in my debugger (I was trying to dodge the extra copy),
but it broke once I added more code.

You would have to change the UBL on more or less every build of u-boot
to skip the copy, which is clearly impractical.

I have removed CONFIG_SKIP_RELOCATE_UBOOT as you suggested and now
everything takes care of itself. I've already sent a v2 patch.

Thanks for pointing me in the right direction.

Nick.


More information about the U-Boot mailing list