[PATCH] Add an option to set a board specific banner

Peter Korsgaard jacmet at sunsite.dk
Mon Jan 3 18:53:43 EST 2011


>>>>> "Sascha" == Sascha Hauer <s.hauer at pengutronix.de> writes:

 Sascha> Ok, I can see your problem. I think we should rather define a
 Sascha> board specific function to display a banner than a string, so
 Sascha> something like:

 Sascha> config BOARD_BANNER
 Sascha> 	bool

 Sascha> #ifdef CONFIG_BOARD_BANNER
 Sascha> 	display_board_banner();
 Sascha> #else
 Sascha> 	printf(RELOC("Board: " CONFIG_BOARDINFO "\n"));
 Sascha> #endif

Even better, stick:

#ifdef CONFIG_BOARD_BANNER
extern void display_board_banner(void);
#else
static inline void display_board_banner(void)
{
        printf(RELOC("Board: " CONFIG_BOARDINFO "\n"));
}
#endif

And get rid of the #ifdef in the C file.

-- 
Bye, Peter Korsgaard



More information about the barebox mailing list