From: Franck JULLIEN <franck.jullien@gmail.com>
To: barebox@lists.infradead.org
Subject: [PATCH] Add a board specific fancy banner
Date: Thu, 23 Dec 2010 22:42:34 +0100 [thread overview]
Message-ID: <AANLkTik+7KJrf3H6ZW3i9pA115p2Gn=k=CXYHg5YJwRY@mail.gmail.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 1899 bytes --]
Hello,
This is the first time I'm using git and submit a patch so if I made a
mistake be cool :)
This is a small patch allowing the user to define a fancy banner for
barebox. I don't know
if you'll use it but it's kind of an experience for me.
I have ported barebox to the altera nios2 processor. I think I'll submit the
corresponding patch
on january. However, I'll need some advices to generate such a big (or lot
of small) patch.
Thanks,
Franck.
-----
from: franck JULLIEN <franck.jullien@gmail.com>
Date: Thu, 23 Dec 2010 22:31:22 +0100
Subject: [PATCH] Add a board specific fancy banner
---
common/Kconfig | 6 ++++++
common/console.c | 10 ++++++++++
2 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/common/Kconfig b/common/Kconfig
index 617f640..d46c8fc 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -248,6 +248,12 @@ config HUSH_FANCY_PROMPT
Allow to set PS1 from the command line. PS1 can have several escaped
commands
like \h for CONFIG_BOARDINFO or \w for the current working directory.
+config BOARD_BANNER
+ bool
+ prompt "allow a board specific fancy banner"
+ help
+ Allow to define a custom board banner (you must define BOARD_BANNER in
your config.h)
+
config HUSH_GETOPT
bool
depends on SHELL_HUSH
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"));
+#endif
+#else
printf(RELOC("Board: " CONFIG_BOARDINFO "\n"));
+#endif
}
static int __early_initdata initialized = 0;
--
1.7.0.4
[-- Attachment #1.2: Type: text/html, Size: 3615 bytes --]
[-- Attachment #2: Type: text/plain, Size: 149 bytes --]
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next reply other threads:[~2010-12-23 21:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-23 21:42 Franck JULLIEN [this message]
2010-12-25 6:38 ` Jean-Christophe PLAGNIOL-VILLARD
2010-12-26 11:48 ` 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='AANLkTik+7KJrf3H6ZW3i9pA115p2Gn=k=CXYHg5YJwRY@mail.gmail.com' \
--to=franck.jullien@gmail.com \
--cc=barebox@lists.infradead.org \
/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