From 386681e2948248083e73c70612e709db292b1419 Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Tue, 9 Oct 2012 20:50:11 +0200 Subject: of: Print model name in banner If we know the model name from the devicetree print this in the banner instead of the hardcoded board name. Signed-off-by: Sascha Hauer --- common/version.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'common/version.c') diff --git a/common/version.c b/common/version.c index a557904ea8..22e111ab4f 100644 --- a/common/version.c +++ b/common/version.c @@ -1,6 +1,7 @@ #include #include #include +#include const char version_string[] = "barebox " UTS_RELEASE " " UTS_VERSION "\n"; @@ -8,7 +9,13 @@ EXPORT_SYMBOL(version_string); void barebox_banner (void) { + const char *board; + + board = of_get_model(); + + if (!board) + board = CONFIG_BOARDINFO; + printf("\n\n%s\n\n", version_string); - printf("Board: " CONFIG_BOARDINFO "\n"); + printf("Board: %s\n", board); } - -- cgit v1.2.3