u-boot/cmd/version.c
Michal Simek ca3bea3fc4 cmd: version: Get information about GCC and LD back
U-Boot version command is no longer showing information about GCC and LD.
The reason is that version.h has been removed that's why CC_VERSION_STRING
and LD_VERSION_STRING are not pass.
Values are generated to generated/version_autogenerated.h which is sourced
in version.h.

Fixes: 54ecce2cbf ("version: Separate our version string from the version command")
Signed-off-by: Michal Simek <michal.simek@amd.com>
2025-03-17 08:06:53 -06:00

38 lines
855 B
C

// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright 2000-2009
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
*/
#include <command.h>
#include <display_options.h>
#include <version.h>
#include <version_string.h>
#include <linux/compiler.h>
#ifdef CONFIG_SYS_COREBOOT
#include <asm/cb_sysinfo.h>
#endif
static int do_version(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
char buf[DISPLAY_OPTIONS_BANNER_LENGTH];
printf(display_options_get_banner(false, buf, sizeof(buf)));
#ifdef CC_VERSION_STRING
puts(CC_VERSION_STRING "\n");
#endif
#ifdef LD_VERSION_STRING
puts(LD_VERSION_STRING "\n");
#endif
#ifdef CONFIG_SYS_COREBOOT
printf("coreboot-%s (%s)\n", lib_sysinfo.version, lib_sysinfo.build);
#endif
return 0;
}
U_BOOT_CMD(
version, 1, 1, do_version,
"print monitor, compiler and linker version",
""
);