From mboxrd@z Thu Jan 1 00:00:00 1970 From: Reinhard Meyer Date: Fri, 05 Nov 2010 13:30:09 +0100 Subject: [U-Boot] Weak symbols: request for comments In-Reply-To: <4CD3F58F.8090302@gmail.com> References: <4CD3DEFC.7010104@gmail.com> <4CD3E7A4.4000109@emk-elektronik.de> <4CD3F58F.8090302@gmail.com> Message-ID: <4CD3F8D1.7090603@emk-elektronik.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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