"Das U-Boot" Source Tree
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

version: Separate our version string from the version command

In order to be able to disable all commands we need to construct our
version string in a common file, and have the version command reference
that string, like the other users of it do. Create common/version.c
with just the strings.

Signed-off-by: Tom Rini <trini@konsulko.com>

Tom Rini 54ecce2c 9f8b1508

+17 -9
-9
cmd/version.c
··· 7 7 #include <common.h> 8 8 #include <command.h> 9 9 #include <display_options.h> 10 - #include <timestamp.h> 11 - #include <version.h> 12 10 #include <version_string.h> 13 11 #include <linux/compiler.h> 14 12 #ifdef CONFIG_SYS_COREBOOT 15 13 #include <asm/cb_sysinfo.h> 16 14 #endif 17 - 18 - #define U_BOOT_VERSION_STRING U_BOOT_VERSION " (" U_BOOT_DATE " - " \ 19 - U_BOOT_TIME " " U_BOOT_TZ ")" CONFIG_IDENT_STRING 20 - 21 - const char version_string[] = U_BOOT_VERSION_STRING; 22 - const unsigned short version_num = U_BOOT_VERSION_NUM; 23 - const unsigned char version_num_patch = U_BOOT_VERSION_NUM_PATCH; 24 15 25 16 static int do_version(struct cmd_tbl *cmdtp, int flag, int argc, 26 17 char *const argv[])
+1
common/Makefile
··· 10 10 obj-y += exports.o 11 11 obj-$(CONFIG_HUSH_PARSER) += cli_hush.o 12 12 obj-$(CONFIG_AUTOBOOT) += autoboot.o 13 + obj-y += version.o 13 14 14 15 # # boards 15 16 obj-y += board_f.o
+16
common/version.c
··· 1 + // SPDX-License-Identifier: GPL-2.0+ 2 + /* 3 + * Copyright 2000-2009 4 + * Wolfgang Denk, DENX Software Engineering, wd@denx.de. 5 + */ 6 + 7 + #include <timestamp.h> 8 + #include <version.h> 9 + #include <version_string.h> 10 + 11 + #define U_BOOT_VERSION_STRING U_BOOT_VERSION " (" U_BOOT_DATE " - " \ 12 + U_BOOT_TIME " " U_BOOT_TZ ")" CONFIG_IDENT_STRING 13 + 14 + const char version_string[] = U_BOOT_VERSION_STRING; 15 + const unsigned short version_num = U_BOOT_VERSION_NUM; 16 + const unsigned char version_num_patch = U_BOOT_VERSION_NUM_PATCH;