Skip to contentSkip to conversation

pyro backports for Xen

PATCH Applied Doug Goldstein 2 participants 7 messages Oct 17, 2017

lore
Share & tools
lore
#0 lore raw

cover pyro backports for Xen

This backports are for the pyro branch to fix Xen issues identified.

Christopher Clark (5):
xen: Package libxendevicemodel, introduced in Xen 4.9
xen: Package .pc packageconfig files into dev packages
xen: remove STAGING_DIR_HOST from the runtime search path for bios.bin
xen: Add menuconfig task and enable menuconfig from devshell
xen: Replace 'inherit gettext' with explicit gettext-native dependency

 recipes-extended/xen/xen.inc | 118 +++++++++++++++++++++++++++++++++++++------
 1 file changed, 102 insertions(+), 16 deletions(-)
Signature · 1 line
2.13.5
#1 lore raw

PATCH 1/5 xen: Package libxendevicemodel, introduced in Xen 4.9

From: Christopher Clark <[email protected]>

(cherry picked from commit 4c32ef8ba1f74e32a5b7047fec19e58a099e923b)
---
 recipes-extended/xen/xen.inc | 5 +++++
 1 file changed, 5 insertions(+)
recipes-extended/xen/xen.inc +5 -0
index a28d474..677ab69 100644
@@ -178,6 +178,8 @@ PACKAGES = "\
     ${PN}-libxencall-dev \
     ${PN}-libxenctrl \
     ${PN}-libxenctrl-dev \
+    ${PN}-libxendevicemodel \
+    ${PN}-libxendevicemodel-dev \
     ${PN}-libxenevtchn \
     ${PN}-libxenevtchn-dev \
     ${PN}-libxenforeignmemory \
@@ -283,6 +285,9 @@ FILES_${PN}-libxencall-dev = "${libdir}/libxencall.so"
 FILES_${PN}-libxenctrl = "${libdir}/libxenctrl.so.*"
 FILES_${PN}-libxenctrl-dev = "${libdir}/libxenctrl.so"
 
+FILES_${PN}-libxendevicemodel = "${libdir}/libxendevicemodel.so.*"
+FILES_${PN}-libxendevicemodel-dev = "${libdir}/libxendevicemodel.so"
+
 FILES_${PN}-libxenevtchn = "${libdir}/libxenevtchn.so.*"
 FILES_${PN}-libxenevtchn-dev = "${libdir}/libxenevtchn.so"
 
Signature · 1 line
2.13.5
#2 lore raw

PATCH 2/5 xen: Package .pc packageconfig files into dev packages

In reply to Doug Goldstein

From: Christopher Clark <[email protected]>

(cherry picked from commit bd7cfb39bdf23560e0fbf9d121336e6464eb5b47)
---
 recipes-extended/xen/xen.inc | 75 +++++++++++++++++++++++++++++++++++---------
 1 file changed, 60 insertions(+), 15 deletions(-)
recipes-extended/xen/xen.inc +60 -15
index 677ab69..5242385 100644
@@ -277,28 +277,52 @@ FILES_${PN}-staticdev += "\
     "
 
 FILES_${PN}-libblktapctl = "${libdir}/libblktapctl.so.*"
-FILES_${PN}-libblktapctl-dev = "${libdir}/libblktapctl.so"
+FILES_${PN}-libblktapctl-dev = " \
+    ${libdir}/libblktapctl.so \
+    ${datadir}/pkgconfig/xenblktapctl.pc \
+    "
 
 FILES_${PN}-libxencall = "${libdir}/libxencall.so.*"
-FILES_${PN}-libxencall-dev = "${libdir}/libxencall.so"
+FILES_${PN}-libxencall-dev = " \
+    ${libdir}/libxencall.so \
+    ${datadir}/pkgconfig/xencall.pc \
+    "
 
 FILES_${PN}-libxenctrl = "${libdir}/libxenctrl.so.*"
-FILES_${PN}-libxenctrl-dev = "${libdir}/libxenctrl.so"
+FILES_${PN}-libxenctrl-dev = " \
+    ${libdir}/libxenctrl.so \
+    ${datadir}/pkgconfig/xencontrol.pc \
+    "
 
 FILES_${PN}-libxendevicemodel = "${libdir}/libxendevicemodel.so.*"
-FILES_${PN}-libxendevicemodel-dev = "${libdir}/libxendevicemodel.so"
+FILES_${PN}-libxendevicemodel-dev = " \
+    ${libdir}/libxendevicemodel.so \
+    ${datadir}/pkgconfig/xendevicemodel.pc \
+    "
 
 FILES_${PN}-libxenevtchn = "${libdir}/libxenevtchn.so.*"
-FILES_${PN}-libxenevtchn-dev = "${libdir}/libxenevtchn.so"
+FILES_${PN}-libxenevtchn-dev = " \
+    ${libdir}/libxenevtchn.so \
+    ${datadir}/pkgconfig/xenevtchn.pc \
+    "
 
 FILES_${PN}-libxenforeignmemory = "${libdir}/libxenforeignmemory.so.*"
-FILES_${PN}-libxenforeignmemory-dev = "${libdir}/libxenforeignmemory.so"
+FILES_${PN}-libxenforeignmemory-dev = " \
+    ${libdir}/libxenforeignmemory.so \
+    ${datadir}/pkgconfig/xenforeignmemory.pc \
+    "
 
 FILES_${PN}-libxengnttab = "${libdir}/libxengnttab.so.*"
-FILES_${PN}-libxengnttab-dev = "${libdir}/libxengnttab.so"
+FILES_${PN}-libxengnttab-dev = " \
+    ${libdir}/libxengnttab.so \
+    ${datadir}/pkgconfig/xengnttab.pc \
+    "
 
 FILES_${PN}-libxenguest = "${libdir}/libxenguest.so.*"
-FILES_${PN}-libxenguest-dev = "${libdir}/libxenguest.so"
+FILES_${PN}-libxenguest-dev = " \
+    ${libdir}/libxenguest.so \
+    ${datadir}/pkgconfig/xenguest.pc \
+    "
 
 FILES_${PN}-libxenlight = "${libdir}/libxenlight.so.*"
 FILES_${PN}-libxenlight-dev = " \
@@ -307,16 +331,28 @@ FILES_${PN}-libxenlight-dev = " \
     "
 
 FILES_${PN}-libxenstat = "${libdir}/libxenstat.so.*"
-FILES_${PN}-libxenstat-dev = "${libdir}/libxenstat.so"
+FILES_${PN}-libxenstat-dev = " \
+    ${libdir}/libxenstat.so \
+    ${datadir}/pkgconfig/xenstat.pc \
+    "
 
 FILES_${PN}-libxenstore = "${libdir}/libxenstore.so.*"
-FILES_${PN}-libxenstore-dev = "${libdir}/libxenstore.so"
+FILES_${PN}-libxenstore-dev = " \
+    ${libdir}/libxenstore.so \
+    ${datadir}/pkgconfig/xenstore.pc \
+    "
 
 FILES_${PN}-libxentoollog = "${libdir}/libxentoollog.so.*"
-FILES_${PN}-libxentoollog-dev = "${libdir}/libxentoollog.so"
+FILES_${PN}-libxentoollog-dev = " \
+    ${libdir}/libxentoollog.so \
+    ${datadir}/pkgconfig/xentoollog.pc \
+    "
 
 FILES_${PN}-libxenvchan = "${libdir}/libxenvchan.so.*"
-FILES_${PN}-libxenvchan-dev = "${libdir}/libxenvchan.so"
+FILES_${PN}-libxenvchan-dev = " \
+    ${libdir}/libxenvchan.so \
+    ${datadir}/pkgconfig/xenvchan.pc \
+    "
 
 FILES_${PN}-libxlutil = "${libdir}/libxlutil.so.*"
 FILES_${PN}-libxlutil-dev = " \
@@ -324,13 +360,22 @@ FILES_${PN}-libxlutil-dev = " \
     ${datadir}/pkgconfig/xlutil.pc \
     "
 FILES_${PN}-libvhd = "${libdir}/libvhd.so.*"
-FILES_${PN}-libvhd-dev = "${libdir}/libvhd.so"
+FILES_${PN}-libvhd-dev = " \
+    ${libdir}/libvhd.so \
+    ${datadir}/pkgconfig/vhd.pc \
+    "
 
 FILES_${PN}-libblktap = "${libdir}/libblktap.so.*"
-FILES_${PN}-libblktap-dev = "${libdir}/libblktap.so"
+FILES_${PN}-libblktap-dev = " \
+    ${libdir}/libblktap.so \
+    ${datadir}/pkgconfig/blktap.pc \
+    "
 
 FILES_${PN}-libfsimage = "${libdir}/libfsimage.so.*"
-FILES_${PN}-libfsimage-dev = "${libdir}/libfsimage.so"
+FILES_${PN}-libfsimage-dev = " \
+    ${libdir}/libfsimage.so \
+    ${datadir}/pkgconfig/fsimage.pc \
+    "
 
 FILES_${PN}-fsimage = "${libdir}/fs/*/*fsimage.so"
 
Signature · 1 line
2.13.5
#3 lore raw

PATCH 3/5 xen: remove STAGING_DIR_HOST from the runtime search path for bios.bin

In reply to Doug Goldstein

From: Christopher Clark <[email protected]>

This configuration option sets a run-time search path rather than the location of a build-time dependency.

Tested with Xen 4.9 on OpenXT.

(cherry picked from commit 9e84be6360c64d822fb5a1cea027f40007db2fe5)
---
 recipes-extended/xen/xen.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
recipes-extended/xen/xen.inc +1 -1
index 5242385..cda737c 100644
@@ -22,7 +22,7 @@ FLASK_POLICY_FILE ?= "xenpolicy-${PV}"
 PACKAGECONFIG[sdl] = "--enable-sdl,--disable-sdl,virtual/libsdl,"
 PACKAGECONFIG[xsm] = "--enable-xsmpolicy,--disable-xsmpolicy,checkpolicy-native,"
 PACKAGECONFIG[systemd] = "--enable-systemd,--disable-systemd,systemd,"
-PACKAGECONFIG[hvm] = "--with-system-seabios="${STAGING_DIR_HOST}/usr/share/firmware/bios.bin",--disable-seabios,seabios ipxe vgabios,"
+PACKAGECONFIG[hvm] = "--with-system-seabios="/usr/share/firmware/bios.bin",--disable-seabios,seabios ipxe vgabios,"
 
 DEPENDS = " \
     bison-native \
Signature · 1 line
2.13.5
#4 lore raw

PATCH 4/5 xen: Add menuconfig task and enable menuconfig from devshell

In reply to Doug Goldstein

From: Christopher Clark <[email protected]>

Xen supports Kconfig for configuring optional build settings. This commit adds the menuconfig task to simplify interactive use:

bitbake xen -c menuconfig

and also ensures that menuconfig works when using the devshell. This change adds ncurses-native as a build dependency.

(cherry picked from commit 1d9e1bd99db93c1394f51f59dd3e2a3dec15c04d)
---
 recipes-extended/xen/xen.inc | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)
recipes-extended/xen/xen.inc +35 -0
index cda737c..4333905 100644
@@ -30,6 +30,7 @@ DEPENDS = " \
     flex-native \
     file-native \
     iasl-native \
+    ncurses-native \
     util-linux-native \
     xz-native \
     bridge-utils \
@@ -1003,3 +1004,37 @@ do_deploy() {
 }
 
 addtask deploy after do_populate_sysroot
+
+# Enable use of menuconfig directly from bitbake and also within the devshell
+OE_TERMINAL_EXPORTS += "HOST_EXTRACFLAGS HOSTLDFLAGS TERMINFO"
+HOST_EXTRACFLAGS = "${BUILD_CFLAGS} ${BUILD_LDFLAGS}"
+HOSTLDFLAGS = "${BUILD_LDFLAGS}"
+TERMINFO = "${STAGING_DATADIR_NATIVE}/terminfo"
+do_devshell[depends] += "ncurses-native:do_populate_sysroot"
+
+KCONFIG_CONFIG_COMMAND ??= "menuconfig"
+python do_menuconfig() {
+    import shutil
+
+    try:
+        mtime = os.path.getmtime("xen/.config")
+        shutil.copy("xen/.config", "xen/.config.orig")
+    except OSError:
+        mtime = 0
+
+    oe_terminal("${SHELL} -c \"cd xen; XEN_CONFIG_EXPERT=y make %s; if [ \$? -ne 0 ]; then echo 'Command failed.'; printf 'Press any key to continue... '; read r; fi\"" % d.getVar('KCONFIG_CONFIG_COMMAND'),
+        d.getVar('PN') + ' Configuration', d)
+
+    try:
+        newmtime = os.path.getmtime("xen/.config")
+    except OSError:
+        newmtime = 0
+
+    if newmtime > mtime:
+        bb.note("Configuration changed, recompile will be forced")
+        bb.build.write_taint('do_compile', d)
+}
+do_menuconfig[depends] += "ncurses-native:do_populate_sysroot"
+do_menuconfig[nostamp] = "1"
+do_menuconfig[dirs] = "${B}"
+addtask menuconfig after do_configure
Signature · 1 line
2.13.5
#5 lore raw

PATCH 5/5 xen: Replace 'inherit gettext' with explicit gettext-native dependency

In reply to Doug Goldstein

From: Christopher Clark <[email protected]>

This fixes the build when libc-locale-code is not a DISTRO_FEATURE.

xen's configure script checks for xgettext and will abort if not found.

xgettext is provided by the gettext-native package but not by gettext-minimal-native. This means that "inherit gettext" is not sufficient to satisfy Xen's build requirements: gettext-native is required.

(cherry picked from commit 55b1cbe55dcd356e4d6b257ee1f58df9bb728665)
---
 recipes-extended/xen/xen.inc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
recipes-extended/xen/xen.inc +2 -1
index 4333905..37fb4ce 100644
@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=bbb4b1bdc2c3b6743da3c39d03249095"
 
 COMPATIBLE_HOST = '(x86_64.*).*-linux|aarch64.*-linux'
 
-inherit autotools-brokensep gettext setuptools update-rc.d systemd deploy
+inherit autotools-brokensep setuptools update-rc.d systemd deploy
 
 require xen-arch.inc
 
@@ -29,6 +29,7 @@ DEPENDS = " \
     dev86-native \
     flex-native \
     file-native \
+    gettext-native \
     iasl-native \
     ncurses-native \
     util-linux-native \
Signature · 1 line
2.13.5
#6 lore raw
In reply to Doug Goldstein

merged to pyro.

Bruce

Quoted 20 lines · Doug Goldstein

This backports are for the pyro branch to fix Xen issues identified.

Christopher Clark (5):
xen: Package libxendevicemodel, introduced in Xen 4.9
xen: Package .pc packageconfig files into dev packages
xen: remove STAGING_DIR_HOST from the runtime search path for bios.bin
xen: Add menuconfig task and enable menuconfig from devshell
xen: Replace 'inherit gettext' with explicit gettext-native dependency

 recipes-extended/xen/xen.inc | 118 +++++++++++++++++++++++++++++++++++++------
 1 file changed, 102 insertions(+), 16 deletions(-)

--
2.13.5

--
_______________________________________________
meta-virtualization mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-virtualization

Signature · 2 lines
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end"