* [PATCH 1/3] kern-tools-native: update to support modular kernel builds
@ 2025-04-23 8:02 Mikko Rapeli
2025-04-23 8:02 ` [PATCH 2/3] kernel-yocto.bbclass: support modular kernel configs Mikko Rapeli
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Mikko Rapeli @ 2025-04-23 8:02 UTC (permalink / raw)
To: openembedded-core; +Cc: poky, Mikko Rapeli
After this update scc tool can compile options as modules
conditionally without duplicating config fragments when
the options contain a comment like:
CONFIG_LEDS_GPIO=y # OVERRIDE:$MODULE_OR_Y
Then "scc -DMODULE_OR_Y=m" converts these into
CONFIG_LEDS_GPIO=m
Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org>
---
meta/recipes-kernel/kern-tools/kern-tools-native_git.bb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb b/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
index 6dd19f1f09..20b1bcaf37 100644
--- a/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
+++ b/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
@@ -11,7 +11,7 @@ LIC_FILES_CHKSUM = "\
DEPENDS += "git-replacement-native"
-SRCREV = "c8c1f17867d0cc7d04be225ba4901f2373428be2"
+SRCREV = "fe67c98d2e9b74af44d0c4b660fa18e3a95e7edd"
PV = "0.3+git"
inherit native
--
2.43.0
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH 2/3] kernel-yocto.bbclass: support modular kernel configs 2025-04-23 8:02 [PATCH 1/3] kern-tools-native: update to support modular kernel builds Mikko Rapeli @ 2025-04-23 8:02 ` Mikko Rapeli 2025-04-23 12:30 ` [poky] " Bruce Ashfield 2025-04-23 8:02 ` [PATCH 3/3] linux-yocto: build modular kernel on genericarm64 Mikko Rapeli 2025-04-23 12:31 ` [poky] [PATCH 1/3] kern-tools-native: update to support modular kernel builds Bruce Ashfield 2 siblings, 1 reply; 7+ messages in thread From: Mikko Rapeli @ 2025-04-23 8:02 UTC (permalink / raw) To: openembedded-core; +Cc: poky, Mikko Rapeli Compile many kernel drivers as modules when recipe sets MODULAR_KERNEL = "true" This likely requires support for initramfs which includes kernel modules needed to mount the rootfs. SCC_OPTS can be used to add arguments to scc kernel config generation call. Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> --- meta/classes-recipe/kernel-yocto.bbclass | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/meta/classes-recipe/kernel-yocto.bbclass b/meta/classes-recipe/kernel-yocto.bbclass index cef6b9ec3f..f98720bcec 100644 --- a/meta/classes-recipe/kernel-yocto.bbclass +++ b/meta/classes-recipe/kernel-yocto.bbclass @@ -26,6 +26,12 @@ KCONF_BSP_AUDIT_LEVEL ?= "0" KMETA_AUDIT ?= "yes" KMETA_AUDIT_WERROR ?= "" +# most drivers as built in (default), or as modules +MODULAR_KERNEL = "false" + +# options to scc +SCC_OPTS ?= "${@bb.utils.contains('MODULAR_KERNEL', 'true', '-DMODULE_OR_Y=m', '', d)}" + # returns local (absolute) path names for all valid patches in the # src_uri def find_patches(d,subdir): @@ -298,7 +304,7 @@ do_kernel_metadata() { elements="`echo -n ${bsp_definition} $sccs_defconfig ${sccs} ${patches} $KERNEL_FEATURES_FINAL`" if [ -n "${elements}" ]; then echo "${bsp_definition}" > ${S}/${meta_dir}/bsp_definition - scc --force -o ${S}/${meta_dir}:cfg,merge,meta ${includes} $sccs_defconfig $bsp_definition $sccs $patches $KERNEL_FEATURES_FINAL + scc ${SCC_OPTS} --force -o ${S}/${meta_dir}:cfg,merge,meta ${includes} $sccs_defconfig $bsp_definition $sccs $patches $KERNEL_FEATURES_FINAL if [ $? -ne 0 ]; then bbfatal_log "Could not generate configuration queue for ${KMACHINE}." fi -- 2.43.0 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [poky] [PATCH 2/3] kernel-yocto.bbclass: support modular kernel configs 2025-04-23 8:02 ` [PATCH 2/3] kernel-yocto.bbclass: support modular kernel configs Mikko Rapeli @ 2025-04-23 12:30 ` Bruce Ashfield 2025-04-23 12:40 ` Mikko Rapeli 0 siblings, 1 reply; 7+ messages in thread From: Bruce Ashfield @ 2025-04-23 12:30 UTC (permalink / raw) To: mikko.rapeli; +Cc: openembedded-core, poky [-- Attachment #1: Type: text/plain, Size: 2823 bytes --] I already have patches for this, and they have not been sent on purpose. Please do not apply this patch, consider this a nack. Bruce On Wed, Apr 23, 2025 at 4:03 AM Mikko Rapeli via lists.yoctoproject.org <mikko.rapeli=linaro.org@lists.yoctoproject.org> wrote: > Compile many kernel drivers as modules when recipe sets > > MODULAR_KERNEL = "true" > > This likely requires support for initramfs which includes > kernel modules needed to mount the rootfs. > > SCC_OPTS can be used to add arguments to scc kernel config > generation call. > > Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> > --- > meta/classes-recipe/kernel-yocto.bbclass | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > > diff --git a/meta/classes-recipe/kernel-yocto.bbclass > b/meta/classes-recipe/kernel-yocto.bbclass > index cef6b9ec3f..f98720bcec 100644 > --- a/meta/classes-recipe/kernel-yocto.bbclass > +++ b/meta/classes-recipe/kernel-yocto.bbclass > @@ -26,6 +26,12 @@ KCONF_BSP_AUDIT_LEVEL ?= "0" > KMETA_AUDIT ?= "yes" > KMETA_AUDIT_WERROR ?= "" > > +# most drivers as built in (default), or as modules > +MODULAR_KERNEL = "false" > + > +# options to scc > +SCC_OPTS ?= "${@bb.utils.contains('MODULAR_KERNEL', 'true', > '-DMODULE_OR_Y=m', '', d)}" > + > # returns local (absolute) path names for all valid patches in the > # src_uri > def find_patches(d,subdir): > @@ -298,7 +304,7 @@ do_kernel_metadata() { > elements="`echo -n ${bsp_definition} $sccs_defconfig > ${sccs} ${patches} $KERNEL_FEATURES_FINAL`" > if [ -n "${elements}" ]; then > echo "${bsp_definition}" > > ${S}/${meta_dir}/bsp_definition > - scc --force -o ${S}/${meta_dir}:cfg,merge,meta > ${includes} $sccs_defconfig $bsp_definition $sccs $patches > $KERNEL_FEATURES_FINAL > + scc ${SCC_OPTS} --force -o > ${S}/${meta_dir}:cfg,merge,meta ${includes} $sccs_defconfig $bsp_definition > $sccs $patches $KERNEL_FEATURES_FINAL > if [ $? -ne 0 ]; then > bbfatal_log "Could not generate > configuration queue for ${KMACHINE}." > fi > -- > 2.43.0 > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#13599): > https://lists.yoctoproject.org/g/poky/message/13599 > Mute This Topic: https://lists.yoctoproject.org/mt/112410521/1050810 > Group Owner: poky+owner@lists.yoctoproject.org > Unsubscribe: https://lists.yoctoproject.org/g/poky/unsub [ > bruce.ashfield@gmail.com] > -=-=-=-=-=-=-=-=-=-=-=- > > -- - Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end - "Use the force Harry" - Gandalf, Star Trek II [-- Attachment #2: Type: text/html, Size: 4435 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [poky] [PATCH 2/3] kernel-yocto.bbclass: support modular kernel configs 2025-04-23 12:30 ` [poky] " Bruce Ashfield @ 2025-04-23 12:40 ` Mikko Rapeli 0 siblings, 0 replies; 7+ messages in thread From: Mikko Rapeli @ 2025-04-23 12:40 UTC (permalink / raw) To: Bruce Ashfield; +Cc: openembedded-core, poky Hi, On Wed, Apr 23, 2025 at 08:30:50AM -0400, Bruce Ashfield wrote: > I already have patches for this, and they have not been sent on purpose. > > Please do not apply this patch, consider this a nack. Ok, no worries. If you have the draft patches somewhere I can try them out on genericarm64 builds and test on a few devices, if that helps. genericarm64 core-image-initramfs-boot is exceeding size limits currently so I wanted to publish what I had already: https://bugzilla.yoctoproject.org/show_bug.cgi?id=15833 Cheers, -Mikko ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 3/3] linux-yocto: build modular kernel on genericarm64 2025-04-23 8:02 [PATCH 1/3] kern-tools-native: update to support modular kernel builds Mikko Rapeli 2025-04-23 8:02 ` [PATCH 2/3] kernel-yocto.bbclass: support modular kernel configs Mikko Rapeli @ 2025-04-23 8:02 ` Mikko Rapeli 2025-04-23 12:31 ` [OE-core] " Bruce Ashfield 2025-04-23 12:31 ` [poky] [PATCH 1/3] kern-tools-native: update to support modular kernel builds Bruce Ashfield 2 siblings, 1 reply; 7+ messages in thread From: Mikko Rapeli @ 2025-04-23 8:02 UTC (permalink / raw) To: openembedded-core; +Cc: poky, Mikko Rapeli genericarm64 inteds to support many devices which are not even know at compile time and uses initramfs by default. Thus many drivers can be build as modules to reduce kernel binary size and boot time. Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> --- meta-yocto-bsp/recipes-kernel/linux/linux-yocto_6.12.bbappend | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_6.12.bbappend b/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_6.12.bbappend index 831cb556be..cda7fef449 100644 --- a/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_6.12.bbappend +++ b/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_6.12.bbappend @@ -9,3 +9,5 @@ KMACHINE:genericx86-64 ?= "common-pc-64" FILESEXTRAPATHS:prepend:genericarm64 := "${THISDIR}/files:" SRC_URI:append:genericarm64 = " file://0001-Revert-serial-8250_omap-Drop-pm_runtime_irq_safe.patch" + +MODULAR_KERNEL:genericarm64 = "true" -- 2.43.0 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [OE-core] [PATCH 3/3] linux-yocto: build modular kernel on genericarm64 2025-04-23 8:02 ` [PATCH 3/3] linux-yocto: build modular kernel on genericarm64 Mikko Rapeli @ 2025-04-23 12:31 ` Bruce Ashfield 0 siblings, 0 replies; 7+ messages in thread From: Bruce Ashfield @ 2025-04-23 12:31 UTC (permalink / raw) To: mikko.rapeli; +Cc: openembedded-core, poky [-- Attachment #1: Type: text/plain, Size: 1851 bytes --] This is not the variable we'll be using for this, so again, do not apply this patch. Bruce On Wed, Apr 23, 2025 at 4:03 AM Mikko Rapeli via lists.openembedded.org <mikko.rapeli=linaro.org@lists.openembedded.org> wrote: > genericarm64 inteds to support many devices which are not even > know at compile time and uses initramfs by default. Thus many > drivers can be build as modules to reduce kernel binary size > and boot time. > > Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> > --- > meta-yocto-bsp/recipes-kernel/linux/linux-yocto_6.12.bbappend | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_6.12.bbappend > b/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_6.12.bbappend > index 831cb556be..cda7fef449 100644 > --- a/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_6.12.bbappend > +++ b/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_6.12.bbappend > @@ -9,3 +9,5 @@ KMACHINE:genericx86-64 ?= "common-pc-64" > > FILESEXTRAPATHS:prepend:genericarm64 := "${THISDIR}/files:" > SRC_URI:append:genericarm64 = " > file://0001-Revert-serial-8250_omap-Drop-pm_runtime_irq_safe.patch" > + > +MODULAR_KERNEL:genericarm64 = "true" > -- > 2.43.0 > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#215266): > https://lists.openembedded.org/g/openembedded-core/message/215266 > Mute This Topic: https://lists.openembedded.org/mt/112410523/1050810 > Group Owner: openembedded-core+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ > bruce.ashfield@gmail.com] > -=-=-=-=-=-=-=-=-=-=-=- > > -- - Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end - "Use the force Harry" - Gandalf, Star Trek II [-- Attachment #2: Type: text/html, Size: 3158 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [poky] [PATCH 1/3] kern-tools-native: update to support modular kernel builds 2025-04-23 8:02 [PATCH 1/3] kern-tools-native: update to support modular kernel builds Mikko Rapeli 2025-04-23 8:02 ` [PATCH 2/3] kernel-yocto.bbclass: support modular kernel configs Mikko Rapeli 2025-04-23 8:02 ` [PATCH 3/3] linux-yocto: build modular kernel on genericarm64 Mikko Rapeli @ 2025-04-23 12:31 ` Bruce Ashfield 2 siblings, 0 replies; 7+ messages in thread From: Bruce Ashfield @ 2025-04-23 12:31 UTC (permalink / raw) To: mikko.rapeli; +Cc: openembedded-core, poky [-- Attachment #1: Type: text/plain, Size: 1868 bytes --] Do not apply this patch. I have queued updates for this support, and again, they have not been sent on purpose. nack. Bruce On Wed, Apr 23, 2025 at 4:03 AM Mikko Rapeli via lists.yoctoproject.org <mikko.rapeli=linaro.org@lists.yoctoproject.org> wrote: > After this update scc tool can compile options as modules > conditionally without duplicating config fragments when > the options contain a comment like: > > CONFIG_LEDS_GPIO=y # OVERRIDE:$MODULE_OR_Y > > Then "scc -DMODULE_OR_Y=m" converts these into > > CONFIG_LEDS_GPIO=m > > Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> > --- > meta/recipes-kernel/kern-tools/kern-tools-native_git.bb | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb > b/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb > index 6dd19f1f09..20b1bcaf37 100644 > --- a/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb > +++ b/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb > @@ -11,7 +11,7 @@ LIC_FILES_CHKSUM = "\ > > DEPENDS += "git-replacement-native" > > -SRCREV = "c8c1f17867d0cc7d04be225ba4901f2373428be2" > +SRCREV = "fe67c98d2e9b74af44d0c4b660fa18e3a95e7edd" > PV = "0.3+git" > > inherit native > -- > 2.43.0 > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#13598): > https://lists.yoctoproject.org/g/poky/message/13598 > Mute This Topic: https://lists.yoctoproject.org/mt/112396089/1050810 > Group Owner: poky+owner@lists.yoctoproject.org > Unsubscribe: https://lists.yoctoproject.org/g/poky/unsub [ > bruce.ashfield@gmail.com] > -=-=-=-=-=-=-=-=-=-=-=- > > -- - Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end - "Use the force Harry" - Gandalf, Star Trek II [-- Attachment #2: Type: text/html, Size: 3793 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2025-04-23 12:41 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2025-04-23 8:02 [PATCH 1/3] kern-tools-native: update to support modular kernel builds Mikko Rapeli 2025-04-23 8:02 ` [PATCH 2/3] kernel-yocto.bbclass: support modular kernel configs Mikko Rapeli 2025-04-23 12:30 ` [poky] " Bruce Ashfield 2025-04-23 12:40 ` Mikko Rapeli 2025-04-23 8:02 ` [PATCH 3/3] linux-yocto: build modular kernel on genericarm64 Mikko Rapeli 2025-04-23 12:31 ` [OE-core] " Bruce Ashfield 2025-04-23 12:31 ` [poky] [PATCH 1/3] kern-tools-native: update to support modular kernel builds Bruce Ashfield
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox