1 // SPDX-License-Identifier: GPL-2.0+
4 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
10 #include <linux/compiler.h>
11 #ifdef CONFIG_SYS_COREBOOT
12 #include <asm/arch/sysinfo.h>
15 const char __weak version_string[] = U_BOOT_VERSION_STRING;
17 static int do_version(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
19 char buf[DISPLAY_OPTIONS_BANNER_LENGTH];
21 printf(display_options_get_banner(false, buf, sizeof(buf)));
22 #ifdef CC_VERSION_STRING
23 puts(CC_VERSION_STRING "\n");
25 #ifdef LD_VERSION_STRING
26 puts(LD_VERSION_STRING "\n");
28 #ifdef CONFIG_SYS_COREBOOT
29 printf("coreboot-%s (%s)\n", lib_sysinfo.version, lib_sysinfo.build);
35 version, 1, 1, do_version,
36 "print monitor, compiler and linker version",