[U-Boot] Weak symbols: request for comments
Reinhard Meyer
u-boot at emk-elektronik.de
Fri Nov 5 13:30:09 CET 2010
Dear Sebastien,
>>> Are there better options? Which one would you prefer to see
>>> implemented?
>>>
>> Yes. The old-fashioned #define CONFIG_BOARD_INIT_F and friends
>> method. I would prefer that one. Its not beautiful but still
>> widely used and bullet-proof.
>>
>
> Could you please elaborate? I have looked for things like this in the
> code base but I could not find what you are referring to.
extracts from arch/arm/lib/board.c:
#if defined(CONFIG_ARCH_CPU_INIT)
arch_cpu_init, /* basic arch cpu dependent setup */
#endif
#if defined(CONFIG_BOARD_EARLY_INIT_F)
board_early_init_f,
#endif
#if defined(CONFIG_ARCH_MISC_INIT)
/* miscellaneous arch dependent initialisations */
arch_misc_init ();
#endif
#if defined(CONFIG_MISC_INIT_R)
/* miscellaneous platform dependent initialisations */
misc_init_r ();
#endif
#ifdef BOARD_LATE_INIT
board_late_init ();
#endif
#if defined(CONFIG_RESET_PHY_R)
debug ("Reset Ethernet PHY\n");
reset_phy();
#endif
Just a few that can be "enabled" by board specific defines.
"xxxboard".h #defines them and "xxxboard.c" has to implement them.
Best Regards,
Reinhard
More information about the U-Boot
mailing list