aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2016-01-06 18:37:42 +0000
committerFelix Fietkau <nbd@openwrt.org>2016-01-06 18:37:42 +0000
commit9c949b0dcab5e3b82d066da0041deae2ef2e4d8c (patch)
tree564f934a8123ec5e2ebae2b24728985330926eae
parent5f69279dd608b54807714716cb9ff9e39f2e72c5 (diff)
downloadupstream-9c949b0dcab5e3b82d066da0041deae2ef2e4d8c.tar.gz
upstream-9c949b0dcab5e3b82d066da0041deae2ef2e4d8c.tar.bz2
upstream-9c949b0dcab5e3b82d066da0041deae2ef2e4d8c.zip
build: suppress unnecessary kernel config rewrites to speed up build
Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 48143
-rw-r--r--include/kernel-defaults.mk15
1 files changed, 10 insertions, 5 deletions
diff --git a/include/kernel-defaults.mk b/include/kernel-defaults.mk
index d37787a44b..f3b5e421d1 100644
--- a/include/kernel-defaults.mk
+++ b/include/kernel-defaults.mk
@@ -80,6 +80,7 @@ ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
endif
define Kernel/SetInitramfs
+ rm -f $(LINUX_DIR)/.config.prev
mv $(LINUX_DIR)/.config $(LINUX_DIR)/.config.old
$(call Kernel/SetInitramfs/PreConfigure)
echo 'CONFIG_INITRAMFS_ROOT_UID=$(shell id -u)' >> $(LINUX_DIR)/.config
@@ -96,9 +97,9 @@ else
endif
define Kernel/SetNoInitramfs
- mv $(LINUX_DIR)/.config $(LINUX_DIR)/.config.old
- grep -v INITRAMFS $(LINUX_DIR)/.config.old > $(LINUX_DIR)/.config
- echo 'CONFIG_INITRAMFS_SOURCE=""' >> $(LINUX_DIR)/.config
+ mv $(LINUX_DIR)/.config.set $(LINUX_DIR)/.config.old
+ grep -v INITRAMFS $(LINUX_DIR)/.config.old > $(LINUX_DIR)/.config.set
+ echo 'CONFIG_INITRAMFS_SOURCE=""' >> $(LINUX_DIR)/.config.set
endef
define Kernel/Configure/Default
@@ -109,11 +110,15 @@ define Kernel/Configure/Default
echo "# CONFIG_KALLSYMS_ALL is not set" >> $(LINUX_DIR)/.config.target
echo "# CONFIG_KALLSYMS_UNCOMPRESSED is not set" >> $(LINUX_DIR)/.config.target
$(SCRIPT_DIR)/metadata.pl kconfig $(TMP_DIR)/.packageinfo $(TOPDIR)/.config $(KERNEL_PATCHVER) > $(LINUX_DIR)/.config.override
- $(SCRIPT_DIR)/kconfig.pl 'm+' '+' $(LINUX_DIR)/.config.target /dev/null $(LINUX_DIR)/.config.override > $(LINUX_DIR)/.config
+ $(SCRIPT_DIR)/kconfig.pl 'm+' '+' $(LINUX_DIR)/.config.target /dev/null $(LINUX_DIR)/.config.override > $(LINUX_DIR)/.config.set
$(call Kernel/SetNoInitramfs)
rm -rf $(KERNEL_BUILD_DIR)/modules
+ cmp -s $(LINUX_DIR)/.config.set $(LINUX_DIR)/.config.prev || { \
+ cp $(LINUX_DIR)/.config.set $(LINUX_DIR)/.config; \
+ cp $(LINUX_DIR)/.config.set $(LINUX_DIR)/.config.prev; \
+ }
$(_SINGLE) [ -d $(LINUX_DIR)/user_headers ] || $(MAKE) $(KERNEL_MAKEOPTS) INSTALL_HDR_PATH=$(LINUX_DIR)/user_headers headers_install
- $(SH_FUNC) grep '=[ym]' $(LINUX_DIR)/.config | LC_ALL=C sort | md5s > $(LINUX_DIR)/.vermagic
+ $(SH_FUNC) grep '=[ym]' $(LINUX_DIR)/.config.set | LC_ALL=C sort | md5s > $(LINUX_DIR)/.vermagic
endef
define Kernel/Configure/Initramfs