1 // SPDX-License-Identifier: GPL-2.0+
4 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
9 #include <display_options.h>
10 #include <timestamp.h>
12 #include <version_string.h>
13 #include <linux/compiler.h>
14 #ifdef CONFIG_SYS_COREBOOT
15 #include <asm/cb_sysinfo.h>
18 #define U_BOOT_VERSION_STRING U_BOOT_VERSION " (" U_BOOT_DATE " - " \
19 U_BOOT_TIME " " U_BOOT_TZ ")" CONFIG_IDENT_STRING
21 const char version_string
[] = U_BOOT_VERSION_STRING
;
23 static int do_version(struct cmd_tbl
*cmdtp
, int flag
, int argc
,
26 char buf
[DISPLAY_OPTIONS_BANNER_LENGTH
];
28 printf(display_options_get_banner(false, buf
, sizeof(buf
)));
29 #ifdef CC_VERSION_STRING
30 puts(CC_VERSION_STRING
"\n");
32 #ifdef LD_VERSION_STRING
33 puts(LD_VERSION_STRING
"\n");
35 #ifdef CONFIG_SYS_COREBOOT
36 printf("coreboot-%s (%s)\n", lib_sysinfo
.version
, lib_sysinfo
.build
);
42 version
, 1, 1, do_version
,
43 "print monitor, compiler and linker version",