xen: update git version to 4.6.x
PATCH 1/5 xen: update git version to 4.6.x
Since xen.inc has been updated to support only Xen 4.6.x, the xen_git.bb should be updated to a revision in the 4.6.x stable series.
--- recipes-extended/xen/xen_git.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
recipes-extended/xen/xen_git.bb +2 -2
@@ -1,8 +1,8 @@ require xen.inc -SRCREV = "68bd172e6fa565899c846eb72755c8ffd8562c8a" +SRCREV = "1fd615aa0108490ffc558d27627f509183cbfdaf" -PV = "4.4.0+git${SRCPV}" +PV = "4.6.0+git${SRCPV}" S = "${WORKDIR}/git"
Signature · 1 line
2.4.10
PATCH 2/5 xen: drop explicit DEPEND on libgcc
The ELFs that get built in the 'xen-xl' package do not have a NEEDED entry on libgcc. 'xen-base' is a meta package and itself should not depend on a library like this. Yocto checks the NEEDED of the dynamic section and automatically includes those libraries as dependencies.
--- recipes-extended/xen/xen.inc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
recipes-extended/xen/xen.inc +1 -3
@@ -54,7 +54,7 @@ DEPENDS = " \ RDEPENDS_${PN} = "" RDEPENDS_${PN}-base = "\ - libgcc bash perl xz \ + bash perl xz \ ${PN}-blktap \ ${PN}-console \ ${PN}-libblktapctl \
@@ -137,8 +137,6 @@ RDEPENDS_${PN}-xendomains = "\ ${PN}-xenstored \ " -RDEPENDS_${PN}-xl = "libgcc" - RDEPENDS_${PN}-xentrace = "python" RDEPENDS_${PN}-xen-watchdog = "bash"
Signature · 1 line
2.4.10
Re: [PATCH 2/5] xen: drop explicit DEPEND on libgcc
Quoted 15 lines · Doug Goldstein
The ELFs that get built in the 'xen-xl' package do not have a NEEDED entry on libgcc. 'xen-base' is a meta package and itself should not depend on a library like this. Yocto checks the NEEDED of the dynamic section and automatically includes those libraries as dependencies.
Signed-off-by Doug Goldstein <[email protected]>--- recipes-extended/xen/xen.inc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)recipes-extended/xen/xen.inc +0
-0
recipes-extended/xen/xen.inc DEPENDS = " \ · line 57
Quoted 5 lines
recipes-extended/xen/xen.inc +1
-1@@ -54,7 +54,7 @@ DEPENDS = " \ RDEPENDS_${PN} = "" RDEPENDS_${PN}-base = "\ - libgcc bash perl xz \ + bash perl xz \
Makes sense to remove from the meta package, +1.
recipes-extended/xen/xen.inc RDEPENDS_${PN}-xendomains = "\ · line 141
Quoted 9 lines
recipes-extended/xen/xen.inc +0
-2${PN}-blktap \ ${PN}-console \ ${PN}-libblktapctl \@@ -137,8 +137,6 @@ RDEPENDS_${PN}-xendomains = "\ ${PN}-xenstored \ " -RDEPENDS_${PN}-xl = "libgcc" -
The commit that added libgcc warned some operations may not work:
commit c93bc0c0185da21482164d9f76047715349cbb17
Author: Philip Tricca <[email protected]> Date: Thu Jan 23 03:19:33 2014 +0000
xen: Add libgcc as runtime dependency of xen-xl package.
Much of xl operates fine without libgcc but some operations complain that pthread_cancel won't work properly without libgcc_s.so.1 installed. The exact text is:
libgcc_s.so.1 must be installed for pthread_cancel to work
Given the above warning, I went ahead a did a test. I took my image which had libgcc-s installed anyways, moved /lib/libgcc-s.so.1 to /tmp, then attempted to create a VM:
...
domainbuilder: detail: xc_dom_gnttab_hvm_seed: called, pfn=0x10f000
libxl: error: libxl_dm.c:1854:device_model_spawn_outcome: domain 4 device model: spawn failed (rc=-3)
libxl: error: libxl_create.c:1341:domcreate_devmodel_started: device model did not start: -3
libxl: error: libxl_dm.c:1964:kill_device_model: Device Model already exited
libxl: error: libxl.c:1591:libxl__destroy_domid: non-existant domain 4
libxl: error: libxl.c:1549:domain_destroy_callback: unable to destroy guest with domid 4
libxl: error: libxl.c:1476:domain_destroy_cb: destruction of domain 4 failed libgcc_s.so.1 must be installed for pthread_cancel to work Aborted
...
So, I imagine that this patch is probably not wise, at least for my environment :) Although, it would appear that qemu pulls libgcc into my image regardless.
Re: [PATCH 2/5] xen: drop explicit DEPEND on libgcc
Quoted 72 lines · Chris Patterson
Quoted 15 lines · Doug Goldstein
The ELFs that get built in the 'xen-xl' package do not have a NEEDED entry on libgcc. 'xen-base' is a meta package and itself should not depend on a library like this. Yocto checks the NEEDED of the dynamic section and automatically includes those libraries as dependencies.
Signed-off-by Doug Goldstein <[email protected]>--- recipes-extended/xen/xen.inc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)recipes-extended/xen/xen.inc +0
-0recipes-extended/xen/xen.inc DEPENDS = " \ · line 57
Quoted 5 lines
recipes-extended/xen/xen.inc +1
-1@@ -54,7 +54,7 @@ DEPENDS = " \ RDEPENDS_${PN} = "" RDEPENDS_${PN}-base = "\ - libgcc bash perl xz \ + bash perl xz \Makes sense to remove from the meta package, +1.
recipes-extended/xen/xen.inc RDEPENDS_${PN}-xendomains = "\ · line 141
Quoted 9 lines
recipes-extended/xen/xen.inc +0
-2${PN}-blktap \ ${PN}-console \ ${PN}-libblktapctl \@@ -137,8 +137,6 @@ RDEPENDS_${PN}-xendomains = "\ ${PN}-xenstored \ " -RDEPENDS_${PN}-xl = "libgcc" -The commit that added libgcc warned some operations may not work:
commit
c93bc0c0185da21482164d9f76047715349cbb17Author: Philip Tricca <[email protected]> Date: Thu Jan 23 03:19:33 2014 +0000xen: Add libgcc as runtime dependency of xen-xl package.
Much of xl operates fine without libgcc but some operations complain that
pthread_cancelwon't work properly without libgcc_s.so.1 installed. The exact text is:libgcc_s.so.1 must be installed for
pthread_cancelto workSigned-off-by Philip Tricca <[email protected]>Signed-off-by Bruce Ashfield <[email protected]>Given the above warning, I went ahead a did a test. I took my image which had libgcc-s installed anyways, moved
/lib/libgcc-s.so.1to /tmp, then attempted to create a VM:...
domainbuilder: detail:xc_dom_gnttab_hvm_seed: called, pfn=0x10f000
libxl: error: libxl_dm.c:1854:device_model_spawn_outcome: domain 4 device model: spawn failed (rc=-3)
libxl: error: libxl_create.c:1341:domcreate_devmodel_started: device model did not start: -3
libxl: error: libxl_dm.c:1964:kill_device_model: Device Model already exitedlibxl: error: libxl.c:1591:libxl__destroy_domid: non-existant domain 4
libxl: error: libxl.c:1549:domain_destroy_callback: unable to destroy guest with domid 4
libxl: error: libxl.c:1476:domain_destroy_cb: destruction of domain 4 failed libgcc_s.so.1 must be installed forpthread_cancelto work Aborted
...
Quoted 4 lines
So, I imagine that this patch is probably not wise, at least for my environment :) Although, it would appear that qemu pulls libgcc into my image regardless.
hmm. I'd rather respin it without that change then. Interesting that the NEEDED check doesn't pick it up as a dependency.
Signature · 1 line
Doug Goldstein
Re: [PATCH 2/5] xen: drop explicit DEPEND on libgcc
Quoted 3 lines · Doug Goldstein
hmm. I'd rather respin it without that change then. Interesting that the
NEEDED check doesn't pick it up as a dependency.
Its a known issue with the way libpthread dlopen()s libgcc. In some ways, the pthread library should really RRECOMMEND libgcc, however since its part of the main glibc package, that would mean libgcc effectively everywhere.
Its only used by a limited subset of the pthread functionality so there are cases you don't need it.
Cheers,
Richard
PATCH 3/5 xen: fix up typo in XSM comments
In reply to Doug Goldstein--- recipes-extended/xen/xen.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
recipes-extended/xen/xen.inc +2 -2
@@ -720,7 +720,7 @@ EXTRA_OECONF += " \ --disable-ocamltools \ " -# check for XSM in package config to allow XSM_ENABLE to be set +# check for XSM in package config to allow XSM_ENABLE to be set python () { pkgconfig = d.getVar('PACKAGECONFIG', True) if ('xsm') in pkgconfig.split():
@@ -741,7 +741,7 @@ do_configure() { fi fi - #./configure --enable-xsm does not set XSM_ENABLE must be done manually + #./configure --enable-xsmpolicy does not set XSM_ENABLE must be done manually if [ "${XSM_ENABLED}" = "1" ]; then echo "XSM_ENABLE := y" > ${S}/.config fi
Signature · 1 line
2.4.10
Re: [PATCH 3/5] xen: fix up typo in XSM comments
+1, LGTM
Quoted 35 lines · Doug Goldstein
Signed-off-by Doug Goldstein <[email protected]>--- recipes-extended/xen/xen.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)recipes-extended/xen/xen.inc +2
-3@@ -720,7 +720,7 @@ EXTRA_OECONF += " \ --disable-ocamltools \ " -# check for XSM in package config to allow XSM_ENABLE to be set +# check for XSM in package config to allow XSM_ENABLE to be set python () { pkgconfig = d.getVar('PACKAGECONFIG', True) if ('xsm') in pkgconfig.split():@@ -741,7 +741,7 @@ do_configure() { fi fi - #./configure --enable-xsm does not set XSM_ENABLE must be done manually + #./configure --enable-xsmpolicy does not set XSM_ENABLE must be done manually if [ "${XSM_ENABLED}" = "1" ]; then echo "XSM_ENABLE := y" > ${S}/.config fi --2.4.10
--
_______________________________________________
meta-virtualization mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-virtualization
PATCH 4/5 xen: separate the extra steps into their own tasks
In reply to Doug Goldsteindo_configure() was overloaded with a lot of behaviors that really were source code patching so instead make them as extra tasks that happen after do_patch() and before do_configure().
--- recipes-extended/xen/xen.inc | 21 ++++++++++++++++++++- recipes-extended/xen/xen_4.6.0.bb | 12 ------------ 2 files changed, 20 insertions(+), 13 deletions(-)
recipes-extended/xen/xen.inc +20 -1
@@ -729,7 +729,21 @@ python () { d.setVar('XSM_ENABLED', '0') } -do_configure() { +do_post_patch() { + # fixup AS/CC/CCP/etc variable within StdGNU.mk + for i in LD CC CPP CXX; do + sed -i "s/^\($i\s\s*\).*=/\1?=/" ${S}/config/StdGNU.mk + done + # fixup environment passing in some makefiles + sed -i 's#\(\w*\)=\(\$.\w*.\)#\1="\2"#' ${S}/tools/firmware/Makefile + + # libsystemd-daemon -> libsystemd for newer systemd versions + sed -i 's#libsystemd-daemon#libsystemd#' ${S}/tools/configure +} + +addtask post_patch after do_patch before do_configure + +do_stubs() { # no stubs-32.h in our 64-bit sysroot - hack it into tools/include/gnu if ! test -f ${STAGING_DIR_TARGET}/usr/include/gnu/stubs-32.h ; then if test -f ${STAGING_DIR_TARGET}/usr/include/gnu/stubs-64.h ; then
@@ -740,6 +754,11 @@ do_configure() { echo \#define __stub___kernel_tanl >> ${S}/tools/include/gnu/stubs-32.h fi fi +} + +addtask stubs after do_patch before do_configure + +do_configure() { #./configure --enable-xsmpolicy does not set XSM_ENABLE must be done manually if [ "${XSM_ENABLED}" = "1" ]; then
recipes-extended/xen/xen_4.6.0.bb +0 -12
@@ -27,18 +27,6 @@ EXTRA_OEMAKE += "SEABIOS_ROM=${STAGING_DIR_HOST}/usr/share/firmware/bios.bin" EXTRA_OEMAKE += "ETHERBOOT_ROMS=${STAGING_DIR_HOST}/usr/share/firmware/rtl8139.rom" #EXTRA_OEMAKE += "XENGFX_ROM=${STAGING_DIR_HOST}/usr/share/firmware/vgabios.bin" -do_configure_prepend() { - # fixup AS/CC/CCP/etc variable within StdGNU.mk - for i in LD CC CPP CXX; do - sed -i "s/^\($i\s\s*\).*=/\1?=/" ${S}/config/StdGNU.mk - done - # fixup environment passing in some makefiles - sed -i 's#\(\w*\)=\(\$.\w*.\)#\1="\2"#' ${S}/tools/firmware/Makefile - - # libsystemd-daemon -> libsystemd for newer systemd versions - sed -i 's#libsystemd-daemon#libsystemd#' ${S}/tools/configure -} - do_install_append() { # fixup default path to qemu-system-i386 sed -i 's#\(test -z "$QEMU_XEN" && QEMU_XEN=\).*$#\1"/usr/bin/qemu-system-i386"#' ${D}/etc/init.d/xencommons
Signature · 1 line
2.4.10
Re: [PATCH 4/5] xen: separate the extra steps into their own tasks
LGTM, it builds fine, but I'm no expect on addtask usage :)
Quoted 80 lines · Doug Goldstein
do_configure()was overloaded with a lot of behaviors that really were source code patching so instead make them as extra tasks that happen afterdo_patch()and beforedo_configure().Signed-off-by Doug Goldstein <[email protected]>--- recipes-extended/xen/xen.inc | 21 ++++++++++++++++++++- recipes-extended/xen/xen_4.6.0.bb | 12 ------------ 2 files changed, 20 insertions(+), 13 deletions(-)recipes-extended/xen/xen.inc +20
-1@@ -729,7 +729,21 @@ python () { d.setVar('XSM_ENABLED', '0') } -do_configure() { +do_post_patch() { + # fixup AS/CC/CCP/etc variable within StdGNU.mk + for i in LD CC CPP CXX; do + sed -i "s/^\($i\s\s*\).*=/\1?=/" ${S}/config/StdGNU.mk + done + # fixup environment passing in some makefiles + sed -i 's#\(\w*\)=\(\$.\w*.\)#\1="\2"#' ${S}/tools/firmware/Makefile + + # libsystemd-daemon -> libsystemd for newer systemd versions + sed -i 's#libsystemd-daemon#libsystemd#' ${S}/tools/configure +} + +addtask post_patch after do_patch before do_configure + +do_stubs() { # no stubs-32.h in our 64-bit sysroot - hack it into tools/include/gnu if ! test -f ${STAGING_DIR_TARGET}/usr/include/gnu/stubs-32.h ; then if test -f ${STAGING_DIR_TARGET}/usr/include/gnu/stubs-64.h ; then@@ -740,6 +754,11 @@ do_configure() { echo \#define __stub___kernel_tanl >> ${S}/tools/include/gnu/stubs-32.h fi fi +} + +addtask stubs after do_patch before do_configure + +do_configure() { #./configure --enable-xsmpolicy does not set XSM_ENABLE must be done manually if [ "${XSM_ENABLED}" = "1" ]; thenrecipes-extended/xen/xen_4.6.0.bb +0
-13@@ -27,18 +27,6 @@ EXTRA_OEMAKE += "SEABIOS_ROM=${STAGING_DIR_HOST}/usr/share/firmware/bios.bin" EXTRA_OEMAKE += "ETHERBOOT_ROMS=${STAGING_DIR_HOST}/usr/share/firmware/rtl8139.rom" #EXTRA_OEMAKE += "XENGFX_ROM=${STAGING_DIR_HOST}/usr/share/firmware/vgabios.bin" -do_configure_prepend() { - # fixup AS/CC/CCP/etc variable within StdGNU.mk - for i in LD CC CPP CXX; do - sed -i "s/^\($i\s\s*\).*=/\1?=/" ${S}/config/StdGNU.mk - done - # fixup environment passing in some makefiles - sed -i 's#\(\w*\)=\(\$.\w*.\)#\1="\2"#' ${S}/tools/firmware/Makefile - - # libsystemd-daemon -> libsystemd for newer systemd versions - sed -i 's#libsystemd-daemon#libsystemd#' ${S}/tools/configure -} - do_install_append() { # fixup default path to qemu-system-i386 sed -i 's#\(test -z "$QEMU_XEN" && QEMU_XEN=\).*$#\1"/usr/bin/qemu-system-i386"#' ${D}/etc/init.d/xencommons --2.4.10
--
_______________________________________________
meta-virtualization mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-virtualization
PATCH 5/5 xen: move bits common to all Xen versions to xen.inc
In reply to Doug GoldsteinThese items are common for all Xen versions since at least 4.5 and newer so these should just go in the common include file.
--- recipes-extended/xen/xen.inc | 9 +++++++++ recipes-extended/xen/xen_4.6.0.bb | 11 ----------- 2 files changed, 9 insertions(+), 11 deletions(-)
recipes-extended/xen/xen.inc +9 -0
@@ -691,6 +691,11 @@ python () { raise bb.parse.SkipPackage('Cannot map `%s` to a xen architecture' % d.getVar('TARGET_ARCH', True)) } +# Yocto appends ${PN} to libexecdir by default and Xen appends 'xen' as well +# the result is a nested xen/xen/ so let's avoid that by shunning Yocto's +# extra ${PN} appended. +libexecdir = "${libdir}" + # hardcoded as Linux, as the only compatible hosts are Linux. export XEN_OS = "Linux"
@@ -718,6 +723,10 @@ EXTRA_OECONF += " \ --disable-xenstore-stubdom \ --disable-rombios \ --disable-ocamltools \ + --with-initddir=${INIT_D_DIR} \ + --with-sysconfig-leaf-dir=default \ + --with-system-qemu=/usr/bin/qemu-system-i386 \ + --disable-qemu-traditional \ " # check for XSM in package config to allow XSM_ENABLE to be set
recipes-extended/xen/xen_4.6.0.bb +0 -11
@@ -10,17 +10,6 @@ SRC_URI[sha256sum] = "6fa1c2431df55aa5950d248e6093b8c8c0f11c357a0adbd348a2186478 S = "${WORKDIR}/xen-${PV}" -# Xen suffixes the libexecdir within its configure scripts, prevent the nested xen/xen/ -libexecdir = "${libdir}" - -# These options override detected values from the build. -EXTRA_OECONF_append += " \ - --with-initddir=${INIT_D_DIR} \ - --with-sysconfig-leaf-dir=default \ - --with-system-qemu=/usr/bin/qemu-system-i386 \ - --disable-qemu-traditional \ - " - EXTRA_OEMAKE += "STDVGA_ROM=${STAGING_DIR_HOST}/usr/share/firmware/vgabios-0.7a.bin" EXTRA_OEMAKE += "CIRRUSVGA_ROM=${STAGING_DIR_HOST}/usr/share/firmware/vgabios-0.7a.cirrus.bin" EXTRA_OEMAKE += "SEABIOS_ROM=${STAGING_DIR_HOST}/usr/share/firmware/bios.bin"
Signature · 1 line
2.4.10
Re: [PATCH 5/5] xen: move bits common to all Xen versions to xen.inc
+1, LGTM, though I'd probably also move the common EXTRA_OEMAKE and the sse patch into the .inc. Unless there is reason not to? I can follow up after this series with that patch as well, if desired.
Cheers!
I gave series a spin. Xen 4.6 built and ran nicely. On the git version, I received: "Fetcher failure: Unable to find revision 1fd615aa0108490ffc558d27627f509183cbfdaf in branch master even from upstream"
Had to set branch=staging-4.6 to get it to fetch OK. With the rest of this patch series applied, I also needed to move more of the common bits into xen.inc to get it to build for x86_64. Any thoughts on moving the EXTRA_OEMAKE, xen-x86-Fix-up-rules-when-forcing-mno-sse.patch, and do_install_append() to the .inc as well?
Cheers for the cleanup :)
Quoted 31 lines · Doug Goldstein
Since xen.inc has been updated to support only Xen 4.6.x, the xen_git.bb should be updated to a revision in the 4.6.x stable series.
Signed-off-by Doug Goldstein <[email protected]>--- recipes-extended/xen/xen_git.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)recipes-extended/xen/xen_git.bb +2
-3@@ -1,8 +1,8 @@ require xen.inc -SRCREV = "68bd172e6fa565899c846eb72755c8ffd8562c8a" +SRCREV = "1fd615aa0108490ffc558d27627f509183cbfdaf" -PV = "4.4.0+git${SRCPV}" +PV = "4.6.0+git${SRCPV}" S = "${WORKDIR}/git" --2.4.10
--
_______________________________________________
meta-virtualization mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-virtualization
Quoted 5 lines · Chris Patterson
I gave series a spin. Xen 4.6 built and ran nicely. On the git version, I received: "Fetcher failure: Unable to find revision
1fd615aa0108490ffc558d27627f509183cbfdafin branch master even from upstream"
Quoted 9 lines
Had to set branch=staging-4.6 to get it to fetch OK. With the rest of this patch series applied, I also needed to move more of the common bits into xen.inc to get it to build for
x86_64. Any thoughts on moving theEXTRA_OEMAKE, xen-x86-Fix-up-rules-when-forcing-mno-sse.patch, anddo_install_append()to the .inc as well?Cheers for the cleanup :)
Yes. I actually have more patches and didn't include them for some reason. I'll repost.
Signature · 1 line
Doug Goldstein