summaryrefslogtreecommitdiffstats
path: root/common/version.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2011-04-01 15:13:55 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2011-04-11 12:36:08 +0200
commit3f1ff6b730ec17ce635fcf38770358d8042e80b4 (patch)
tree3b93a1f2f90bcfde6bfecd30d74635e54756c584 /common/version.c
parent09da8d4bab923871891e275e83c90419d9235231 (diff)
downloadbarebox-3f1ff6b730ec17ce635fcf38770358d8042e80b4.tar.gz
move version_string to seperate file
In a noninteractive environment barebox will be compiled without command support. So move version_string to a seperate file which is compiled unconditionally. Also, display the banner when the simple console support is used. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common/version.c')
-rw-r--r--common/version.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/common/version.c b/common/version.c
new file mode 100644
index 0000000..945475f
--- /dev/null
+++ b/common/version.c
@@ -0,0 +1,13 @@
+#include <common.h>
+#include <reloc.h>
+#include <generated/utsrelease.h>
+
+const char version_string[] =
+ "barebox " UTS_RELEASE " (" __DATE__ " - " __TIME__ ")";
+
+void barebox_banner (void)
+{
+ printf (RELOC("\n\n%s\n\n"), RELOC_VAR(version_string));
+ printf(RELOC("Board: " CONFIG_BOARDINFO "\n"));
+}
+