Yocto Project Documentation
 help / color / mirror / Atom feed
From: "Antonin Godard" <antonin.godard@bootlin.com>
To: <dixitparmar19@gmail.com>, <docs@lists.yoctoproject.org>
Subject: Re: [docs] [PATCH v2] ref-manual: document KERNEL_SPLIT_MODULES variable
Date: Tue, 10 Jun 2025 11:20:05 +0200	[thread overview]
Message-ID: <DAIQQ2J2C0BT.2USP6INDRV4P6@bootlin.com> (raw)
In-Reply-To: <DAIQ7EZLUNIR.1PRHTL84VV2XG@bootlin.com>

On Tue Jun 10, 2025 at 10:55 AM CEST, Antonin Godard wrote:
> On Sun Jun 8, 2025 at 12:44 PM CEST, Dixit Parmar via lists.yoctoproject.org wrote:
>> This variable controls the kernel module spliting.
>>
>> Signed-off-by: Dixit Parmar <dixitparmar19@gmail.com>
>> ---
>>  documentation/ref-manual/variables.rst | 14 ++++++++++++++
>>  1 file changed, 14 insertions(+)
>>
>> diff --git a/documentation/ref-manual/variables.rst b/documentation/ref-manual/variables.rst
>> index 9768d8f5b..b7dde2604 100644
>> --- a/documentation/ref-manual/variables.rst
>> +++ b/documentation/ref-manual/variables.rst
>> @@ -5359,6 +5359,20 @@ system and gives an overview of their function and contents.
>>        the :term:`KERNEL_PATH` variable. Both variables are common variables
>>        used by external Makefiles to point to the kernel source directory.
>>  
>> +   :term:`KERNEL_SPLIT_MODULES`
>> +      When inheriting the :ref:`ref-classes-kernel-module-split` class, this
>> +      variable controls whether kernel modules are split into separate packages
>> +      or bundled into a single package.
>> +
>> +      For some use cases, a monolithic kernel module package
>> +      :ref:`KERNEL_PACKAGE_NAME` (by default named ``kernel``) that contains
>
> This should be :term:`KERNEL_PACKAGE_NAME` (not :ref:). Otherwise fails to
> build.
>
>> +      all modules built from the kernel sources may be preferred. Because a
>> +      monolithic package can reduce download time and speed up installation.
>
> I think this can be simplified by "...may be preferred to speed up
> installation". "Download time" is too context specific, probably related to
> package management on the target.
>
>> +
>> +      By default, this variable is set to ``1``, resulting in one package per
>> +      module. Setting it to any other value will generate a single monolithic
>> +      package containing all kernel modules.
>> +
>>     :term:`KERNEL_SRC`
>>        The location of the kernel sources. This variable is set to the value
>>        of the :term:`STAGING_KERNEL_DIR` within the :ref:`ref-classes-module`

Not sure about the "kernel" package name. After building with
KERNEL_SPLIT_MODULES to 0:

$ bitbake-getvar KERNEL_PACKAGE_NAME -r virtual/kernel
#
# $KERNEL_PACKAGE_NAME [2 operations]
#   set /build/../work/openembedded-core/meta/conf/documentation.conf:253
#     [doc] "Name prefix for kernel packages. Defaults to 'kernel'."
#   set /build/../work/openembedded-core/meta/classes-recipe/kernel.bbclass:11
#     [_defaultval] "kernel"
# pre-expansion value:
#   "kernel"
KERNEL_PACKAGE_NAME="kernel"

$ oe-pkgdata-util list-pkgs | grep kernel
kernel
kernel-base
kernel-dbg
kernel-dev
kernel-image
kernel-image-image
kernel-modules
kernel-vmlinux

$ oe-pkgdata-util list-pkg-files kernel-modules | head -7
kernel-modules:
        /lib/modules/6.12.30-yocto-standard/kernel/crypto/af_alg.ko
        /lib/modules/6.12.30-yocto-standard/kernel/crypto/algif_aead.ko
        /lib/modules/6.12.30-yocto-standard/kernel/crypto/algif_hash.ko
        /lib/modules/6.12.30-yocto-standard/kernel/crypto/algif_rng.ko
        /lib/modules/6.12.30-yocto-standard/kernel/crypto/algif_skcipher.ko
        /lib/modules/6.12.30-yocto-standard/kernel/crypto/blowfish_common.ko
        ...

So it seems to me that the name of the package is "kernel-modules", not
"kernel"?

Another side question: in my experience I never had to set KERNEL_SPLIT_MODULES
to be able to install *all* kernel modules. Whatever the value of
KERNEL_SPLIT_MODULES, installing the package "kernel-modules" would just install
the modules. So what is the difference after setting this variable?

Antonin

-- 
Antonin Godard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com



  reply	other threads:[~2025-06-10  9:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-08 10:44 [PATCH v2] ref-manual: document KERNEL_SPLIT_MODULES variable Dixit Parmar
2025-06-10  8:55 ` [docs] " Antonin Godard
2025-06-10  9:20   ` Antonin Godard [this message]
2025-06-18 12:14     ` Dixit Parmar
2025-06-18 12:59       ` [docs] " Antonin Godard
2025-06-18 13:19         ` Dixit Parmar
2025-06-18 13:42           ` [docs] " Antonin Godard
2025-06-21  6:48             ` Dixit Parmar
2025-07-01  8:37 ` Antonin Godard

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=DAIQQ2J2C0BT.2USP6INDRV4P6@bootlin.com \
    --to=antonin.godard@bootlin.com \
    --cc=dixitparmar19@gmail.com \
    --cc=docs@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