From patchwork Thu Nov 22 19:13:07 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [U-Boot, v2, 23/23] x86: Add coreboot version to u-boot's version command Date: Thu, 22 Nov 2012 09:13:07 -0000 From: Simon Glass X-Patchwork-Id: 201138 Message-Id: <1353611587-18186-24-git-send-email-sjg@chromium.org> To: U-Boot Mailing List Cc: Tom Rini , Stefan Reinauer From: Stefan Reinauer 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 --- Changes in v2: - Add x86 tag to version command patch 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 ab4c560..e8f40d3 100644 --- a/common/cmd_version.c +++ b/common/cmd_version.c @@ -25,6 +25,9 @@ #include #include #include +#ifdef CONFIG_SYS_COREBOOT +#include +#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; }