summaryrefslogtreecommitdiffstats
path: root/meta/classes/kernel.bbclass
diff options
context:
space:
mode:
authorZoltán Böszörményi <zboszor@gmail.com>2021-08-23 16:54:48 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-08-27 11:53:22 +0100
commit4b13409d82e9d576e32b978f7a42a143127ab894 (patch)
tree24c9cae13f2bdb6cc2e2698a493773c3062c2f00 /meta/classes/kernel.bbclass
parent796d4661a6121dba878c29d2388258c795be3aeb (diff)
downloadopenembedded-core-4b13409d82e9d576e32b978f7a42a143127ab894.tar.gz
Allow opt-out of split kernel modules
For some use cases, a monolithic kernel-modules package containing all modules built from the kernel sources may be preferred. For one, download time is shorter and installation time is faster. Set KERNEL_SPLIT_MODULES="0" for this in. The default is one subpackage per module. Also, adapt kernel.bbclass to KERNEL_SPLIT_MODULES != "1" case Extra RDEPENDS and other inter-package references are needed in this case. Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/kernel.bbclass')
-rw-r--r--meta/classes/kernel.bbclass7
1 files changed, 7 insertions, 0 deletions
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 027e66eec7..6dc5387a9b 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -98,6 +98,13 @@ python __anonymous () {
d.appendVar('PACKAGES', ' %s-image-%s' % (kname, typelower))
d.setVar('FILES:' + kname + '-image-' + typelower, '/' + imagedest + '/' + type + '-${KERNEL_VERSION_NAME}' + ' /' + imagedest + '/' + type)
d.appendVar('RDEPENDS:%s-image' % kname, ' %s-image-%s' % (kname, typelower))
+ splitmods = d.getVar("KERNEL_SPLIT_MODULES")
+ if splitmods != '1':
+ d.appendVar('RDEPENDS:%s-image' % kname, ' %s-modules' % kname)
+ d.appendVar('RDEPENDS:%s-image-%s' % (kname, typelower), ' %s-modules-${KERNEL_VERSION_PKG_NAME}' % kname)
+ d.setVar('PKG:%s-modules' % kname, '%s-modules-${KERNEL_VERSION_PKG_NAME}' % kname)
+ d.appendVar('RPROVIDES:%s-modules' % kname, '%s-modules-${KERNEL_VERSION_PKG_NAME}' % kname)
+
d.setVar('PKG:%s-image-%s' % (kname,typelower), '%s-image-%s-${KERNEL_VERSION_PKG_NAME}' % (kname, typelower))
d.setVar('ALLOW_EMPTY:%s-image-%s' % (kname, typelower), '1')
d.setVar('pkg_postinst:%s-image-%s' % (kname,typelower), """set +e