Commit e56cdd778ca08fc8c32ffc3ddebbb6102519f344
Committed by
Simon Glass
1 parent
a08afb398b
Exists in
master
and in
54 other branches
x86: Add coreboot version to u-boot's version command
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>
Showing 1 changed file with 6 additions and 1 deletions Side-by-side Diff
common/cmd_version.c
... | ... | @@ -25,6 +25,9 @@ |
25 | 25 | #include <command.h> |
26 | 26 | #include <version.h> |
27 | 27 | #include <linux/compiler.h> |
28 | +#ifdef CONFIG_SYS_COREBOOT | |
29 | +#include <asm/arch/sysinfo.h> | |
30 | +#endif | |
28 | 31 | |
29 | 32 | const char __weak version_string[] = U_BOOT_VERSION_STRING; |
30 | 33 | |
... | ... | @@ -37,7 +40,9 @@ |
37 | 40 | #ifdef LD_VERSION_STRING |
38 | 41 | puts(LD_VERSION_STRING "\n"); |
39 | 42 | #endif |
40 | - | |
43 | +#ifdef CONFIG_SYS_COREBOOT | |
44 | + printf("coreboot-%s (%s)\n", lib_sysinfo.version, lib_sysinfo.build); | |
45 | +#endif | |
41 | 46 | return 0; |
42 | 47 | } |
43 | 48 |