1 // SPDX-License-Identifier: GPL-2.0+
4 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
10 #include <version_string.h>
11 #include <linux/compiler.h>
12 #ifdef CONFIG_SYS_COREBOOT
13 #include <asm/cb_sysinfo.h>
16 const char __weak version_string[] = U_BOOT_VERSION_STRING;
18 static int do_version(struct cmd_tbl *cmdtp, int flag, int argc,
21 char buf[DISPLAY_OPTIONS_BANNER_LENGTH];
23 printf(display_options_get_banner(false, buf, sizeof(buf)));
24 #ifdef CC_VERSION_STRING
25 puts(CC_VERSION_STRING "\n");
27 #ifdef LD_VERSION_STRING
28 puts(LD_VERSION_STRING "\n");
30 #ifdef CONFIG_SYS_COREBOOT
31 printf("coreboot-%s (%s)\n", lib_sysinfo.version, lib_sysinfo.build);
37 version, 1, 1, do_version,
38 "print monitor, compiler and linker version",