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