Skip to contentSkip to conversation

ref-manual: document KERNEL_SPLIT_MODULES variable

PATCH Superseded Dixit Parmar 3 participants 3 messages Jun 5, 2025 – Jun 6, 2025

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ref-manual: document KERNEL_SPLIT_MODULES variable

This variable controls the kernel module spliting.

---
 documentation/ref-manual/variables.rst | 9 +++++++++
 1 file changed, 9 insertions(+)
documentation/ref-manual/variables.rst +9 -0
index 9768d8f5b..2c23b6864 100644
@@ -5359,6 +5359,15 @@ 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`
+      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.
+      Default set to 1, one subpackage per module. Setting it to 0 will
+      generate a monolithic kernel-modules package containing all modules
+      built from the source.
+
    :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`
Signature · 1 line
2.43.0
#1 lore raw

Hi Dixit,

Thanks for the patch!

Please wait a bit (a day at least) between versions to let other people the time to review, otherwise it'll be difficult to keep up with what the latest version is and what we should review :)

On that topic, this is missing the version number (you typically add it with -v2 when using git-format-patch or git-send-email if I remember correctly).

Quoted 12 lines · Dixit Parmar via lists.yoctoproject.org

This variable controls the kernel module spliting.

---
  documentation/ref-manual/variables.rst | 9 +++++++++
  1 file changed, 9 insertions(+)
documentation/ref-manual/variables.rst +0 -0
index 9768d8f5b..2c23b6864 100644

documentation/ref-manual/variables.rst system and gives an overview of their function and contents. · line 5362

Quoted 4 lines
documentation/ref-manual/variables.rst +1 -0
@@ -5359,6 +5359,15 @@ 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`

This variable can only be used if inheriting kernel-module-split, so we should say that, we typically use this wording in the glossary:

When inheriting the :ref:ref-classes-kernel-module-split class,

documentation/ref-manual/variables.rst system and gives an overview of their function and contents. · line 5363

Quoted 1 line
documentation/ref-manual/variables.rst +1 -0
+      Allow opt-out of split kernel modules. For some use cases, a monolithic

I suggest to reword to

"""
Allows to skip splitting kernel modules into separate packages and instead have all in one big package. """

Or something along those lines.

documentation/ref-manual/variables.rst system and gives an overview of their function and contents. · line 5364

Quoted 1 line
documentation/ref-manual/variables.rst +1 -0
+      kernel-modules package containing all modules built from the kernel

It's not necessarily called kernel-modules as far as I could tell?

If it comes from the Linux kernel recipe, yes because KERNEL_PACKAGE_NAME is set to kernel by default.

But otherwise, for recipe for out-of-tree kernel modules, it will likely be something different.

documentation/ref-manual/variables.rst system and gives an overview of their function and contents. · line 5365

Quoted 1 line
documentation/ref-manual/variables.rst +1 -0
+      sources may be preferred. For one, download time is shorter and

What download time? I assume you're talking about this from the perspective of running the package manager from the target and not the fetch task in BitBake.

documentation/ref-manual/variables.rst system and gives an overview of their function and contents. · line 5367

Quoted 2 lines
documentation/ref-manual/variables.rst +2 -0
+      installation time is faster.
+      Default set to 1, one subpackage per module. Setting it to 0 will

s/subpackage/package/

Yes, setting to 0 will do that, but so will do any other value. So say that :), e.g.:

"""
Setting it to any other value will
"""

documentation/ref-manual/variables.rst system and gives an overview of their function and contents. · line 5368

Quoted 1 line
documentation/ref-manual/variables.rst +1 -0
+      generate a monolithic kernel-modules package containing all modules

Not necessarily called kernel-modules.

It's likely most often going to be the case so we can make a note/example specific to a kernel recipe and/or also for out-of-tree kernel module recipes.

Cheers,
Quentin

#2 lore raw
Quoted 11 lines · Quentin Schulz via lists.yoctoproject.org

Hi Dixit,

Thanks for the patch!

Please wait a bit (a day at least) between versions to let other people the time to review, otherwise it'll be difficult to keep up with what the latest version is and what we should review :)

On that topic, this is missing the version number (you typically add it with -v2 when using git-format-patch or git-send-email if I remember correctly).

Also, you can read https://docs.yoctoproject.org/contributor-guide/submit-changes.html
which goes over the process of contributing patches.

Thanks,
Antonin

Signature · 3 lines
Antonin Godard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com