Blame view
common/cmd_version.c
802 Bytes
6b8f5ad10
|
1 2 3 4 |
/* * Copyright 2000-2009 * Wolfgang Denk, DENX Software Engineering, wd@denx.de. * |
1a4596601
|
5 |
* SPDX-License-Identifier: GPL-2.0+ |
6b8f5ad10
|
6 7 8 9 |
*/ #include <common.h> #include <command.h> |
89ffa8dbb
|
10 |
#include <version.h> |
09c2e90c1
|
11 |
#include <linux/compiler.h> |
e56cdd778
|
12 13 14 |
#ifdef CONFIG_SYS_COREBOOT #include <asm/arch/sysinfo.h> #endif |
6b8f5ad10
|
15 |
|
09c2e90c1
|
16 |
const char __weak version_string[] = U_BOOT_VERSION_STRING; |
6b8f5ad10
|
17 |
|
088f1b199
|
18 |
static int do_version(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) |
6b8f5ad10
|
19 20 21 22 |
{ printf(" %s ", version_string); |
89ffa8dbb
|
23 24 25 26 27 28 29 30 |
#ifdef CC_VERSION_STRING puts(CC_VERSION_STRING " "); #endif #ifdef LD_VERSION_STRING puts(LD_VERSION_STRING " "); #endif |
e56cdd778
|
31 32 33 34 |
#ifdef CONFIG_SYS_COREBOOT printf("coreboot-%s (%s) ", lib_sysinfo.version, lib_sysinfo.build); #endif |
6b8f5ad10
|
35 36 37 38 39 |
return 0; } U_BOOT_CMD( version, 1, 1, do_version, |
89ffa8dbb
|
40 |
"print monitor, compiler and linker version", |
6b8f5ad10
|
41 42 |
"" ); |