This function is calling make on the kernel makefiles. Even through --dry-run is
specificed, in my local tests it executes things and this is bad in itself.
The function is called from a shell function meaning it is always expanded
during
parsing, which means we're executing make during every datastore parse, which is
also very bad.
Simplfy the function down to ${S} for now. If there is need to change that we
can
parameterise it but we need working/safe builds and this is the least worse
alternative
besides reverting the changes.
Signed-off-by: Richard Purdie <[email protected]>
---
.../kernel-module-split.bbclass | 2 +-
meta/lib/oe/kernel_module.py | 21 -------------------
2 files changed, 1 insertion(+), 22 deletions(-)
diff --git a/meta/classes-recipe/kernel-module-split.bbclass
b/meta/classes-recipe/kernel-module-split.bbclass
index 413f39d641a..99c2d129629 100644
--- a/meta/classes-recipe/kernel-module-split.bbclass
+++ b/meta/classes-recipe/kernel-module-split.bbclass
@@ -62,7 +62,7 @@ post_strip_kernel_modules_signing(){
oe_runmake \
-C ${KBUILD_OUTPUT} \
MODLIB=${PKGD}${KERNEL_MODULE_INSTALL_PREFIX} \
- ${@'M=%s' % oe.kernel_module.get_ext_mod(d) if not
"virtual/kernel" in d.getVar('PROVIDES') else ''} \
+ ${@'M=%s' % '${S}' if not "virtual/kernel" in d.getVar('PROVIDES')
else ''} \
modules_sign
fi
}
diff --git a/meta/lib/oe/kernel_module.py b/meta/lib/oe/kernel_module.py
index edf723033f1..0d27fbaa57f 100644
--- a/meta/lib/oe/kernel_module.py
+++ b/meta/lib/oe/kernel_module.py
@@ -25,24 +25,3 @@ def kernel_module_os_env(d, env_dict):
env_dict['KBUILD_EXTRA_SYMBOLS'] = kbuild_extra_symbols
else:
env_dict['KBUILD_EXTRA_SYMBOLS'] = ''
-
-def get_ext_mod(d):
- """
- Extract the resolved Kbuild M= variable from an out of tree module
Makefile variable database.
- """
- import re
- import bb.process
-
- try:
- output = bb.process.run(
- "make -C %s --dry-run --print-data-base" % d.getVar("B")
- )[0]
- except bb.process.ExecutionError:
- return d.getVar("S")
-
- for line in output.splitlines():
- m = re.match(r'^M\s*=\s*(.*)$', line)
- if m:
- return m.group(1).strip()
-
- return d.getVar("S")
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#245147):
https://lists.openembedded.org/g/openembedded-core/message/245147
Mute This Topic: https://lists.openembedded.org/mt/121098908/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-