Bug 5574

Summary: Add kernel configuration check mechanism
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Paul Eggleton <bluelightning>
Component: coreAssignee: Unassigned <unassigned>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: Low CC: akuster, dmitriy.korovkin, dvhart, meta.mr.watcher, meta.watcher, otavio, paulg, randy.macleod, winfried_mb2
Version: 1.6   
Target Milestone: Future   
Hardware: All   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Yes (doc changes required)

Description Paul Eggleton 2013-11-20 11:56:41 UTC
Some recipes build software that needs a particular version of the kernel (or newer) or particular kernel configuration options enabled; good examples are systemd and udev. It would be nice if the build system could allow the recipe to specify these requirements and then we could check and report a sensible error if they are not satisfied; currently you can omit important options from the kernel configuration and the result will be a non-booting image, often with no clear indicator as to what went wrong.
Comment 1 Darren Hart 2013-11-21 15:50:06 UTC
Version testing is very seriously discouraged by folks like Greg KH, encouraging people instead to be testing for particular features. Can we do this via CONFIG_* testing instead?
Comment 2 Darren Hart 2013-11-21 15:51:06 UTC
This is especially important for things like LTSI kernels where features from future kernels can be backported and the version test would return false failures.
Comment 3 Winfried 2015-09-11 09:35:27 UTC
I think this is an important feature to have. 
I just spent two days trying to figure out why systemd didn't work properly. In the end it was a missing CONFIG_FHANDLE.
Comment 4 Paul Eggleton 2015-11-10 19:31:36 UTC
FWIW what Darren says above makes sense, we ought to be looking at the configuration not the version; I've modified the title to match.

Another important place we should be checking this just occurred to me today - IMAGE_FSTYPES; it's no good building a kernel with btrfs disabled at the same time as you build an image that you're going to use as your root filesystem and formatting it as btrfs. Hopefully we should be able to add a check for that using this same mechanism (or at least part of it).
Comment 5 Paul Eggleton 2016-09-14 23:50:53 UTC
Bruce was strongly against this when I proposed it as an RFC:

  https://patchwork.openembedded.org/patch/121933/

I'll re-evaluate what's been done in the recent kernel config handling changes during the 2.3 timeframe and work out how to proceed.
Comment 6 Armin Kuster 2017-10-12 23:30:17 UTC
some input.

The use case I have is for qa tests that are in the meta-qa layer. If I add the automount test for example, it has kernel config dependences for ext2/3/4 and more. It would be nice to have a "WARN" at compile time if the kernel configs this test needs are not set or provide a method to set them. I am aware of KERNEL_FEATURES_append but that seems to only work with yocto-kernel-cache, it would be nice to extend this beyond the yocto kernels. ( yes a separate discussion)
Comment 7 Randy MacLeod 2026-07-09 15:50:58 UTC
Dmitriy, A 'future' enhancement that you may be interested in later this year.