[PATCH] (reformated) Allow board specific fancy banner
Franck JULLIEN
franck.jullien at gmail.com
Sun Dec 26 16:40:52 EST 2010
This time I used git to send the email. I think I get it right.
However, I didn't find how to put this file in the thread we were later...
I don't think it is possible since those emails didn't have ID's to use with
the In-Reply-To option (right ?).
---
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.1
More information about the barebox
mailing list