[PATCH] build: make KERNEL_DEBUG_INFO_BTF_MODULES user-selectable

phpdragon phpdragon at foxmail.com
Thu Nov 26 20:43:26 PST 2026


Hi OpenWrt maintainers,

This is a follow-up to commit ab9bb79 ("build: add option KERNEL_DEBUG_INFO_BTF_MODULES").

The previous commit used def_bool y to fix the build breakage caused by the upstream kernel v6.6.31 prompt. However, this forces module BTF on for all users who enable BTF, which is unnecessary for use cases that only require vmlinux BTF (e.g., running CO-RE eBPF tools like dae on storage-constrained routers).

This patch changes it to a bool with default y. The default behavior remains unchanged, but it allows advanced users to disable it via menuconfig if they don't need it.

I have also submitted this as a GitHub PR for reference:
https://github.com/phpdragon/openwrt/pull/1

Below is the patch:

diff --git a/config/Config-kernel.in b/config/Config-kernel.in
index 7c531cefbcffea..a0bd190bb26543 100644
--- a/config/Config-kernel.in
+++ b/config/Config-kernel.in
@@ -570,8 +570,9 @@ config KERNEL_DEBUG_INFO_BTF
          Required to run BPF CO-RE applications.
 
 config KERNEL_DEBUG_INFO_BTF_MODULES
-       def_bool y
-       depends on KERNEL_DEBUG_INFO_BTF
+        bool "Generate BTF type information for kernel modules"
+        default y
+        depends on KERNEL_DEBUG_INFO_BTF
 
 config KERNEL_MODULE_ALLOW_BTF_MISMATCH
        bool "Allow loading modules with non-matching BTF type info"
-- 
2.55.0

Signed-off-by: phpdragon <phpdragon at qq.com>


More information about the openwrt-devel mailing list