trigger a kernel module rebuild when the kernel config changes
authorFelix Fietkau <nbd@openwrt.org>
Sat, 24 Mar 2007 17:05:26 +0000 (17:05 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Sat, 24 Mar 2007 17:05:26 +0000 (17:05 +0000)
SVN-Revision: 6671

include/kernel-build.mk
include/kernel-defaults.mk
package/kernel/Makefile

index a89d9d9f2500be28f80e1d4c4fb8e0ee60bc11af..d344702dda59fff0aac97217c32020dde15521cf 100644 (file)
@@ -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 $$@
 
index 61b5bdb2fdd2e9d364cc83be7c00a9163cf3126c..3469cff200cb4dc36b0aa02f27609afe703557d4 100644 (file)
@@ -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
index e58b310259cbc8daf1f41a9ee27086ce4a232745..bc0b88ba2f754c384d129ba1b0e0afc5f6033d80 100644 (file)
@@ -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