[yocto] Setting preferred version of kernel for feature support

Ash Charles ashcharles at gmail.com
Tue Jun 17 08:56:02 PDT 2014


Hi,

I have two kernels for my device: one is current mainline kernel and
one is an older kernel that supports magic proprietary hardware
acceleration blobs.  Some developers want the modern kernel, others
need the hardware acceleration which means they need the older kernel
plus a bunch of out-of-tree kernel modules and some additional
packages included in their image.  What is the best way to give users
of the meta layer for this device an easy switch?

I came up with three basic ways to do this:
1. Create an image recipe or packagegroup.  In this recipe, set the
PREFERRED_VERSION_<kernel>, add RDEPENDS on the out-of-tree kernel
modules and pull in any extra recipes to the build.

2. Describe the dependency information; the user can just choose to
include one top-level package or not.  The userspace packages depend
on the out-of-tree modules which would set the preferred version of
the kernel.  Is setting the preferred version of something as major as
the kernel in a random recipe okay?

3. Add a USE_HW_ACCEL type parameter to the machine configuration or
add a feature to MACHINE_FEATURES and select the packages and versions
based on this.  Is there any problems adding new features to
MACHINE_FEATURES?  Does this break the package feeds?

Any suggestions on the best way to achieve this goal or any
compare-contrast between the methods would be most appreciated.

--Ash



More information about the yocto mailing list