[OE-core] distro/machine:kernel feature mapping and version checking

Hart, Darren darren.hart at intel.com
Thu Nov 21 18:47:07 UTC 2013


All,

Regarding the following 2 bugs:

https://bugzilla.yoctoproject.org/show_bug.cgi?id=5574
Add kernel version / configuration check mechanism

and 

https://bugzilla.yoctoproject.org/show_bug.cgi?id=2267
Integrate DISTRO_FEATURES with KERNEL_FEATURES

There is a need to reduce errors where a DISTRO config might break due
to lack of kernel support, things such as systemd. There is also
interest in enabling certain kernel features based on
DISTRO/MACHINE_FEATURES, such as wifi.

Neither of these should depend on the Kernel Version as even with the
right version, if the CONFIG_* feature is missing, the image will not
work correctly. There is also the risk of false negatives when a feature
has been backported to a kernel version that didn't have the feature
previously.

The recommended approach would be to check for the required CONFIG_*
options after the linux-yocto configuration stage.

There is also the topic of DISTRO_FEATURES ~= "wifi" impacting how the
kernel will be built. The MACHINE should have some say in how this is
done - if the machine can never have wifi, building wifi into the kernel
doesn't make a lot of sense. Something like the following might make
sense:

for FEATURE in DISTRO_FEATURES:
    if MACHINE_FEATURES contains FEATURES:
        KERNEL_FEATURES += FEATURE_override

Where FEATURE_override is defined something like this:

FEATURE = FEATURE_default
if exists FEATURE_distro:
    FEATURE = FEATURE_distro
if exists FEATURE_machine:
    FEATURE = FEATURE_machine

This is effectively a fragment name which needs to be provided by the
linux-yocto kernel meta data as it will be kernel version dependent.

The linkage I'm not sure about is how to know what to test for in the
kernel.bbclass without intimate knowledge of the kernel version CONFIG
options in recipe space.

-- 
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel



More information about the Openembedded-core mailing list