diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2011-04-01 15:13:55 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2011-04-11 12:36:08 +0200 |
commit | 3f1ff6b730ec17ce635fcf38770358d8042e80b4 (patch) | |
tree | 3b93a1f2f90bcfde6bfecd30d74635e54756c584 /common/version.c | |
parent | 09da8d4bab923871891e275e83c90419d9235231 (diff) | |
download | barebox-3f1ff6b730ec17ce635fcf38770358d8042e80b4.tar.gz barebox-3f1ff6b730ec17ce635fcf38770358d8042e80b4.tar.xz |
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.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/common/version.c b/common/version.c new file mode 100644 index 0000000000..945475fc3d --- /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")); +} + |