<br><br>
<div class="gmail_quote">2011/1/3 Sascha Hauer <span dir="ltr"><<a href="mailto:s.hauer@pengutronix.de">s.hauer@pengutronix.de</a>></span><br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">Hi Franck,<br>
<div>
<div></div>
<div class="h5"><br>On Thu, Dec 30, 2010 at 01:49:34PM +0100, Franck JULLIEN wrote:<br>> Allow a board specific fancy banner<br>><br>> ---<br>><br>> I removed the default fancy banner and do it like Jean-Christophe suggested it.<br>
><br>> common/Kconfig | 6 ++++++<br>> common/console.c | 7 ++++++-<br>> 2 files changed, 12 insertions(+), 1 deletions(-)<br>><br>> diff --git a/common/Kconfig b/common/Kconfig<br>> index 617f640..d32c1ce 100644<br>
> --- a/common/Kconfig<br>> +++ b/common/Kconfig<br>> @@ -248,6 +248,12 @@ config HUSH_FANCY_PROMPT<br>> Allow to set PS1 from the command line. PS1 can have several escaped commands<br>> like \h for CONFIG_BOARDINFO or \w for the current working directory.<br>
><br>> +config BOARD_BANNER<br>> + bool<br>> + prompt "allow a board specific fancy banner"<br>> + help<br>> + Allow to define a custom board banner (you can define CONFIG_BOARD_BANNER_TEXT in your config.h)<br>
> +<br>> config HUSH_GETOPT<br>> bool<br>> depends on SHELL_HUSH<br>> diff --git a/common/console.c b/common/console.c<br>> index 82786f2..7caef11 100644<br>> --- a/common/console.c<br>> +++ b/common/console.c<br>
> @@ -46,7 +46,12 @@ EXPORT_SYMBOL(console_list);<br>> static void display_banner (void)<br>> {<br>> printf (RELOC("\n\n%s\n\n"), RELOC_VAR(version_string));<br>> - printf(RELOC("Board: " CONFIG_BOARDINFO "\n"));<br>
> +<br>> +#ifndef CONFIG_BOARD_BANNER<br>> +#undef CONFIG_BOARD_BANNER_TEXT<br>> +#define CONFIG_BOARD_BANNER_TEXT "Board: " CONFIG_BOARDINFO "\n"<br>> +#endif<br>> + printf(RELOC(CONFIG_BOARD_BANNER_TEXT));<br>
> }<br><br></div></div>I do not really understand this patch. CONFIG_BOARDINFO is board<br>specific already, why would we want to add another option?<br><br>Sascha<br><font color="#888888"><br>--<br>Pengutronix e.K. | |<br>
Industrial Linux Solutions | <a href="http://www.pengutronix.de/" target="_blank">http://www.pengutronix.de/</a> |<br>Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |<br>Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |<br>
</font></blockquote></div>
<div><br> </div>
<div>Hello,</div>
<div> </div>
<div>I know CONFIG_BOARDINFO is board specific. However, I think it is more conveniant</div>
<div>to have the possibility to define a banner text outside the Kconfig. For example, I use</div>
<div>this in my config.h:</div>
<div> </div>
<div>#define CONFIG_BOARD_BANNER_TEXT "\e[1;32m\<br>***********************************************************************\n\<br>* Communication board bootloader (ODSFT0152) *\n\<br>************************************************************************\<br>
\e[0m\n\n"</div>
<div> </div>
<div>So may be we could define this kind of banner in the Kconfig.....</div>
<div> </div>
<div>Let me know if you don't like this. This patch was kind of a test for me and we could</div>
<div>forget about it.</div>
<div> </div>
<div>Although this patch was very small, we had a lot of discussion around it and I don't </div>
<div>want to imagine what it is going to be when I submit the nios2 port :)</div>
<div> </div>
<div>Best regards,</div>
<div>Franck.</div>
<div> </div>
<div> </div>
<div> </div>