]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
version: Move version_string[] from version.h to version_string.h
authorPali Rohár <pali@kernel.org>
Mon, 2 Aug 2021 13:18:31 +0000 (15:18 +0200)
committerTom Rini <trini@konsulko.com>
Fri, 17 Sep 2021 16:10:44 +0000 (12:10 -0400)
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.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
board/ge/b1x5v2/b1x5v2.c
board/ge/bx50v3/bx50v3.c
board/ge/mx53ppd/mx53ppd.c
cmd/version.c
common/main.c
drivers/video/cfb_console.c
include/version.h
include/version_string.h [new file with mode: 0644]
lib/display_options.c
lib/efi_loader/efi_tcg2.c
test/print_ut.c

index de4cb0d5afaa2f8c977c7422e3011992fdae61d1..a2cbd1512e9214c6380c68d36047597d628a05e4 100644 (file)
@@ -30,7 +30,7 @@
 #include <panel.h>
 #include <rtc.h>
 #include <spi_flash.h>
-#include <version.h>
+#include <version_string.h>
 
 #include "../common/vpd_reader.h"
 
index 7fcebba0260062735a06833e7656b91bc26dc54a..ed700f4e1da532eecb3ae3efbadb592d07d77232 100644 (file)
@@ -34,7 +34,7 @@
 #include <power/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"
index 9c48883648f7c4e03656599ea576e0b78c0733e4..cc462d53da6a1b2da991efe7c25d7cec43a4c9bf 100644 (file)
@@ -33,7 +33,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>
index 685b458ce262a2061252875cf38e1362acc43750..965ac2e2144d25558d8b2705f33d11e68cb5f0fb 100644 (file)
@@ -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/cb_sysinfo.h>
index ae5bcdb32f8bacec599d558a636df6dc7f3664d4..3f5214fd44b8643199e9a6bd69a2711d833c5049 100644 (file)
@@ -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)
index 5e1ee061e8e81af2ceef6b3f9373ae282b49eb58..830ea80f4bcf79b1938d2278956c6a444fb0c0a2 100644 (file)
@@ -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 <asm/global_data.h>
  * Console device
  */
 
-#include <version.h>
 #include <linux/types.h>
 #include <stdio_dev.h>
 #include <video_font.h>
index 2d24451569d551de337cbde956d388c6a598ff9e..0a3b29adb89a2897c8067c8b74aec9232761a11c 100644 (file)
@@ -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__ */
diff --git a/include/version_string.h b/include/version_string.h
new file mode 100644 (file)
index 0000000..a89a6e4
--- /dev/null
@@ -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__ */
index 4da1f5244f3958d06aac045cd6b8e2e1b3d71e0f..360b01bcf5ffd62e2f821a7bf83478426171293a 100644 (file)
@@ -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>
 
index 578b69e38f7cc3fbc8f39e3dc3ae341cdbdc9ed2..7bacf9ce29b63bf2fcb175b0f1306cf14fa0bd5a 100644 (file)
@@ -14,7 +14,7 @@
 #include <efi_tcg2.h>
 #include <log.h>
 #include <malloc.h>
-#include <version.h>
+#include <version_string.h>
 #include <tpm-v2.h>
 #include <u-boot/hash-checksum.h>
 #include <u-boot/sha1.h>
index e2bcfbef00781fa779c609b9c22a290b9725b9f6..11d8580e55c560a38b893d28472d4498234a4435 100644 (file)
@@ -9,7 +9,7 @@
 #include <display_options.h>
 #include <log.h>
 #include <mapmem.h>
-#include <version.h>
+#include <version_string.h>
 #include <test/suites.h>
 #include <test/test.h>
 #include <test/ut.h>