gluon/patches/lede/0082-include-kernel.mk-build-kmod-packages-with-empty-FILES.patch

38 lines
1.5 KiB
Diff

From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Tue, 10 Apr 2018 09:03:52 +0200
Subject: include/kernel.mk: build kmod packages with empty FILES
kmod packages without FILES did not have an install step defined, leading
to no package being built. This affected netfilter/iptables packages, which
filter out builtin modules from FILES.
Not building a package that it is selected in .config is problematic, as
the generated empty package may be necessary to satisfy dependencies.
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
diff --git a/include/kernel.mk b/include/kernel.mk
index b1d0e8d927cb462b486cfd645d68963f1b6ab8ff..d8d457fe7a5d3584d8aa4e27430da84533c85ed0 100644
--- a/include/kernel.mk
+++ b/include/kernel.mk
@@ -194,8 +194,7 @@ $(call KernelPackage/$(1)/config)
$(call KernelPackage/depends)
ifneq ($(if $(filter-out %=y %=n %=m,$(KCONFIG)),$(filter m y,$(foreach c,$(filter-out %=y %=n %=m,$(KCONFIG)),$($(c)))),.),)
- ifneq ($(strip $(FILES)),)
- define Package/kmod-$(1)/install
+ define Package/kmod-$(1)/install
@for mod in $$(call version_filter,$$(FILES)); do \
if grep -q "$$$$$$$${mod##$(LINUX_DIR)/}" "$(LINUX_DIR)/modules.builtin"; then \
echo "NOTICE: module '$$$$$$$$mod' is built-in."; \
@@ -209,8 +208,7 @@ $(call KernelPackage/$(1)/config)
done;
$(call ModuleAutoLoad,$(1),$$(1),$(AUTOLOAD))
$(call KernelPackage/$(1)/install,$$(1))
- endef
- endif
+ endef
$(if $(CONFIG_PACKAGE_kmod-$(1)),
else
compile: $(1)-disabled