Skip to contentSkip to conversation

Excluding kernel configuration fragment

DISCUSSION Fred Baksik 2 participants 4 messages Mar 17, 2020 – Mar 19, 2020 3 messages not in the archive

lore
Share & tools
lore
#0 lore raw

What is the best way of excluding a kernel configuration fragment?

I am trying to disable sound support in the kernel.  I can create a fragment for this but then this conflicts with the other existing fragments. For example when using meta-intel and removing sound support then you will receive warnings like:

WARNING: linux-intel-4.19.73+gitAUTOINC+a7cb57afb9_ca05e9cd64-r0 do_kernel_configcheck: [kernel config]: specified values did not make it into the kernel's final configuration:

---------- CONFIG_USB_AUDIO -----------------
Config: CONFIG_USB_AUDIO
From: /.../build_corei7-64/tmp/work-shared/intel-corei7-64/kernel-source/.kernel-meta/configs/v4.19/standard/intel/features/usb/usb-gadgets.cfg Requested value:  CONFIG_USB_AUDIO=m
Actual value:

I haven't had much luck with the documentation finding how to prune machine features and fragments; I may just misunderstand how this is supposed to be done.

#1 lore raw
Quoted 6 lines · Fred Baksik

What is the best way of excluding a kernel configuration fragment?

I am trying to disable sound support in the kernel. I can create a fragment for this but then this conflicts with the other existing fragments. For example when using meta-intel and removing sound support then you will receive warnings like:

Quoted 7 lines

WARNING: linux-intel-4.19.73+gitAUTOINC+a7cb57afb9_ca05e9cd64-r0 do_kernel_configcheck: [kernel config]: specified values did not make it into the kernel's final configuration:

---------- CONFIG_USB_AUDIO -----------------
Config: CONFIG_USB_AUDIO
From: /.../build_corei7-64/tmp/work-shared/intel-corei7-64/kernel-source/.kernel-meta/configs/v4.19/standard/intel/features/usb/usb-gadgets.cfg Requested value: CONFIG_USB_AUDIO=m
Actual value:

That fragment is part of the BSP definition, and has been defined as "hardware dependent", which is why you get the warning when you disable it.

What you are doing, is the right way to do things, unless you modify the source fragment directly.

There is a way to silence the warning, but declaring it as "non hardware", aka optional.

Can you send me the exact layers/branches you are using, and I'll confirm the right thing to do with a local build. This isn't commonly done, and I'm worried it may have bitrotted and don't want to waste your time. I'll write regression test for the functionality at the same time, so it will be doubly useful for me.

Bruce

Quoted 2 lines

I haven't had much luck with the documentation finding how to prune machine features and fragments; I may just misunderstand how this is supposed to be done.

Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): CADkTA4O8v2HVqsMkCGkd72swXUZWCoJi4fvsyB0sGdRRTTcuQw@mail.gmail.com

A message that is not in the archive (sent off-list or not yet received): CADkTA4Mp5Z45cFhmG5-f+TAq36XgfBVDqfmw7LbgGjY-wNWxxA@mail.gmail.com

#5 lore raw

Re: Private: Re: [yocto] Excluding kernel configuration fragment

Hello,

I doesn't look like these last few emails made it to the mailing list.
I don't mind creating my own BSP but I thought it might be easier to tweak an existing one.

Thanks for your help.

Quoted 50 lines · Bruce Ashfield

Hi Fred,

So I dug into this today, and as I suspected, there's currently not a great way to inhibit the warning easily (it's broken).

I'm going to re-work some things and fix this in master .. it's interesting that no one else has asked about this until now.

If you don't want to define your own BSP, my suggestion is to just inhibit the warning with the KCONF_AUDIT_LEVEL and KCONF_BSP_AUDIT_LEVEL variables. You know what you are doing with those warnings, so they can be safely masked.

Bruce

Quoted 32 lines · Bruce Ashfield

Thanks Fred,

Let me fire up a build with this tomorrow and I'll follow up with the best thing to do.

Bruce

Quoted 23 lines · Fred Baksik

What you are doing, is the right way to do things, unless you modify the source fragment directly.

I used 'bitbake linux-intel -c menuconfig' and 'bitbake linux-intel -c diffconfig'. This generated a fragment that contained the single line:

# CONFIG_SOUND is not set

I added this fragment to my "recipes-kernel/linux/linux-intel_%.bbappend".

Can you send me the exact layers/branches you are using, and I'll confirm the right thing to do with a local build.

I'm using warrior 2.7.3 and MACHINE=intel-corei7-64 poky
meta-intel
meta-openembedded

It was easy enough to remove items, like alsa, from DISTRO_FEATURES to remove the features I wouldn't need. I had wanted to remove the items, like audio support, from an existing machine instead of creating one from scratch.

Thanks,
Fred

#6 lore raw

Re: Private: Re: [yocto] Excluding kernel configuration fragment

Quoted 5 lines · Fred Baksik

Hello,

I doesn't look like these last few emails made it to the mailing list.
I don't mind creating my own BSP but I thought it might be easier to tweak an existing one.

I've fixed the bug now, and am implementing something easier for master, so in the future .. it will be easy to remove that sort of warning.

Cheers,

Bruce

Quoted 57 lines

Thanks for your help.

On Wed, Mar 18, 2020, at 6:06 PM, Bruce Ashfield wrote:

Hi Fred,

So I dug into this today, and as I suspected, there's currently not a great way to inhibit the warning easily (it's broken).

I'm going to re-work some things and fix this in master .. it's interesting that no one else has asked about this until now.

If you don't want to define your own BSP, my suggestion is to just inhibit the warning with the KCONF_AUDIT_LEVEL and KCONF_BSP_AUDIT_LEVEL variables. You know what you are doing with those warnings, so they can be safely masked.

Bruce

Quoted 32 lines · Bruce Ashfield

Thanks Fred,

Let me fire up a build with this tomorrow and I'll follow up with the best thing to do.

Bruce

Quoted 23 lines · Fred Baksik

What you are doing, is the right way to do things, unless you modify the source fragment directly.

I used 'bitbake linux-intel -c menuconfig' and 'bitbake linux-intel -c diffconfig'. This generated a fragment that contained the single line:

# CONFIG_SOUND is not set

I added this fragment to my "recipes-kernel/linux/linux-intel_%.bbappend".

Can you send me the exact layers/branches you are using, and I'll confirm the right thing to do with a local build.

I'm using warrior 2.7.3 and MACHINE=intel-corei7-64 poky
meta-intel
meta-openembedded

It was easy enough to remove items, like alsa, from DISTRO_FEATURES to remove the features I wouldn't need. I had wanted to remove the items, like audio support, from an existing machine instead of creating one from scratch.

Thanks,
Fred

Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II