]>
Commit | Line | Data |
---|---|---|
83d290c5 | 1 | // SPDX-License-Identifier: GPL-2.0+ |
6b8f5ad1 PT |
2 | /* |
3 | * Copyright 2000-2009 | |
4 | * Wolfgang Denk, DENX Software Engineering, wd@denx.de. | |
6b8f5ad1 PT |
5 | */ |
6 | ||
d678a59d | 7 | #include <common.h> |
6b8f5ad1 | 8 | #include <command.h> |
4e4bf944 | 9 | #include <display_options.h> |
bdfb6d70 | 10 | #include <version_string.h> |
09c2e90c | 11 | #include <linux/compiler.h> |
e56cdd77 | 12 | #ifdef CONFIG_SYS_COREBOOT |
e35b6497 | 13 | #include <asm/cb_sysinfo.h> |
e56cdd77 | 14 | #endif |
6b8f5ad1 | 15 | |
09140113 SG |
16 | static int do_version(struct cmd_tbl *cmdtp, int flag, int argc, |
17 | char *const argv[]) | |
6b8f5ad1 | 18 | { |
6c519f2d SG |
19 | char buf[DISPLAY_OPTIONS_BANNER_LENGTH]; |
20 | ||
21 | printf(display_options_get_banner(false, buf, sizeof(buf))); | |
89ffa8db AH |
22 | #ifdef CC_VERSION_STRING |
23 | puts(CC_VERSION_STRING "\n"); | |
24 | #endif | |
25 | #ifdef LD_VERSION_STRING | |
26 | puts(LD_VERSION_STRING "\n"); | |
27 | #endif | |
e56cdd77 SR |
28 | #ifdef CONFIG_SYS_COREBOOT |
29 | printf("coreboot-%s (%s)\n", lib_sysinfo.version, lib_sysinfo.build); | |
30 | #endif | |
6b8f5ad1 PT |
31 | return 0; |
32 | } | |
33 | ||
34 | U_BOOT_CMD( | |
35 | version, 1, 1, do_version, | |
89ffa8db | 36 | "print monitor, compiler and linker version", |
6b8f5ad1 PT |
37 | "" |
38 | ); |