diff options
author | Bruce Ashfield <bruce.ashfield@gmail.com> | 2020-02-26 08:53:04 -0500 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2020-02-26 08:53:51 -0500 |
commit | f2f36a8061c600b35b5f0ce1599d59f1d144a3aa (patch) | |
tree | c1bfc052dce7b007235dc2e75fb72e7f6c929375 | |
parent | 324696b9a9d1df591b1a2501bc1825fddefb80c5 (diff) | |
download | meta-virtualization-f2f36a8061c600b35b5f0ce1599d59f1d144a3aa.tar.gz |
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>
-rw-r--r-- | recipes-kernel/linux/linux-%.bbappend | 10 | ||||
-rw-r--r-- | recipes-kernel/linux/linux-yocto-rt_%.bbappend | 1 | ||||
-rw-r--r-- | recipes-kernel/linux/linux-yocto_5.2.bbappend | 1 | ||||
-rw-r--r-- | recipes-kernel/linux/linux-yocto_5.2_virtualization.inc | 4 | ||||
-rw-r--r-- | recipes-kernel/linux/linux-yocto_5.4.bbappend | 1 | ||||
-rw-r--r-- | recipes-kernel/linux/linux-yocto_5.4_virtualization.inc | 4 |
6 files changed, 18 insertions, 3 deletions
diff --git a/recipes-kernel/linux/linux-%.bbappend b/recipes-kernel/linux/linux-%.bbappend new file mode 100644 index 00000000..2a2335bc --- /dev/null +++ b/recipes-kernel/linux/linux-%.bbappend | |||
@@ -0,0 +1,10 @@ | |||
1 | # any kernel recipe with fragment support, that sets LINUX_VERSION to one of the tested | ||
2 | # values, will get the appropriate fragments included in their SRC_URI | ||
3 | |||
4 | LINUX_MAJOR = "${@(d.getVar('LINUX_VERSION') or "x.y").split('.')[0]}" | ||
5 | LINUX_MINOR = "${@(d.getVar('LINUX_VERSION') or "x.y").split('.')[1]}" | ||
6 | |||
7 | include ${@bb.utils.contains('DISTRO_FEATURES', 'virtualization', 'linux-yocto_${LINUX_MAJOR}.${LINUX_MINOR}_virtualization.inc', '', d)} | ||
8 | |||
9 | |||
10 | |||
diff --git a/recipes-kernel/linux/linux-yocto-rt_%.bbappend b/recipes-kernel/linux/linux-yocto-rt_%.bbappend deleted file mode 100644 index 20eeba95..00000000 --- a/recipes-kernel/linux/linux-yocto-rt_%.bbappend +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | require ${@bb.utils.contains('DISTRO_FEATURES', 'virtualization', 'linux-yocto_virtualization.inc', '', d)} | ||
diff --git a/recipes-kernel/linux/linux-yocto_5.2.bbappend b/recipes-kernel/linux/linux-yocto_5.2.bbappend deleted file mode 100644 index 617caccb..00000000 --- a/recipes-kernel/linux/linux-yocto_5.2.bbappend +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | require ${@bb.utils.contains('DISTRO_FEATURES', 'virtualization', '${BPN}_virtualization.inc', '', d)} | ||
diff --git a/recipes-kernel/linux/linux-yocto_5.2_virtualization.inc b/recipes-kernel/linux/linux-yocto_5.2_virtualization.inc new file mode 100644 index 00000000..59311487 --- /dev/null +++ b/recipes-kernel/linux/linux-yocto_5.2_virtualization.inc | |||
@@ -0,0 +1,4 @@ | |||
1 | # include the baseline meta virtualization configuration options | ||
2 | # after this include, we can do version specific things | ||
3 | |||
4 | include linux-yocto_virtualization.inc | ||
diff --git a/recipes-kernel/linux/linux-yocto_5.4.bbappend b/recipes-kernel/linux/linux-yocto_5.4.bbappend deleted file mode 100644 index 617caccb..00000000 --- a/recipes-kernel/linux/linux-yocto_5.4.bbappend +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | require ${@bb.utils.contains('DISTRO_FEATURES', 'virtualization', '${BPN}_virtualization.inc', '', d)} | ||
diff --git a/recipes-kernel/linux/linux-yocto_5.4_virtualization.inc b/recipes-kernel/linux/linux-yocto_5.4_virtualization.inc new file mode 100644 index 00000000..59311487 --- /dev/null +++ b/recipes-kernel/linux/linux-yocto_5.4_virtualization.inc | |||
@@ -0,0 +1,4 @@ | |||
1 | # include the baseline meta virtualization configuration options | ||
2 | # after this include, we can do version specific things | ||
3 | |||
4 | include linux-yocto_virtualization.inc | ||