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>
This commit is contained in:
Matthias Schiffer 2018-04-10 09:03:52 +02:00
parent 85282ae69c
commit d3756a9a13
No known key found for this signature in database
GPG key ID: 16EF3F64CB201D9C

View file

@ -225,7 +225,6 @@ $(call KernelPackage/$(1)/config)
$(call KernelPackage/hooks) $(call KernelPackage/hooks)
ifneq ($(if $(filter-out %=y %=n %=m,$(KCONFIG)),$(filter m y,$(foreach c,$(filter-out %=y %=n %=m,$(KCONFIG)),$($(c)))),.),) 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 \ @for mod in $$(call version_filter,$$(FILES)); do \
if grep -q "$$$$$$$${mod##$(LINUX_DIR)/}" "$(LINUX_DIR)/modules.builtin"; then \ if grep -q "$$$$$$$${mod##$(LINUX_DIR)/}" "$(LINUX_DIR)/modules.builtin"; then \
@ -241,7 +240,6 @@ $(call KernelPackage/$(1)/config)
$(call ModuleAutoLoad,$(1),$$(1),$(filter-out 0-,$(word 1,$(AUTOLOAD))-),$(filter-out 0,$(word 2,$(AUTOLOAD))),$(wordlist 3,99,$(AUTOLOAD))) $(call ModuleAutoLoad,$(1),$$(1),$(filter-out 0-,$(word 1,$(AUTOLOAD))-),$(filter-out 0,$(word 2,$(AUTOLOAD))),$(wordlist 3,99,$(AUTOLOAD)))
$(call KernelPackage/$(1)/install,$$(1)) $(call KernelPackage/$(1)/install,$$(1))
endef endef
endif
$(if $(CONFIG_PACKAGE_kmod-$(1)), $(if $(CONFIG_PACKAGE_kmod-$(1)),
else else
compile: $(1)-disabled compile: $(1)-disabled