summaryrefslogtreecommitdiffstats
path: root/common/version.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2012-10-09 20:50:11 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2012-10-09 20:57:23 +0200
commit386681e2948248083e73c70612e709db292b1419 (patch)
treea8d62088ebee30c7743da650be83d95c360a2b78 /common/version.c
parentefed4960013ed2636ed79b863e872a66f1ccd25d (diff)
downloadbarebox-386681e2948248083e73c70612e709db292b1419.tar.gz
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.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/common/version.c b/common/version.c
index a557904..22e111a 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);
}
-