2009-10-16 22:36:25 +00:00
|
|
|
/*
|
|
|
|
* Copyright 2000-2009
|
|
|
|
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
|
|
|
*
|
|
|
|
* See file CREDITS for list of people who contributed to this
|
|
|
|
* project.
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License as
|
|
|
|
* published by the Free Software Foundation; either version 2 of
|
|
|
|
* the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
|
|
|
* MA 02111-1307 USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <common.h>
|
|
|
|
#include <command.h>
|
2011-01-18 23:24:40 +00:00
|
|
|
#include <version.h>
|
2011-07-18 18:24:04 +00:00
|
|
|
#include <linux/compiler.h>
|
2012-12-14 13:05:18 +00:00
|
|
|
#ifdef CONFIG_SYS_COREBOOT
|
|
|
|
#include <asm/arch/sysinfo.h>
|
|
|
|
#endif
|
2009-10-16 22:36:25 +00:00
|
|
|
|
2011-07-18 18:24:04 +00:00
|
|
|
const char __weak version_string[] = U_BOOT_VERSION_STRING;
|
2009-10-16 22:36:25 +00:00
|
|
|
|
2012-10-29 13:34:31 +00:00
|
|
|
static int do_version(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
2009-10-16 22:36:25 +00:00
|
|
|
{
|
|
|
|
printf("\n%s\n", version_string);
|
2011-01-18 23:24:40 +00:00
|
|
|
#ifdef CC_VERSION_STRING
|
|
|
|
puts(CC_VERSION_STRING "\n");
|
|
|
|
#endif
|
|
|
|
#ifdef LD_VERSION_STRING
|
|
|
|
puts(LD_VERSION_STRING "\n");
|
|
|
|
#endif
|
2012-12-14 13:05:18 +00:00
|
|
|
#ifdef CONFIG_SYS_COREBOOT
|
|
|
|
printf("coreboot-%s (%s)\n", lib_sysinfo.version, lib_sysinfo.build);
|
|
|
|
#endif
|
2009-10-16 22:36:25 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
U_BOOT_CMD(
|
|
|
|
version, 1, 1, do_version,
|
2011-01-18 23:24:40 +00:00
|
|
|
"print monitor, compiler and linker version",
|
2009-10-16 22:36:25 +00:00
|
|
|
""
|
|
|
|
);
|