Re: [poky] [PATCH 2/3] kernel-yocto.bbclass: support modular kernel configs

Bruce Ashfield <[email protected]>
Newsgroups org.yoctoproject.lists.poky,org.openembedded.lists.openembedded-core
Message-ID <CADkTA4MUkWtgpj=FG2rGN+kHQqkGLWjLPMDiyBi3TUct+Th4EQ@mail.gmail.com>
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
<[email protected]> 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 <[email protected]>
> ---
>  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: [email protected]
> Unsubscribe: https://lists.yoctoproject.org/g/poky/unsub [
> [email protected]]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>

-- 
- Thou shalt not follow the NULL pointer, for chaos and madness await thee
at its end
- "Use the force Harry" - Gandalf, Star Trek II
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.