diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2012-10-09 20:50:11 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2012-10-09 20:57:23 +0200 |
commit | 386681e2948248083e73c70612e709db292b1419 (patch) | |
tree | a8d62088ebee30c7743da650be83d95c360a2b78 /common/version.c | |
parent | efed4960013ed2636ed79b863e872a66f1ccd25d (diff) | |
download | barebox-386681e2948248083e73c70612e709db292b1419.tar.gz barebox-386681e2948248083e73c70612e709db292b1419.tar.xz |
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 <s.hauer@pengutronix.de>
Diffstat (limited to 'common/version.c')
-rw-r--r-- | common/version.c | 11 |
1 files changed, 9 insertions, 2 deletions
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 <common.h> #include <generated/compile.h> #include <generated/utsrelease.h> +#include <of.h> 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); } - |