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