[U-Boot,07/17] Add coreboot version to u-boot's version command

Message ID 1351902453-27956-8-git-send-email-sjg@chromium.org
State Superseded, archived
Delegated to: Tom Rini
Headers show

Commit Message

Simon Glass Nov. 3, 2012, 12:27 a.m.
From: Stefan Reinauer <reinauer@chromium.org>

Since U-Boot runs from coreboot on x86, the Coreboot version is an
important part of the boot state. This version information is
available in the coreboot tables, so print it when the 'version'
command is used.

Signed-off-by: Simon Glass <sjg@chromium.org>
 common/cmd_version.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)


diff --git a/common/cmd_version.c b/common/cmd_version.c
index e4b2ac1..860c7ea 100644
--- a/common/cmd_version.c
+++ b/common/cmd_version.c
@@ -25,6 +25,9 @@ 
 #include <command.h>
 #include <version.h>
 #include <linux/compiler.h>
+#include <asm/arch/sysinfo.h>
 const char __weak version_string[] = U_BOOT_VERSION_STRING;
@@ -37,7 +40,9 @@  int do_version(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	puts(LD_VERSION_STRING "\n");
+	printf("coreboot-%s (%s)\n", lib_sysinfo.version, lib_sysinfo.build);
 	return 0;