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