[meta-virtualization] [PATCH] xen-guest-image-minimal: fix making PCI a x86-only dependency

christopher.w.clark at gmail.com christopher.w.clark at gmail.com
Mon Oct 2 12:47:36 PDT 2017


From: Christopher Clark <christopher.w.clark at gmail.com>

The logic for restricting the xen-pciback kernel module to x86-only
images was incorrect, resulting in the IMAGE_INSTALL_x86 and _x86-64
variables causing the IMAGE_INSTALL variable contents to be
overridden and incomplete.

This correction removes the specialized IMAGE_INSTALL_x86 and _x84-64
variables. The replacement logic causes a value with
conditionally-populated contents to be added to the IMAGE_INSTALL
variable.

Signed-off-by: Christopher Clark <christopher.clark6 at baesystems.com>
---

The symptom prior to this patch was that the xen-image-minimal build on
x86 would complete successfully, but would not include the expected
contents. This is because the IMAGE_INSTALL variable _only_ included
kernel-module-xen-pciback and was missing the other contents. The cause
was the specialized _x86 and _x86-64 variables overriding the
unspecialized IMAGE_INSTALL variable, rather than appending to it.


Please use my gmail address for any correspondence.

 recipes-extended/images/xen-image-minimal.bb | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/recipes-extended/images/xen-image-minimal.bb b/recipes-extended/images/xen-image-minimal.bb
index a01976e..827cc87 100644
--- a/recipes-extended/images/xen-image-minimal.bb
+++ b/recipes-extended/images/xen-image-minimal.bb
@@ -10,16 +10,16 @@ IMAGE_INSTALL += " \
     kernel-module-xen-gntalloc \
     kernel-module-xen-gntdev \
     kernel-module-xen-netback \
+    ${@bb.utils.contains('MACHINE_FEATURES', 'pci', "${XEN_PCIBACK_MODULE}", '', d)} \
     kernel-module-xen-wdt \
     xen-base \
     qemu \
     "
 
 # Linux kernel option CONFIG_XEN_PCIDEV_BACKEND depends on X86
-IMAGE_INSTALL_x86 += " \
-    ${@bb.utils.contains('MACHINE_FEATURES', 'pci', 'kernel-module-xen-pciback', '', d)}"
-IMAGE_INSTALL_x86-64 += " \
-    ${@bb.utils.contains('MACHINE_FEATURES', 'pci', 'kernel-module-xen-pciback', '', d)}"
+XEN_PCIBACK_MODULE = ""
+XEN_PCIBACK_MODULE_x86    = "kernel-module-xen-pciback"
+XEN_PCIBACK_MODULE_x86-64 = "kernel-module-xen-pciback"
 
 LICENSE = "MIT"
 
-- 
2.7.4



More information about the meta-virtualization mailing list