public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: "Zoltan Boszormenyi" <zboszor@pr.hu>
To: Bruce Ashfield <bruce.ashfield@gmail.com>
Cc: Patches and discussions about the oe-core layer
	<openembedded-core@lists.openembedded.org>,
	zboszor@gmail.com
Subject: Re: [OE-core] [PATCH 3/6] kernel-module-split.bbclass: Allow opt-out of split kernel modules
Date: Mon, 23 Aug 2021 15:18:49 +0200	[thread overview]
Message-ID: <d780f47b-38a7-a44e-d8a1-3d6dd0a286c5@pr.hu> (raw)
In-Reply-To: <CADkTA4PC3Fi6y+OSFUWSxRgdbFQsc=Vfq4Yv_G86nmatnWirbA@mail.gmail.com>

2021. 08. 23. 14:55 keltezéssel, Bruce Ashfield írta:
> On Mon, Aug 23, 2021 at 8:23 AM Zoltan Boszormenyi via
> lists.openembedded.org <zboszor=pr.hu@lists.openembedded.org> wrote:
>>
>> From: Zoltán Böszörményi <zboszor@gmail.com>
>>
>> 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.
>>
> 
> There's still an outstanding issue though. Unless you generate the
> provides/rdepends along with the monolithic package, any existing
> rdepends on kernel modules break.

The next patch in the thread does it.

> 
> While that likely isn't something you hit in your use case, it would
> be something that would have to be covered to make this part of core.
> 
> About 7 years ago, I was most of the way through a similar change,
> that created on large package with all the rprovides generated (I'm
> not sure I can track it down now, but I could have a look), since
> doing an on target update with thousands of kernel module package is
> very painful.

Well, yes. In our defconfig, about 1500 kernel-module-* subpackages
were created and had to be upgraded at once. It was *very* painful
with over 50 minutes to download and upgrade the kernel.

> 
> Cheers,
> 
> Bruce
> 
>> Set KERNEL_SPLIT_MODULES="0" for this.
>>
>> The default is one subpackage per module.
>>
>> Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
>> ---
>>   meta/classes/kernel-module-split.bbclass | 17 +++++++++++++----
>>   1 file changed, 13 insertions(+), 4 deletions(-)
>>
>> diff --git a/meta/classes/kernel-module-split.bbclass b/meta/classes/kernel-module-split.bbclass
>> index 6c1de4c992..a29c294810 100644
>> --- a/meta/classes/kernel-module-split.bbclass
>> +++ b/meta/classes/kernel-module-split.bbclass
>> @@ -28,6 +28,7 @@ do_install:append() {
>>          install -d ${D}${sysconfdir}/modules-load.d/ ${D}${sysconfdir}/modprobe.d/
>>   }
>>
>> +KERNEL_SPLIT_MODULES ?= "1"
>>   PACKAGESPLITFUNCS:prepend = "split_kernel_module_packages "
>>
>>   KERNEL_MODULES_META_PACKAGE ?= "${@ d.getVar("KERNEL_PACKAGE_NAME") or "kernel" }-modules"
>> @@ -156,18 +157,26 @@ python split_kernel_module_packages () {
>>       kernel_package_name = d.getVar("KERNEL_PACKAGE_NAME") or "kernel"
>>       kernel_version = d.getVar("KERNEL_VERSION")
>>
>> +    metapkg = d.getVar('KERNEL_MODULES_META_PACKAGE')
>> +    splitmods = d.getVar('KERNEL_SPLIT_MODULES')
>> +    postinst = d.getVar('pkg_postinst:modules')
>> +    postrm = d.getVar('pkg_postrm:modules')
>> +
>> +    if splitmods != '1':
>> +        etcdir = d.getVar('sysconfdir')
>> +        d.appendVar('FILES:' + metapkg, '%s/modules-load.d/ %s/modprobe.d/ %s/modules/' % (etcdir, etcdir, d.getVar("nonarch_base_libdir")))
>> +        d.appendVar('pkg_postinst:%s' % metapkg, postinst)
>> +        d.prependVar('pkg_postrm:%s' % metapkg, postrm);
>> +        return
>> +
>>       module_regex = r'^(.*)\.k?o(?:\.(gz|xz|zst))?$'
>>
>>       module_pattern_prefix = d.getVar('KERNEL_MODULE_PACKAGE_PREFIX')
>>       module_pattern_suffix = d.getVar('KERNEL_MODULE_PACKAGE_SUFFIX')
>>       module_pattern = module_pattern_prefix + kernel_package_name + '-module-%s' + module_pattern_suffix
>>
>> -    postinst = d.getVar('pkg_postinst:modules')
>> -    postrm = d.getVar('pkg_postrm:modules')
>> -
>>       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))
>>       if modules:
>> -        metapkg = d.getVar('KERNEL_MODULES_META_PACKAGE')
>>           d.appendVar('RDEPENDS:' + metapkg, ' '+' '.join(modules))
>>
>>       # If modules-load.d and modprobe.d are empty at this point, remove them to
>> --
>> 2.31.1
>>
>>
>>
>>
> 
> 
> 
> 
> 
> 


  reply	other threads:[~2021-08-23 13:18 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-23 12:23 Kernel and RPM related bbclass changes Zoltan Boszormenyi
2021-08-23 12:23 ` [PATCH 1/6] package_rpm.bbclass: Handle posttrans scriptlets Zoltan Boszormenyi
2021-08-23 12:34   ` [OE-core] " Alexander Kanavin
2021-08-23 13:14     ` Zoltan Boszormenyi
2021-08-23 13:23       ` Richard Purdie
2021-08-23 13:42         ` Zoltan Boszormenyi
2021-08-23 12:23 ` [PATCH 2/6] kernel-module-split.bbclass: Support zstd-compressed modules Zoltan Boszormenyi
2021-08-23 12:23 ` [PATCH 3/6] kernel-module-split.bbclass: Allow opt-out of split kernel modules Zoltan Boszormenyi
2021-08-23 12:55   ` [OE-core] " Bruce Ashfield
2021-08-23 13:18     ` Zoltan Boszormenyi [this message]
2021-08-23 13:27       ` Bruce Ashfield
2021-08-23 13:31         ` Zoltan Boszormenyi
2021-08-23 13:35           ` Bruce Ashfield
     [not found]   ` <169DF0BA24F74A88.27647@lists.openembedded.org>
2021-08-23 12:56     ` Bruce Ashfield
2021-08-23 12:23 ` [PATCH 4/6] kernel.bbclass: Adapt to KERNEL_SPLIT_MODULES != "1" case Zoltan Boszormenyi
2021-08-23 12:23 ` [PATCH 5/6] kernel.bbclass: Use full versions for inter-package dependencies Zoltan Boszormenyi
2021-08-23 13:03   ` [OE-core] " Bruce Ashfield
2021-08-23 13:29     ` Zoltan Boszormenyi
2021-08-23 13:38       ` Bruce Ashfield
2021-08-23 13:48         ` Zoltan Boszormenyi
2021-08-23 12:23 ` [PATCH 6/6] Support zstd-compressed squashfs and cpio initramfs Zoltan Boszormenyi
2021-08-23 14:47 ` Kernel related bbclass changes Zoltan Boszormenyi
2021-08-23 14:47   ` [PATCH v2 1/4] kernel-module-split.bbclass: Support zstd-compressed modules Zoltan Boszormenyi
2021-08-23 14:47   ` [PATCH v2 2/4] Allow opt-out of split kernel modules Zoltan Boszormenyi
2021-08-23 14:47   ` [PATCH v2 3/4] kernel.bbclass: Use full versions for inter-package dependencies Zoltan Boszormenyi
2021-08-23 14:47   ` [PATCH v2 4/4] Support zstd-compressed squashfs and cpio initramfs Zoltan Boszormenyi
2021-08-23 14:54   ` Kernel related bbclass changes Zoltan Boszormenyi
2021-08-27  7:37     ` Kernel and image " Zoltan Boszormenyi
2021-08-27  7:37       ` [PATCH v4 1/4] kernel-module-split.bbclass: Support zstd-compressed modules Zoltan Boszormenyi
2021-08-27  7:37       ` [PATCH v4 2/4] Allow opt-out of split kernel modules Zoltan Boszormenyi
2021-08-27  7:37       ` [PATCH v4 3/4] kernel.bbclass: Use full versions for inter-package dependencies Zoltan Boszormenyi
2021-08-30  9:30         ` [OE-core] " Andrey Zhizhikin
2021-08-30 10:06           ` Zoltan Boszormenyi
     [not found]           ` <b75df7be-03d8-e454-60b8-1651fc935ca5@gmail.com>
2021-08-30 10:25             ` Andrey Zhizhikin
2021-08-30 19:51               ` Jon Mason
2021-08-31  4:28                 ` Zoltan Boszormenyi
2021-08-31 13:32                   ` Richard Purdie
2021-08-31 13:54                     ` Andrey Zhizhikin
2021-08-27  7:37       ` [PATCH v4 4/4] Support zstd-compressed squashfs and cpio initramfs Zoltan Boszormenyi
2021-08-23 14:54 ` [PATCH v3 1/4] kernel-module-split.bbclass: Support zstd-compressed modules Zoltan Boszormenyi
2021-08-23 14:54 ` [PATCH v3 2/4] Allow opt-out of split kernel modules Zoltan Boszormenyi
2021-08-23 14:54 ` [PATCH v3 3/4] kernel.bbclass: Use full versions for inter-package dependencies Zoltan Boszormenyi
2021-08-23 14:54 ` [PATCH v3 4/4] Support zstd-compressed squashfs and cpio initramfs Zoltan Boszormenyi
2021-08-26 12:04   ` [OE-core] " Richard Purdie
2021-08-27  7:24     ` Zoltan Boszormenyi

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=d780f47b-38a7-a44e-d8a1-3d6dd0a286c5@pr.hu \
    --to=zboszor@pr.hu \
    --cc=bruce.ashfield@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=zboszor@gmail.com \
    /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