]> git.ipfire.org Git - people/ms/u-boot.git/blame - common/cmd_version.c
board: ti: beagle_x15: added USB initializtion code
[people/ms/u-boot.git] / common / cmd_version.c
CommitLineData
6b8f5ad1
PT
1/*
2 * Copyright 2000-2009
3 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
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 16const char __weak version_string[] = U_BOOT_VERSION_STRING;
6b8f5ad1 17
088f1b19 18static int do_version(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
6b8f5ad1
PT
19{
20 printf("\n%s\n", version_string);
89ffa8db
AH
21#ifdef CC_VERSION_STRING
22 puts(CC_VERSION_STRING "\n");
23#endif
24#ifdef LD_VERSION_STRING
25 puts(LD_VERSION_STRING "\n");
26#endif
e56cdd77
SR
27#ifdef CONFIG_SYS_COREBOOT
28 printf("coreboot-%s (%s)\n", lib_sysinfo.version, lib_sysinfo.build);
29#endif
6b8f5ad1
PT
30 return 0;
31}
32
33U_BOOT_CMD(
34 version, 1, 1, do_version,
89ffa8db 35 "print monitor, compiler and linker version",
6b8f5ad1
PT
36 ""
37);