Skip to contentSkip to conversation

xen-guest-image-minimal: fix making PCI a x86-only dependency

PATCH New [email protected] 1 participant 1 message Oct 2, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xen-guest-image-minimal: fix making PCI a x86-only dependency

From: Christopher Clark <[email protected]>

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.

---

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(-)
recipes-extended/images/xen-image-minimal.bb +4 -4
index a01976e..827cc87 100644
@@ -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"
 
Signature · 1 line
2.7.4