From: Daniel Chaves <dchvs11@gmail.com>
To: <yocto@lists.yoctoproject.org>
Cc: Daniel Chaves <dchvs11@gmail.com>
Subject: [linux-yocto][poky][master][PATCH] module.bbclass: enhance KBUILD_EXTRA_SYMBOLS retrieval
Date: Fri, 10 Jan 2025 03:08:47 +0000 [thread overview]
Message-ID: <20250110030847.4839-1-dchvs11@gmail.com> (raw)
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
next reply other threads:[~2025-01-10 3:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-10 3:08 Daniel Chaves [this message]
2025-01-10 7:43 ` [yocto] [linux-yocto][poky][master][PATCH] module.bbclass: enhance KBUILD_EXTRA_SYMBOLS retrieval Alexandre Belloni
2025-01-10 14:22 ` Richard Purdie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250110030847.4839-1-dchvs11@gmail.com \
--to=dchvs11@gmail.com \
--cc=yocto@lists.yoctoproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox