[U-Boot] [RFC PATCH 3/7] reboard: Add generic relocation feature

Simon Glass sjg at chromium.org
Tue Nov 29 23:15:18 CET 2011


Hi Mike,

On Mon, Nov 28, 2011 at 7:07 PM, Mike Frysinger <vapier at gentoo.org> wrote:
> On Monday 21 November 2011 18:57:56 Simon Glass wrote:
>>  board/Makefile   |   45
>>  board/reloc.c    |  101
>
> not to bikeshed, but i don't think we want files in board/.  how about
> board/common/ or board/generic/ instead ?

Yes I wasn't sure, let's go with lib/reloc.c unless we hit SPL
problems (do we really need lib/reloc/reloc.c?)

>
>> --- /dev/null
>> +++ b/board/Makefile
>>
>> +ifndef CONFIG_SYS_LEGACY_BOARD
>> +COBJS        += reloc.o
>> +endif
>
> i don't think relocation should be tied "legacy board".  not all arches do
> relocation at all, which means they might never opt in to this aspect.

If they don't do reloc then when we move them over we should add a
CONFIG for this I think. But would prefer to wait until we have an
arch moving over that requires no relocation, before addressing this.

>
>> --- a/include/common.h
>> +++ b/include/common.h
>>
>> -void relocate_code (ulong, gd_t *, ulong) __attribute__ ((noreturn));
>> +#include <reloc.h>
>
> i'd think very few funcs would need this.  so maybe we should make the few
> places include reloc.h explicitly.
> -mike
>

Yes I wanted to do that but was concerned about complaints of
including multiple headers in every board.c for this. I really don't
like common.h so I will change it.

Regards,
Simon


More information about the U-Boot mailing list