All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-yocto][poky][master][PATCH] module.bbclass: enhance KBUILD_EXTRA_SYMBOLS retrieval
@ 2025-01-10  3:08 Daniel Chaves
  2025-01-10  7:43 ` [yocto] " Alexandre Belloni
  2025-01-10 14:22 ` Richard Purdie
  0 siblings, 2 replies; 3+ messages in thread
From: Daniel Chaves @ 2025-01-10  3:08 UTC (permalink / raw)
  To: yocto; +Cc: Daniel Chaves

Kernel packages may not always use the kernel-module- prefix. However,
those listed in DEPENDS will consistently add Module.symvers to the
STAGING_INCDIR.

Signed-off-by: Daniel Chaves <dchvs11@gmail.com>
---
 meta/classes-recipe/module.bbclass | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/meta/classes-recipe/module.bbclass b/meta/classes-recipe/module.bbclass
index f2f0b25a2d..0f16522866 100644
--- a/meta/classes-recipe/module.bbclass
+++ b/meta/classes-recipe/module.bbclass
@@ -11,13 +11,13 @@ EXTRA_OEMAKE += "KERNEL_SRC=${STAGING_KERNEL_DIR}"
 MODULES_INSTALL_TARGET ?= "modules_install"
 MODULES_MODULE_SYMVERS_LOCATION ?= ""
 
-python __anonymous () {
-    depends = d.getVar('DEPENDS')
-    extra_symbols = []
-    for dep in depends.split():
-        if dep.startswith("kernel-module-"):
-            extra_symbols.append("${STAGING_INCDIR}/" + dep + "/Module.symvers")
-    d.setVar('KBUILD_EXTRA_SYMBOLS', " ".join(extra_symbols))
+python () {
+    import glob
+
+    extra_symbols = glob.glob(d.getVar('STAGING_INCDIR') + "/*/Module.symvers")
+
+    d.setVar('KBUILD_EXTRA_SYMBOLS', d.getVar('KBUILD_EXTRA_SYMBOLS') + " " + \
+        " ".join(extra_symbols))
 }
 
 python do_package:prepend () {
-- 
2.40.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-01-10 14:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-10  3:08 [linux-yocto][poky][master][PATCH] module.bbclass: enhance KBUILD_EXTRA_SYMBOLS retrieval Daniel Chaves
2025-01-10  7:43 ` [yocto] " Alexandre Belloni
2025-01-10 14:22 ` Richard Purdie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.