From 35317253e61385934becad42c99739ed3349a3b8 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sat, 24 Mar 2007 17:05:26 +0000 Subject: [PATCH] trigger a kernel module rebuild when the kernel config changes SVN-Revision: 6671 --- include/kernel-build.mk | 5 +---- include/kernel-defaults.mk | 3 +++ package/kernel/Makefile | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/include/kernel-build.mk b/include/kernel-build.mk index a89d9d9f25..d344702dda 100644 --- a/include/kernel-build.mk +++ b/include/kernel-build.mk @@ -92,10 +92,7 @@ define BuildKernel $(call Kernel/Configure) touch $$@ - $(LINUX_DIR)/.modules: $(LINUX_DIR)/.configured - rm -rf $(KERNEL_BUILD_DIR)/modules - @rm -f $(BUILD_DIR)/linux - ln -sf $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION) $(BUILD_DIR)/linux + $(LINUX_DIR)/.modules: $(LINUX_DIR)/.configured $(LINUX_DIR)/.config $(call Kernel/CompileModules) touch $$@ diff --git a/include/kernel-defaults.mk b/include/kernel-defaults.mk index 61b5bdb2fd..3469cff200 100644 --- a/include/kernel-defaults.mk +++ b/include/kernel-defaults.mk @@ -49,6 +49,9 @@ define Kernel/Configure/Default $(SCRIPT_DIR)/config.pl '+' $(GENERIC_PLATFORM_DIR)/config-template $(LINUX_CONFIG) > $(LINUX_DIR)/.config; \ fi $(call Kernel/Configure/$(KERNEL)) + rm -rf $(KERNEL_BUILD_DIR)/modules + @rm -f $(BUILD_DIR)/linux + ln -sf $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION) $(BUILD_DIR)/linux endef define Kernel/CompileModules/Default diff --git a/package/kernel/Makefile b/package/kernel/Makefile index e58b310259..bc0b88ba2f 100644 --- a/package/kernel/Makefile +++ b/package/kernel/Makefile @@ -14,6 +14,7 @@ PKG_VERSION:=$(LINUX_VERSION)-$(BOARD) PKG_RELEASE:=$(LINUX_RELEASE) PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/packages +PKG_FILE_DEPEND:=$(MODULES_DIR) # build all in-tree kmod-* packages by default KMOD_DEFAULT:=m -- 2.25.1