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>
#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;
#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;
}