base-files: add all buildinfo with INCLUDE_CONFIG
authorXu Wang <xwang1498@gmx.com>
Sat, 8 Feb 2020 23:04:11 +0000 (23:04 +0000)
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>
Thu, 27 Feb 2020 11:14:09 +0000 (12:14 +0100)
CONFIG_INCLUDE_CONFIG option is helpful for being able to rebuild the
exact same firmware as you see on a live OpenWRT instance, but it's
crucially missing feeds information, so we can't rebuild the exact same
package versions. This commit fixes this by adding the remaining feeds
(and version) buildinfo files to the image.

Signed-off-by: Xu Wang <xwang1498@gmx.com>
config/Config-build.in
package/base-files/Makefile

index 59dfaea8bb9bd7a90ed17e5d6316376bda3ad6a7..6a6fb2882c0905e73f717a6162744aa471f85c05 100644 (file)
@@ -100,7 +100,7 @@ menu "Global build settings"
                bool "Include build configuration in firmware" if DEVEL
                default n
                help
-                 If enabled, config.buildinfo will be stored in /etc/build.config of firmware.
+                 If enabled, buildinfo files will be stored in /etc/build.* of firmware.
 
        config COLLECT_KERNEL_DEBUG
                bool
index 18325564dc29b5fc11046b18f46828bf5ec53412..4f4e93361fb1d8875c4e3c6ebc3803862adae01f 100644 (file)
@@ -198,7 +198,9 @@ define Package/base-files/install
 
        $(if $(CONFIG_INCLUDE_CONFIG), \
                echo -e "# Build configuration for board $(BOARD)/$(SUBTARGET)/$(PROFILE)\n" >$(1)/etc/build.config; \
-               cat $(BIN_DIR)/config.buildinfo >>$(1)/etc/build.config)
+               cat $(BIN_DIR)/config.buildinfo >>$(1)/etc/build.config; \
+               cat $(BIN_DIR)/feeds.buildinfo >>$(1)/etc/build.feeds; \
+               cat $(BIN_DIR)/version.buildinfo >>$(1)/etc/build.version)
 
        $(if $(CONFIG_CLEAN_IPKG),, \
                mkdir -p $(1)/etc/opkg; \