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

Simon Glass sjg at chromium.org
Wed Dec 7 23:45:57 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 ?
>
>> --- /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.
>
>> --- 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

I found that 27 files call relocate_code(). Now we can discuss whether
the number should be that high, but for now I would prefer to move
this out of common.h in a later patch. What do you think?

./nand_spl/board/freescale/p1023rds/nand_boot.c
./nand_spl/board/freescale/p1010rdb/nand_boot.c
./nand_spl/board/freescale/mpc8536ds/nand_boot.c
./nand_spl/board/freescale/p1_p2_rdb_pc/nand_boot.c
./nand_spl/board/freescale/mpc8569mds/nand_boot.c
./nand_spl/board/freescale/mpc8572ds/nand_boot.c
./nand_spl/board/freescale/p1_p2_rdb/nand_boot.c
./nand_spl/nand_boot_fsl_nfc.c
./arch/mips/lib/board.c
./arch/x86/lib/board.c
./arch/nds32/lib/board.c
./arch/arm/cpu/armv7/omap-common/spl.c
./arch/arm/cpu/arm926ejs/davinci/spl.c
./arch/arm/lib/board.c
./arch/avr32/lib/board.c
./arch/powerpc/lib/board.c
./arch/m68k/lib/board.c
./board/samsung/smdk6400/smdk6400_nand_spl.c
./board/sheldon/simpc8313/simpc8313.c
./board/freescale/mpc8313erdb/mpc8313erdb.c
./board/freescale/mpc8315erdb/mpc8315erdb.c

Regards,
Simon


More information about the U-Boot mailing list