Currently each split-out kernel module RDEPENDS on the top-level kernel package (e.g. kernel-5.15-yocto-standard). Whilst at first this seems correct, as modules obviously need their matching kernel, there are many situations where the kernel is provided out-of-band and forcing the kernel in via RDEPENDS in the wrong thing to do, for example an initramfs really shouldn't contain a kernel image, but can contain kernel modules.
Change the module splitting logic to use RRECOMMENDS instead of RDEPENDS, and tighten the dependency to kernel-image instead of kernel to pull in just the image, which also means PACKAGE_EXCLUDE = "kernel-image-*" is sufficient to ensure the image doesn't get pulled into an image. Signed-off-by: Ross Burton <ross.bur...@arm.com> --- meta/classes/kernel-module-split.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/classes/kernel-module-split.bbclass b/meta/classes/kernel-module-split.bbclass index a29c294810e..4429fee4b51 100644 --- a/meta/classes/kernel-module-split.bbclass +++ b/meta/classes/kernel-module-split.bbclass @@ -175,7 +175,7 @@ python split_kernel_module_packages () { module_pattern_suffix = d.getVar('KERNEL_MODULE_PACKAGE_SUFFIX') module_pattern = module_pattern_prefix + kernel_package_name + '-module-%s' + module_pattern_suffix - modules = do_split_packages(d, root='${nonarch_base_libdir}/modules', file_regex=module_regex, output_pattern=module_pattern, description='%s kernel module', postinst=postinst, postrm=postrm, recursive=True, hook=frob_metadata, extra_depends='%s-%s' % (kernel_package_name, kernel_version)) + modules = do_split_packages(d, root='${nonarch_base_libdir}/modules', file_regex=module_regex, output_pattern=module_pattern, description='%s kernel module', postinst=postinst, postrm=postrm, recursive=True, hook=frob_metadata, extra_recommends='%s-image-%s' % (kernel_package_name, kernel_version)) if modules: d.appendVar('RDEPENDS:' + metapkg, ' '+' '.join(modules)) -- 2.25.1
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#161576): https://lists.openembedded.org/g/openembedded-core/message/161576 Mute This Topic: https://lists.openembedded.org/mt/89026749/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-