[openwrt/openwrt] kernel: fix KernelPackage when all KCONFIG are versioned
LEDE Commits
lede-commits at lists.infradead.org
Sat Jul 8 07:23:25 PDT 2023
hauke pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/27f68a39fdd17e0182e16547f8e3443e839ce8bf
commit 27f68a39fdd17e0182e16547f8e3443e839ce8bf
Author: John Thomson <git at johnthomson.fastmail.com.au>
AuthorDate: Sat Jul 1 10:23:35 2023 +1000
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:=CONFIG_OLD at lt6.1 CONFIG_NEW at ge6.1
filter-out any KCONFIG settings forced by package:
CONFIG_OLD at lt6.1 CONFIG_NEW at ge6.1
there are dynamic settings, so for each of them,
get the value of the make variable defined by symbol name:
CONFIG_OLD at lt6.1 is not set
CONFIG_NEW at ge6.1 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 <git at johnthomson.fastmail.com.au>
(cherry picked from commit b3448b3fdb59d25dce05991dc8f322c1020b090b)
---
include/kernel.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/kernel.mk b/include/kernel.mk
index b1ae42534d..3012eb8993 100644
--- a/include/kernel.mk
+++ b/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 \
More information about the lede-commits
mailing list