kernel: allow fragment re-use from any aware kernel

The kernel fragments contained in this layer could not easily
be consumed by any fragment aware kernel not called "linux-yocto".

To make them easier to include, we make the bbappend more generic,
to match any linux*.bb recipe (note: this means it will match
things like linux-atm.bb as well).

To avoid adding the fragments to recipes that can't use them,
or to a version that hasn't been valided, we use the LINUX_VERSION
variable to pull out the major/minor kernel release and then
include a specific version of the .inc file.

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
This commit is contained in:
Bruce Ashfield 2020-02-26 08:53:04 -05:00
parent 324696b9a9
commit f2f36a8061
6 changed files with 18 additions and 3 deletions

View File

@ -0,0 +1,10 @@
# any kernel recipe with fragment support, that sets LINUX_VERSION to one of the tested
# values, will get the appropriate fragments included in their SRC_URI
LINUX_MAJOR = "${@(d.getVar('LINUX_VERSION') or "x.y").split('.')[0]}"
LINUX_MINOR = "${@(d.getVar('LINUX_VERSION') or "x.y").split('.')[1]}"
include ${@bb.utils.contains('DISTRO_FEATURES', 'virtualization', 'linux-yocto_${LINUX_MAJOR}.${LINUX_MINOR}_virtualization.inc', '', d)}

View File

@ -1 +0,0 @@
require ${@bb.utils.contains('DISTRO_FEATURES', 'virtualization', 'linux-yocto_virtualization.inc', '', d)}

View File

@ -1 +0,0 @@
require ${@bb.utils.contains('DISTRO_FEATURES', 'virtualization', '${BPN}_virtualization.inc', '', d)}

View File

@ -0,0 +1,4 @@
# include the baseline meta virtualization configuration options
# after this include, we can do version specific things
include linux-yocto_virtualization.inc

View File

@ -1 +0,0 @@
require ${@bb.utils.contains('DISTRO_FEATURES', 'virtualization', '${BPN}_virtualization.inc', '', d)}

View File

@ -0,0 +1,4 @@
# include the baseline meta virtualization configuration options
# after this include, we can do version specific things
include linux-yocto_virtualization.inc