From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: Franck JULLIEN <franck.jullien@gmail.com>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] (reformated) Allow board specific fancy banner
Date: Tue, 28 Dec 2010 07:33:00 +0100 [thread overview]
Message-ID: <20101228063300.GP19266@game.jcrosoft.org> (raw)
In-Reply-To: <AANLkTik6kuBviOejiXT_6eU2ZiaagDDMJy2Fsgc_6dk_@mail.gmail.com>
> > diff --git a/common/console.c b/common/console.c
> > index 82786f2..8a830e3 100644
> > --- a/common/console.c
> > +++ b/common/console.c
> > @@ -46,7 +46,17 @@ EXPORT_SYMBOL(console_list);
> > static void display_banner (void)
> > {
> > printf (RELOC("\n\n%s\n\n"), RELOC_VAR(version_string));
> > +#ifdef CONFIG_BOARD_BANNER
> > +#ifdef BOARD_BANNER
> > + printf(RELOC(BOARD_BANNER));
> > +#else
> > +#define VT100_YELLOW "\033[1;33m"
> > +#define VT100_RESET "\033[1;0m"
> > + printf(RELOC("Board: " VT100_YELLOW CONFIG_BOARDINFO VT100_RESET
> "\n"));
> why not define it in the Kconfig simply?
>
> I'm sorry but I do not see why we can not do it in the defconfig
>
> Best Regards,
> J.
>
> We could do it in the arch/_the_arch_/Kconfig with depends on _your_board_
> but I don't think that the better/more generic way. Moreover, if we ask
> for the banner in Kconfig (with a string entry), fancy escape code and/or
> carriage return will be hard to enter manually.
> This is for example what I use for my neek board:
> #define BOARD_BANNER "\e[1;32m\
> ****************************************\n\
> * Altera NEEK board *\n\
> ****************************************\
> \e[0m\n\n"
> However, if you want I could manage to use the Kconfig way.....
> Best regards,
so define completely the banner in the config.h
no VT100.... in the console.c as diferrent boards will have different colour
and something like this will be better
#ifndef CONFIG_BOARD_BANNER
#undef CONFIG_BOARD_BANNER_TEXT
#define CONFIG_BOARD_BANNER_TEXT "Board: " CONFIG_BOARDINFO "\n"
#endif
printf(RELOC(CONFIG_BOARD_BANNER_TEXT));
please keep CONFIG_xxxx for the macro even in the config.h
Best Regards,
J.
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2010-12-28 6:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-26 21:40 Franck JULLIEN
2010-12-27 6:43 ` Jean-Christophe PLAGNIOL-VILLARD
[not found] ` <AANLkTik6kuBviOejiXT_6eU2ZiaagDDMJy2Fsgc_6dk_@mail.gmail.com>
2010-12-28 6:33 ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2010-12-29 11:36 ` Uwe Kleine-König
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20101228063300.GP19266@game.jcrosoft.org \
--to=plagnioj@jcrosoft.com \
--cc=barebox@lists.infradead.org \
--cc=franck.jullien@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox