Browse Source

kernel: fix KernelPackage when all KCONFIG are versioned

If a kernel package was defined where all KCONFIG symbols were dynamic,
and versioned, no FILES would be installed, as the foreach evaluation was
providing the value of the variable defined by the KCONFIG symbol name
including the version test

Fix this by calling the version_filter function on the list of KCONFIG
variable names run through by foreach

Example, kernel 6.1:
KCONFIG:[email protected] [email protected]
filter-out any KCONFIG settings forced by package:
[email protected] [email protected]
there are dynamic settings, so for each of them,
get the value of the make variable defined by symbol name:
    [email protected] is not set
    [email protected] is not set
  versus
    CONFIG_OLD is not set
    CONFIG_NEW=m
test if any of these are m, or y
if yes, install files, otherwise, nothing to install

Signed-off-by: John Thomson <[email protected]>
John Thomson 2 years ago
parent
commit
b3448b3fdb
1 changed files with 1 additions and 1 deletions
  1. 1 1
      include/kernel.mk

+ 1 - 1
include/kernel.mk

@@ -236,7 +236,7 @@ $(call KernelPackage/$(1)/config)
   $(call KernelPackage/depends)
   $(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,$(call version_filter,$(filter-out %=y %=n %=m,$(KCONFIG))),$($(c)))),.),)
     define Package/kmod-$(1)/install
 		  @for mod in $$(call version_filter,$$(FILES)); do \
 			if grep -q "$$$$$$$${mod##$(LINUX_DIR)/}" "$(LINUX_DIR)/modules.builtin"; then \