version: Move version_string[] from version.h to version_string.h
Subsystems (2)
PATCH 1/1 version: Move version_string[] from version.h to version_string.h
More C files do not use compile time timestamp macros and do not have to be recompiled every time when SOURCE_DATE_EPOCH changes.
This patch moves version_string[] from version.h to version_string.h and updates other C files which only needs version_string[] string to include version_string.h instead of version.h. After applying this patch these files are not recompiled every time when SOURCE_DATE_EPOCH changes.
--- board/ge/b1x5v2/b1x5v2.c | 2 +- board/ge/bx50v3/bx50v3.c | 2 +- board/ge/mx53ppd/mx53ppd.c | 2 +- cmd/version.c | 1 + common/main.c | 2 +- drivers/video/cfb_console.c | 3 +-- include/version.h | 3 --- include/version_string.h | 8 ++++++++ lib/display_options.c | 2 +- test/print_ut.c | 2 +- 10 files changed, 16 insertions(+), 11 deletions(-) create mode 100644 include/version_string.h
board/ge/b1x5v2/b1x5v2.c +1 -1
@@ -29,7 +29,7 @@#include <panel.h> #include <rtc.h> #include <spi_flash.h> -#include <version.h> +#include <version_string.h> #include "../common/vpd_reader.h"
board/ge/bx50v3/bx50v3.c +1 -1
@@ -32,7 +32,7 @@#include <power/da9063_pmic.h> #include <input.h> #include <pwm.h> -#include <version.h> +#include <version_string.h> #include <stdlib.h> #include <dm/root.h> #include "../common/ge_rtc.h"
board/ge/mx53ppd/mx53ppd.c +1 -1
@@ -32,7 +32,7 @@#include <fsl_pmic.h> #include <linux/fb.h> #include <ipu_pixfmt.h> -#include <version.h> +#include <version_string.h> #include <watchdog.h> #include "ppd_gpio.h" #include <stdlib.h>
cmd/version.c +1 -0
@@ -7,6 +7,7 @@#include <common.h> #include <command.h> #include <version.h> +#include <version_string.h> #include <linux/compiler.h> #ifdef CONFIG_SYS_COREBOOT #include <asm/arch/sysinfo.h>
common/main.c +1 -1
@@ -15,7 +15,7 @@#include <env.h> #include <init.h> #include <net.h> -#include <version.h> +#include <version_string.h> #include <efi_loader.h> static void run_preboot_environment_command (void )
drivers/video/cfb_console.c +1 -2
@@ -71,7 +71,7 @@#include <fdtdec.h> #include <gzip.h> #include <log.h> -#include <version.h> +#include <version_string.h> #include <malloc.h> #include <video.h> #include <linux/compiler.h>
@@ -121,7 +121,6 @@* Console device */ -#include <version.h> #include <linux/types.h> #include <stdio_dev.h> #include <video_font.h>
include/version.h +0 -3
@@ -16,7 +16,4 @@#define U_BOOT_VERSION_STRING U_BOOT_VERSION " (" U_BOOT_DATE " - " \ U_BOOT_TIME " " U_BOOT_TZ ")" CONFIG_IDENT_STRING -#ifndef __ASSEMBLY__ -extern const char version_string[]; -#endif /* __ASSEMBLY__ */ #endif /* __VERSION_H__ */
include/version_string.h new file +8 -0
@@ -0,0 +1,8 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ + +#ifndef __VERSION_STRING_H__ +#define __VERSION_STRING_H__ + +extern const char version_string[]; + +#endif /* __VERSION_STRING_H__ */
lib/display_options.c +1 -1
@@ -8,7 +8,7 @@#include <compiler.h> #include <console.h> #include <div64.h> -#include <version.h> +#include <version_string.h> #include <linux/ctype.h> #include <asm/io.h>
test/print_ut.c +1 -1
@@ -12,7 +12,7 @@#endif #include <display_options.h> #include <log.h> -#include <version.h> +#include <version_string.h> #define FAKE_BUILD_TAG "jenkins-u-boot-denx_uboot_dm-master-build-aarch64" \ "and a lot more text to come"
Signature · 1 line
2.20.1
PATCH 1/1 version: Move version_string[] from version.h to version_string.h
Quoted 10 lines · Pali Roh?r
More C files do not use compile time timestamp macros and do not have to be recompiled every time when
SOURCE_DATE_EPOCHchanges.This patch moves version_string[] from
version.htoversion_string.hand updates other C files which only needs version_string[] string to includeversion_string.hinstead ofversion.h. After applying this patch these files are not recompiled every time whenSOURCE_DATE_EPOCHchanges.Signed-off-by Pali Roh?r <[email protected]>
Quoted 14 lines
--- board/ge/b1x5v2/b1x5v2.c | 2 +- board/ge/bx50v3/bx50v3.c | 2 +- board/ge/mx53ppd/mx53ppd.c | 2 +- cmd/version.c | 1 + common/main.c | 2 +- drivers/video/cfb_console.c | 3 +-- include/version.h | 3 --- include/version_string.h | 8 ++++++++ lib/display_options.c | 2 +- test/print_ut.c | 2 +- 10 files changed, 16 insertions(+), 11 deletions(-) create mode 100644 include/version_string.h
PATCH 1/1 version: Move version_string[] from version.h to version_string.h
In reply to Pali RohárQuoted 9 lines · Pali Roh?r
More C files do not use compile time timestamp macros and do not have to be recompiled every time when
SOURCE_DATE_EPOCHchanges.This patch moves version_string[] from
version.htoversion_string.hand updates other C files which only needs version_string[] string to includeversion_string.hinstead ofversion.h. After applying this patch these files are not recompiled every time whenSOURCE_DATE_EPOCHchanges.Signed-off-by Pali Roh?r <[email protected]>
Thanks,
Stefan
Quoted 144 lines
--- board/ge/b1x5v2/b1x5v2.c | 2 +- board/ge/bx50v3/bx50v3.c | 2 +- board/ge/mx53ppd/mx53ppd.c | 2 +- cmd/version.c | 1 + common/main.c | 2 +- drivers/video/cfb_console.c | 3 +-- include/version.h | 3 --- include/version_string.h | 8 ++++++++ lib/display_options.c | 2 +- test/print_ut.c | 2 +- 10 files changed, 16 insertions(+), 11 deletions(-)create mode 100644
include/version_string.hboard/ge/b1x5v2/b1x5v2.c +1
-1@@ -29,7 +29,7 @@#include <panel.h> #include <rtc.h> #include <spi_flash.h> -#include <version.h> +#include <version_string.h> #include "../common/vpd_reader.h" board/ge/bx50v3/bx50v3.c +1
-1@@ -32,7 +32,7 @@#include <power/da9063_pmic.h> #include <input.h> #include <pwm.h> -#include <version.h> +#include <version_string.h> #include <stdlib.h> #include <dm/root.h> #include "../common/ge_rtc.h" board/ge/mx53ppd/mx53ppd.c +1
-1@@ -32,7 +32,7 @@#include <fsl_pmic.h> #include <linux/fb.h> #include <ipu_pixfmt.h> -#include <version.h> +#include <version_string.h> #include <watchdog.h> #include "ppd_gpio.h" #include <stdlib.h> cmd/version.c +1
-0@@ -7,6 +7,7 @@#include <common.h> #include <command.h> #include <version.h> +#include <version_string.h> #include <linux/compiler.h> #ifdef CONFIG_SYS_COREBOOT #include <asm/arch/sysinfo.h> common/main.c +1
-1@@ -15,7 +15,7 @@#include <env.h> #include <init.h> #include <net.h> -#include <version.h> +#include <version_string.h> #include <efi_loader.h> static void run_preboot_environment_command (void )drivers/video/cfb_console.c +1
-2@@ -71,7 +71,7 @@#include <fdtdec.h> #include <gzip.h> #include <log.h> -#include <version.h> +#include <version_string.h> #include <malloc.h> #include <video.h> #include <linux/compiler.h> @@ -121,7 +121,6 @@* Console device */ -#include <version.h> #include <linux/types.h> #include <stdio_dev.h> #include <video_font.h> include/version.h +0
-3@@ -16,7 +16,4 @@#define U_BOOT_VERSION_STRING U_BOOT_VERSION " (" U_BOOT_DATE " - " \ U_BOOT_TIME " " U_BOOT_TZ ")" CONFIG_IDENT_STRING -#ifndef __ASSEMBLY__ -extern const char version_string[]; -#endif /* __ASSEMBLY__ */ #endif /* __VERSION_H__ */ include/version_string.h new file +8
-0@@ -0,0 +1,8 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ + +#ifndef __VERSION_STRING_H__ +#define __VERSION_STRING_H__ + +extern const char version_string[]; + +#endif /* __VERSION_STRING_H__ */ lib/display_options.c +1
-1@@ -8,7 +8,7 @@#include <compiler.h> #include <console.h> #include <div64.h> -#include <version.h> +#include <version_string.h> #include <linux/ctype.h> #include <asm/io.h> test/print_ut.c +0
-0
test/print_ut.c line 18
Quoted 8 lines
test/print_ut.c +1
-1@@ -12,7 +12,7 @@#endif #include <display_options.h> #include <log.h> -#include <version.h> +#include <version_string.h> #define FAKE_BUILD_TAG "jenkins-u-boot-denx_uboot_dm-master-build-aarch64" \ "and a lot more text to come"
Viele Gr??e,
Stefan
Signature · 3 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr at denx.de