From 36ec020e6fc1e99a344d12ed2c493ff5877c742b Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Sat, 4 Jan 2025 22:38:42 +0100 Subject: [PATCH] package/pkg-kernel-module: disable CONFIG_TRIM_UNUSED_KSYMS The kernel option CONFIG_TRIM_UNUSED_KSYMS=y allows to trim unused kernel symbols... which basically prevents building external modules. This option has been enabled in the default MIPS architecture kernel defconfig since pretty much forever, and it causes build failures of all our external modules on MIPS in the autobuilders. To fix this in a global manner, we handle the problem in the kernel-module infrastructure, by appending to the _LINUX_CONFIG_FIXUPS variable provided by the package. Fixes: http://autobuild.buildroot.net/results/c26abec4e24d06557079654b12825efb2211996f/ (cryptodev-linux) http://autobuild.buildroot.net/results/699c618730cb33f0ccf54f90e4b722198fd3d3bc/ (emlog) http://autobuild.buildroot.net/results/f1d5626f5698a955bf378217528fbf4f8f741435/ (rtl8812au-aircrack-ng) http://autobuild.buildroot.net/results/c9a507757ce3a01cd08d596cb519ee9f19caf77c/ (mdio-tools) Signed-off-by: Thomas Petazzoni Signed-off-by: Julien Olivain (cherry picked from commit 1d8d9e8d6cd824b2a43a0b92d71cfb25a3f9300a) Signed-off-by: Peter Korsgaard --- package/pkg-kernel-module.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/package/pkg-kernel-module.mk b/package/pkg-kernel-module.mk index 4f64a73f11..032874c3ca 100644 --- a/package/pkg-kernel-module.mk +++ b/package/pkg-kernel-module.mk @@ -62,6 +62,9 @@ $(2)_MAKE ?= $$(BR2_MAKE) # the root of the package. $(2)_MODULE_SUBDIRS ?= . +$(2)_LINUX_CONFIG_FIXUPS += \ + $$(sep)$$(call KCONFIG_DISABLE_OPT,CONFIG_TRIM_UNUSED_KSYMS) + # Build the kernel module(s) # Force PWD for those packages that want to use it to find their # includes and other support files (Booo!)