]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
x86: Add coreboot version to u-boot's version command
authorStefan Reinauer <reinauer@chromium.org>
Fri, 14 Dec 2012 13:05:18 +0000 (13:05 +0000)
committerSimon Glass <sjg@chromium.org>
Wed, 26 Dec 2012 18:36:26 +0000 (10:36 -0800)
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

index ab4c560ae094e1dffabe5c85404d5dd6fb90466c..e8f40d3ed189b3308c66a61e40f46f6a465aab2a 100644 (file)
@@ -25,6 +25,9 @@
 #include <command.h>
 #include <version.h>
 #include <linux/compiler.h>
+#ifdef CONFIG_SYS_COREBOOT
+#include <asm/arch/sysinfo.h>
+#endif
 
 const char __weak version_string[] = U_BOOT_VERSION_STRING;
 
@@ -37,7 +40,9 @@ static int do_version(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 #ifdef LD_VERSION_STRING
        puts(LD_VERSION_STRING "\n");
 #endif
-
+#ifdef CONFIG_SYS_COREBOOT
+       printf("coreboot-%s (%s)\n", lib_sysinfo.version, lib_sysinfo.build);
+#endif
        return 0;
 }