Skip to contentSkip to conversation

xen.cfg: update for linux 4.1 and add some newer config options

PATCH In review Chris Patterson 2 participants 14 messages Dec 22, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 xen.cfg: update for linux 4.1 and add some newer config options

---
 recipes-kernel/linux/linux-yocto/xen.cfg |   20 +++++++-------------
 1 file changed, 7 insertions(+), 13 deletions(-)
recipes-kernel/linux/linux-yocto/xen.cfg +7 -13
index 4e796b9..206b162 100644
@@ -1,27 +1,18 @@
-###
-# linux 3.4, 3.8
-CONFIG_PARAVIRT_GUEST=y
-###
-
-###
-# linux 3.10
-CONFIG_HYPERVISOR_GUEST=y
-###
-
-CONFIG_PARAVIRT=y
 CONFIG_XEN=y
 CONFIG_XEN_DOM0=y
-CONFIG_XEN_PRIVILEGED_GUEST=y
 CONFIG_XEN_PVHVM=y
 CONFIG_XEN_MAX_DOMAIN_MEMORY=500
 CONFIG_XEN_SAVE_RESTORE=y
-CONFIG_PARAVIRT_CLOCK=y
+# CONFIG_XEN_DEBUG_FS is not set
+CONFIG_XEN_PVH=y
+CONFIG_MMU_NOTIFIER=y
 CONFIG_HIBERNATE_CALLBACKS=y
 CONFIG_PCI_XEN=y
 CONFIG_XEN_PCIDEV_FRONTEND=y
 CONFIG_SYS_HYPERVISOR=y
 CONFIG_XEN_BLKDEV_FRONTEND=y
 CONFIG_XEN_BLKDEV_BACKEND=m
+CONFIG_XEN_SCSI_FRONTEND=m
 CONFIG_XEN_NETDEV_FRONTEND=y
 CONFIG_XEN_NETDEV_BACKEND=m
 CONFIG_INPUT_MISC=y
@@ -52,3 +43,6 @@ CONFIG_XEN_PRIVCMD=y
 CONFIG_XEN_ACPI_PROCESSOR=m
 CONFIG_XEN_MCE_LOG=y
 CONFIG_XEN_HAVE_PVMMU=y
+CONFIG_XEN_EFI=y
+CONFIG_XEN_AUTO_XLATE=y
+CONFIG_XEN_ACPI=y
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH 2/4 seabios: uprev to 1.9.0

SeaBIOS 1.7.5 fails to compile on newer gcc, so update it! :)

Also removing PR while I'm here.

---
 recipes-extended/seabios/seabios_1.7.5.bb |   45 -----------------------------
 recipes-extended/seabios/seabios_1.9.0.bb |   43 +++++++++++++++++++++++++++
 2 files changed, 43 insertions(+), 45 deletions(-)
 delete mode 100644 recipes-extended/seabios/seabios_1.7.5.bb
 create mode 100644 recipes-extended/seabios/seabios_1.9.0.bb
recipes-extended/seabios/seabios_1.7.5.bb deleted +0 -45
deleted file mode 100644
index d57e250..0000000
@@ -1,45 +0,0 @@
-DESCRIPTION = "SeaBIOS"
-HOMEPAGE = "http://www.coreboot.org/SeaBIOS"
-LICENSE = "LGPLv3"
-SECTION = "firmware"
-
-SRC_URI = " \
-    http://code.coreboot.org/p/seabios/downloads/get/${PN}-${PV}.tar.gz \
-    file://hostcc.patch \
-    file://defconfig \
-    "
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504         \
-                    file://COPYING.LESSER;md5=6a6a8e020838b23406c81b19c1d46df6  \
-                    "
-
-SRC_URI[md5sum] = "3f1e17485ca327b245ae5938d9aa02d9"
-SRC_URI[sha256sum] = "858d9eda4ad91efa1c45a5a401d560ef9ca8dd172f03b0a106f06661c252dc51"
-
-PR = "r0"
-
-FILES_${PN} = "/usr/share/firmware"
-
-DEPENDS = "util-linux-native file-native bison-native flex-native gettext-native iasl-native python-native"
-
-TUNE_CCARGS = ""
-EXTRA_OEMAKE += "HOSTCC='${BUILD_CC}'"
-EXTRA_OEMAKE += "CROSS_PREFIX=${TARGET_PREFIX}"
-
-do_configure() {
-    install -m 0644 "${WORKDIR}/defconfig" .config
-    oe_runmake oldconfig
-}
-
-do_compile() {
-    unset CPP
-    unset CPPFLAGS
-    oe_runmake
-}
-
-do_install() {
-    oe_runmake
-    install -d ${D}/usr/share/firmware
-    install -m 0644 out/bios.bin ${D}/usr/share/firmware/
-}
-
recipes-extended/seabios/seabios_1.9.0.bb new file +43 -0

43 lines not on this page · raw message

Signature · 1 line
1.7.10.4
#2 lore raw

PATCH 3/4 xen: uprev to 4.6.0

In reply to Chris Patterson

- Fixup LICENSE checksum.
- Add patch to skip a check that breaks in cross-compile environments.
- Drop udev package that has been removed.

---
 recipes-extended/xen/files/skip-headers.chk.patch |   48 +++++++++++++++++++
 recipes-extended/xen/xen.inc                      |   13 +-----
 recipes-extended/xen/xen_4.5.0.bb                 |   50 --------------------
 recipes-extended/xen/xen_4.6.0.bb                 |   51 +++++++++++++++++++++
 4 files changed, 100 insertions(+), 62 deletions(-)
 create mode 100644 recipes-extended/xen/files/skip-headers.chk.patch
 delete mode 100644 recipes-extended/xen/xen_4.5.0.bb
 create mode 100644 recipes-extended/xen/xen_4.6.0.bb
recipes-extended/xen/files/skip-headers.chk.patch new file +48 -0
new file mode 100644
index 0000000..19ce7bf
@@ -0,0 +1,48 @@
+commit 162c1db56f3126f392269cb81808657e55c395e5
+Author: Chris Patterson <[email protected]>
+Date:   Mon Dec 21 19:49:43 2015 -0500
+
+    Makefile: remove headers.chk which breaks in cross compilation environments
+    
+    Signed-off-by: Chris Patterson <[email protected]>
+
+diff --git a/xen/include/Makefile b/xen/include/Makefile
+index 94ba3d8..dd51d5b 100644
+--- a/xen/include/Makefile
++++ b/xen/include/Makefile
+@@ -87,35 +87,5 @@ compat/xlat.h: $(addprefix compat/.xlat/,$(xlat-y)) Makefile
+ 	cat $(filter %.h,$^) >[email protected]
+ 	mv -f [email protected] $@
+ 
+-ifeq ($(XEN_TARGET_ARCH),$(XEN_COMPILE_ARCH))
+-
+-all: headers.chk headers++.chk
+-
+-PUBLIC_HEADERS := $(filter-out public/arch-% public/dom0_ops.h, $(wildcard public/*.h public/*/*.h) $(public-y))
+-
+-PUBLIC_ANSI_HEADERS := $(filter-out public/%ctl.h public/xsm/% public/%hvm/save.h, $(PUBLIC_HEADERS))
+-
+-headers.chk: $(PUBLIC_ANSI_HEADERS) Makefile
+-	for i in $(filter %.h,$^); do \
+-	    $(CC) -x c -ansi -Wall -Werror -include stdint.h \
+-	          -S -o /dev/null $$i || exit 1; \
+-	    echo $$i; \
+-	done >[email protected]
+-	mv [email protected] $@
+-
+-headers++.chk: $(PUBLIC_HEADERS) Makefile
+-	if $(CXX) -v >/dev/null 2>&1; then \
+-	    for i in $(filter %.h,$^); do \
+-	        echo '#include "'$$i'"' \
+-	        | $(CXX) -x c++ -std=gnu++98 -Wall -Werror -D__XEN_TOOLS__ \
+-	          -include stdint.h -include public/xen.h -S -o /dev/null - \
+-	        || exit 1; \
+-	        echo $$i; \
+-	    done ; \
+-	fi >[email protected]
+-	mv [email protected] $@
+-
+-endif
+-
+ clean::
+ 	rm -rf compat headers.chk headers++.chk
recipes-extended/xen/xen.inc +1 -12
index 00f1823..c1be16d 100644
@@ -3,7 +3,7 @@ HOMEPAGE = "http://xen.org"
 LICENSE = "GPLv2"
 SECTION = "console/tools"
 
-LIC_FILES_CHKSUM = "file://COPYING;md5=e0f0f3ac55608719a82394cc353928df"
+LIC_FILES_CHKSUM = "file://COPYING;md5=a6260c12cd5de27e80d89ae18e48d20a"
 
 COMPATIBLE_HOST = '(x86_64.*).*-linux|aarch64.*-linux'
 
@@ -69,7 +69,6 @@ RDEPENDS_${PN}-base = "\
     ${PN}-fsimage \
     ${PN}-scripts-block \
     ${PN}-scripts-network \
-    ${PN}-udev \
     ${PN}-xen-watchdog \
     ${PN}-xencommons \
     ${PN}-xendomains \
@@ -99,7 +98,6 @@ RDEPENDS_${PN}-remus = "python"
 RDEPENDS_${PN}-scripts-block = "\
     bash \
     ${PN}-scripts-common \
-    ${PN}-udev \
     ${PN}-volatiles \
     "
 
@@ -109,12 +107,9 @@ RDEPENDS_${PN}-scripts-network = "\
     bash \
     bridge-utils \
     ${PN}-scripts-common \
-    ${PN}-udev \
     ${PN}-volatiles \
     "
 
-RDEPENDS_${PN}-udev = "udev"
-
 RDEPENDS_${PN}-xencommons = "\
     bash \
     ${PN}-console \
@@ -182,7 +177,6 @@ PACKAGES = "\
     ${PN}-scripts-common \
     ${PN}-scripts-network \
     ${PN}-staticdev \
-    ${PN}-udev \
     ${PN}-volatiles \
     ${PN}-xcutils \
     ${PN}-xencommons \
@@ -512,11 +506,6 @@ FILES_${PN}-scripts-common = " \
     ${sysconfdir}/xen/scripts/xen-script-common.sh \
     "
 
-FILES_${PN}-udev = "\
-    ${sysconfdir}/udev/rules.d/xen-backend.rules \
-    ${sysconfdir}/udev/rules.d/xend.rules \
-    "
-
 FILES_${PN}-volatiles = "\
     ${sysconfdir}/default/volatiles/99_xen \
     ${sysconfdir}/tmpfiles.d/xen.conf \
recipes-extended/xen/xen_4.5.0.bb deleted +0 -50

50 lines not on this page · raw message

recipes-extended/xen/xen_4.6.0.bb new file +51 -0

51 lines not on this page · raw message

Signature · 1 line
1.7.10.4
#3 lore raw

Re: [PATCH 3/4] xen: uprev to 4.6.0

Quoted 235 lines · Chris Patterson

- Fixup LICENSE checksum.
- Add patch to skip a check that breaks in cross-compile environments.
- Drop udev package that has been removed.

---
 recipes-extended/xen/files/skip-headers.chk.patch |   48 +++++++++++++++++++
 recipes-extended/xen/xen.inc                      |   13 +-----
 recipes-extended/xen/xen_4.5.0.bb                 |   50 --------------------
 recipes-extended/xen/xen_4.6.0.bb                 |   51 +++++++++++++++++++++
 4 files changed, 100 insertions(+), 62 deletions(-)
 create mode 100644 recipes-extended/xen/files/skip-headers.chk.patch
 delete mode 100644 recipes-extended/xen/xen_4.5.0.bb
 create mode 100644 recipes-extended/xen/xen_4.6.0.bb
recipes-extended/xen/files/skip-headers.chk.patch new file +48 -0
new file mode 100644
index 0000000..19ce7bf
@@ -0,0 +1,48 @@
+commit 162c1db56f3126f392269cb81808657e55c395e5
+Author: Chris Patterson <[email protected]>
+Date:   Mon Dec 21 19:49:43 2015 -0500
+
+    Makefile: remove headers.chk which breaks in cross compilation environments
+    
+    Signed-off-by: Chris Patterson <[email protected]>
+
+diff --git a/xen/include/Makefile b/xen/include/Makefile
+index 94ba3d8..dd51d5b 100644
+--- a/xen/include/Makefile
++++ b/xen/include/Makefile
+@@ -87,35 +87,5 @@ compat/xlat.h: $(addprefix compat/.xlat/,$(xlat-y)) Makefile
+ 	cat $(filter %.h,$^) >[email protected]
+ 	mv -f [email protected] $@
+ 
+-ifeq ($(XEN_TARGET_ARCH),$(XEN_COMPILE_ARCH))
+-
+-all: headers.chk headers++.chk
+-
+-PUBLIC_HEADERS := $(filter-out public/arch-% public/dom0_ops.h, $(wildcard public/*.h public/*/*.h) $(public-y))
+-
+-PUBLIC_ANSI_HEADERS := $(filter-out public/%ctl.h public/xsm/% public/%hvm/save.h, $(PUBLIC_HEADERS))
+-
+-headers.chk: $(PUBLIC_ANSI_HEADERS) Makefile
+-	for i in $(filter %.h,$^); do \
+-	    $(CC) -x c -ansi -Wall -Werror -include stdint.h \
+-	          -S -o /dev/null $$i || exit 1; \
+-	    echo $$i; \
+-	done >[email protected]
+-	mv [email protected] $@
+-
+-headers++.chk: $(PUBLIC_HEADERS) Makefile
+-	if $(CXX) -v >/dev/null 2>&1; then \
+-	    for i in $(filter %.h,$^); do \
+-	        echo '#include "'$$i'"' \
+-	        | $(CXX) -x c++ -std=gnu++98 -Wall -Werror -D__XEN_TOOLS__ \
+-	          -include stdint.h -include public/xen.h -S -o /dev/null - \
+-	        || exit 1; \
+-	        echo $$i; \
+-	    done ; \
+-	fi >[email protected]
+-	mv [email protected] $@
+-
+-endif
+-
+ clean::
+ 	rm -rf compat headers.chk headers++.chk
recipes-extended/xen/xen.inc +1 -12
index 00f1823..c1be16d 100644
@@ -3,7 +3,7 @@ HOMEPAGE = "http://xen.org"
 LICENSE = "GPLv2"
 SECTION = "console/tools"
 
-LIC_FILES_CHKSUM = "file://COPYING;md5=e0f0f3ac55608719a82394cc353928df"
+LIC_FILES_CHKSUM = "file://COPYING;md5=a6260c12cd5de27e80d89ae18e48d20a"
 
 COMPATIBLE_HOST = '(x86_64.*).*-linux|aarch64.*-linux'
 
@@ -69,7 +69,6 @@ RDEPENDS_${PN}-base = "\
     ${PN}-fsimage \
     ${PN}-scripts-block \
     ${PN}-scripts-network \
-    ${PN}-udev \
     ${PN}-xen-watchdog \
     ${PN}-xencommons \
     ${PN}-xendomains \
@@ -99,7 +98,6 @@ RDEPENDS_${PN}-remus = "python"
 RDEPENDS_${PN}-scripts-block = "\
     bash \
     ${PN}-scripts-common \
-    ${PN}-udev \
     ${PN}-volatiles \
     "
 
@@ -109,12 +107,9 @@ RDEPENDS_${PN}-scripts-network = "\
     bash \
     bridge-utils \
     ${PN}-scripts-common \
-    ${PN}-udev \
     ${PN}-volatiles \
     "
 
-RDEPENDS_${PN}-udev = "udev"
-
 RDEPENDS_${PN}-xencommons = "\
     bash \
     ${PN}-console \
@@ -182,7 +177,6 @@ PACKAGES = "\
     ${PN}-scripts-common \
     ${PN}-scripts-network \
     ${PN}-staticdev \
-    ${PN}-udev \
     ${PN}-volatiles \
     ${PN}-xcutils \
     ${PN}-xencommons \
@@ -512,11 +506,6 @@ FILES_${PN}-scripts-common = " \
     ${sysconfdir}/xen/scripts/xen-script-common.sh \
     "
 
-FILES_${PN}-udev = "\
-    ${sysconfdir}/udev/rules.d/xen-backend.rules \
-    ${sysconfdir}/udev/rules.d/xend.rules \
-    "
-
 FILES_${PN}-volatiles = "\
     ${sysconfdir}/default/volatiles/99_xen \
     ${sysconfdir}/tmpfiles.d/xen.conf \
recipes-extended/xen/xen_4.5.0.bb deleted +0 -50
deleted file mode 100644
index 6c17b90..0000000
@@ -1,50 +0,0 @@
-require xen.inc
-
-SRC_URI = " \
-    http://bits.xensource.com/oss-xen/release/${PV}/xen-${PV}.tar.gz \
-    file://xen-x86-Fix-up-rules-when-forcing-mno-sse.patch \
-    "
-
-SRC_URI[md5sum] = "9bac43d2419d05a647064d9253bb03fa"
-SRC_URI[sha256sum] = "5bdb40e2b28d2eeb541bd71a9777f40cbe2ae444b987521d33f099541a006f3b"
-
-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"
-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 AS LD CC CPP AR RANLIB NM STRIP OBJCOPY OBJDUMP; 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
-
-    if [ -e ${D}${systemd_unitdir}/system/xen-qemu-dom0-disk-backend.service ]; then
-        sed -i 's#ExecStart=.*qemu-system-i386\(.*\)$#ExecStart=/usr/bin/qemu-system-i386\1#' \
-            ${D}${systemd_unitdir}/system/xen-qemu-dom0-disk-backend.service
-    fi
-}
recipes-extended/xen/xen_4.6.0.bb new file +41 -0
new file mode 100644
index 0000000..1c84a6f
@@ -0,0 +1,51 @@
+require xen.inc
+
+SRC_URI = " \
+    http://bits.xensource.com/oss-xen/release/${PV}/xen-${PV}.tar.gz \
+    file://xen-x86-Fix-up-rules-when-forcing-mno-sse.patch \
+    file://skip-headers.chk.patch \
+    "
+
+SRC_URI[md5sum] = "48e232f90927c08326a7b52bb06f49bc"
+SRC_URI[sha256sum] = "6fa1c2431df55aa5950d248e6093b8c8c0f11c357a0adbd348a2186478e80909"
+
+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"
+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 AS LD CC CPP AR RANLIB NM STRIP OBJCOPY OBJDUMP; 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
+}

recipes-extended/xen/xen_4.6.0.bb line 51

Quoted 10 lines
recipes-extended/xen/xen_4.6.0.bb new file +10 -0
+
+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
+
+    if [ -e ${D}${systemd_unitdir}/system/xen-qemu-dom0-disk-backend.service ]; then
+        sed -i 's#ExecStart=.*qemu-system-i386\(.*\)$#ExecStart=/usr/bin/qemu-system-i386\1#' \
+            ${D}${systemd_unitdir}/system/xen-qemu-dom0-disk-backend.service
+    fi
+}

Any reason why you can't work with upstream on a solution to the headers cross compile issue?

Signature · 1 line
Doug Goldstein
#4 lore raw

Re: [PATCH 3/4] xen: uprev to 4.6.0

Quoted 3 lines · Doug Goldstein

Any reason why you can't work with upstream on a solution to the headers cross compile issue?

I wouldn't declare that it is a bug, but it sounded like upstream just wasn't "finished" yet. If you look at the commit that introduced it, it was deemed to be "simplistic" and was meant only for native builds.

commit 6f1d3ce238905fc7b4c563a3611576ca25a09a49

Author: Keir Fraser <[email protected]>
Date:   Wed Jun 17 07:21:03 2009 +0100

Introduce mechanism to check standard conformance of headers

While pretty simplistic, it appears to serve the purpose at the moment (i.e. it spotted two places where a GNU extension was used withou proper preprocessor conditionals). The "simplistic" here includes that the checking gets only done for native builds, and ia64 gets excluded due to its arch-specific header intentionally (for whatever reason) checking that anonymous struct/unions can be used.

Since it appeared to be a sanity check (for developers?), I didn't think it was worth digging in too far.

But since you asked!! I did revisit and it actually looks like the root problem was that CXX is being dropping its OE cross flags (most importantly, --sysroot).

It appears that CXX needs to be added to the list of variables updated in ${S}/config/StdGNU.mk. I'll fix that and post a v2 shortly :)

Thanks!
-Chris

#5 lore raw

Re: [PATCH 3/4] xen: uprev to 4.6.0

Quoted 33 lines · Chris Patterson
Quoted 3 lines · Doug Goldstein

Any reason why you can't work with upstream on a solution to the headers cross compile issue?

I wouldn't declare that it is a bug, but it sounded like upstream just wasn't "finished" yet. If you look at the commit that introduced it, it was deemed to be "simplistic" and was meant only for native builds.

commit 6f1d3ce238905fc7b4c563a3611576ca25a09a49

Author: Keir Fraser <[email protected]>
Date:   Wed Jun 17 07:21:03 2009 +0100

Introduce mechanism to check standard conformance of headers

While pretty simplistic, it appears to serve the purpose at the moment (i.e. it spotted two places where a GNU extension was used withou proper preprocessor conditionals). The "simplistic" here includes that the checking gets only done for native builds, and ia64 gets excluded due to its arch-specific header intentionally (for whatever reason) checking that anonymous struct/unions can be used.

Since it appeared to be a sanity check (for developers?), I didn't think it was worth digging in too far.

But since you asked!! I did revisit and it actually looks like the root problem was that CXX is being dropping its OE cross flags (most importantly, --sysroot).

Quoted 6 lines

It appears that CXX needs to be added to the list of variables updated in ${S}/config/StdGNU.mk. I'll fix that and post a v2 shortly :)

Thanks!
-Chris

So actually the only variables that should be sed'd are LD, CC, CPP, and CXX. I actually tracked this down a while back and I've got a patchset that needs to be submitted that contains a number of fixes for 4.6 as well.

Signature · 1 line
Doug Goldstein
#6 lore raw

Re: [PATCH 3/4] xen: uprev to 4.6.0

Quoted 37 lines · Doug Goldstein
Quoted 36 lines · Chris Patterson
Quoted 3 lines · Doug Goldstein

Any reason why you can't work with upstream on a solution to the headers cross compile issue?

I wouldn't declare that it is a bug, but it sounded like upstream just wasn't "finished" yet. If you look at the commit that introduced it, it was deemed to be "simplistic" and was meant only for native builds.

commit 6f1d3ce238905fc7b4c563a3611576ca25a09a49

Author: Keir Fraser <[email protected]>
Date:   Wed Jun 17 07:21:03 2009 +0100

Introduce mechanism to check standard conformance of headers

While pretty simplistic, it appears to serve the purpose at the moment (i.e. it spotted two places where a GNU extension was used withou proper preprocessor conditionals). The "simplistic" here includes that the checking gets only done for native builds, and ia64 gets excluded due to its arch-specific header intentionally (for whatever reason) checking that anonymous struct/unions can be used.

Since it appeared to be a sanity check (for developers?), I didn't think it was worth digging in too far.

But since you asked!! I did revisit and it actually looks like the root problem was that CXX is being dropping its OE cross flags (most importantly, --sysroot).

It appears that CXX needs to be added to the list of variables updated in ${S}/config/StdGNU.mk. I'll fix that and post a v2 shortly :)

Quoted 8 lines
Quoted 3 lines

Thanks!
-Chris

So actually the only variables that should be sed'd are LD, CC, CPP, and CXX. I actually tracked this down a while back and I've got a patchset that needs to be submitted that contains a number of fixes for 4.6 as well.

I just pushed my most recent branch. Feel free to grab any bits from here for a v2.

https://github.com/cardoe/meta-virtualization/commits/xen-fixes

Signature · 1 line
Doug Goldstein
#8 lore raw

Re: [PATCH 3/4] xen: uprev to 4.6.0

In reply to Chris Patterson
Quoted 121 lines · Chris Patterson

- Fixup LICENSE checksum.
- Add patch to skip a check that breaks in cross-compile environments.
- Drop udev package that has been removed.

---
 recipes-extended/xen/files/skip-headers.chk.patch |   48 +++++++++++++++++++
 recipes-extended/xen/xen.inc                      |   13 +-----
 recipes-extended/xen/xen_4.5.0.bb                 |   50 --------------------
 recipes-extended/xen/xen_4.6.0.bb                 |   51 +++++++++++++++++++++
 4 files changed, 100 insertions(+), 62 deletions(-)
 create mode 100644 recipes-extended/xen/files/skip-headers.chk.patch
 delete mode 100644 recipes-extended/xen/xen_4.5.0.bb
 create mode 100644 recipes-extended/xen/xen_4.6.0.bb
recipes-extended/xen/files/skip-headers.chk.patch new file +48 -0
new file mode 100644
index 0000000..19ce7bf
@@ -0,0 +1,48 @@
+commit 162c1db56f3126f392269cb81808657e55c395e5
+Author: Chris Patterson <[email protected]>
+Date:   Mon Dec 21 19:49:43 2015 -0500
+
+    Makefile: remove headers.chk which breaks in cross compilation environments
+    
+    Signed-off-by: Chris Patterson <[email protected]>
+
+diff --git a/xen/include/Makefile b/xen/include/Makefile
+index 94ba3d8..dd51d5b 100644
+--- a/xen/include/Makefile
++++ b/xen/include/Makefile
+@@ -87,35 +87,5 @@ compat/xlat.h: $(addprefix compat/.xlat/,$(xlat-y)) Makefile
+ 	cat $(filter %.h,$^) >[email protected]
+ 	mv -f [email protected] $@
+ 
+-ifeq ($(XEN_TARGET_ARCH),$(XEN_COMPILE_ARCH))
+-
+-all: headers.chk headers++.chk
+-
+-PUBLIC_HEADERS := $(filter-out public/arch-% public/dom0_ops.h, $(wildcard public/*.h public/*/*.h) $(public-y))
+-
+-PUBLIC_ANSI_HEADERS := $(filter-out public/%ctl.h public/xsm/% public/%hvm/save.h, $(PUBLIC_HEADERS))
+-
+-headers.chk: $(PUBLIC_ANSI_HEADERS) Makefile
+-	for i in $(filter %.h,$^); do \
+-	    $(CC) -x c -ansi -Wall -Werror -include stdint.h \
+-	          -S -o /dev/null $$i || exit 1; \
+-	    echo $$i; \
+-	done >[email protected]
+-	mv [email protected] $@
+-
+-headers++.chk: $(PUBLIC_HEADERS) Makefile
+-	if $(CXX) -v >/dev/null 2>&1; then \
+-	    for i in $(filter %.h,$^); do \
+-	        echo '#include "'$$i'"' \
+-	        | $(CXX) -x c++ -std=gnu++98 -Wall -Werror -D__XEN_TOOLS__ \
+-	          -include stdint.h -include public/xen.h -S -o /dev/null - \
+-	        || exit 1; \
+-	        echo $$i; \
+-	    done ; \
+-	fi >[email protected]
+-	mv [email protected] $@
+-
+-endif
+-
+ clean::
+ 	rm -rf compat headers.chk headers++.chk
recipes-extended/xen/xen.inc +1 -7
index 00f1823..c1be16d 100644
@@ -3,7 +3,7 @@ HOMEPAGE = "http://xen.org"
 LICENSE = "GPLv2"
 SECTION = "console/tools"
 
-LIC_FILES_CHKSUM = "file://COPYING;md5=e0f0f3ac55608719a82394cc353928df"
+LIC_FILES_CHKSUM = "file://COPYING;md5=a6260c12cd5de27e80d89ae18e48d20a"
 
 COMPATIBLE_HOST = '(x86_64.*).*-linux|aarch64.*-linux'
 
@@ -69,7 +69,6 @@ RDEPENDS_${PN}-base = "\
     ${PN}-fsimage \
     ${PN}-scripts-block \
     ${PN}-scripts-network \
-    ${PN}-udev \
     ${PN}-xen-watchdog \
     ${PN}-xencommons \
     ${PN}-xendomains \
@@ -99,7 +98,6 @@ RDEPENDS_${PN}-remus = "python"
 RDEPENDS_${PN}-scripts-block = "\
     bash \
     ${PN}-scripts-common \
-    ${PN}-udev \
     ${PN}-volatiles \
     "
 
@@ -109,12 +107,9 @@ RDEPENDS_${PN}-scripts-network = "\
     bash \
     bridge-utils \
     ${PN}-scripts-common \
-    ${PN}-udev \
     ${PN}-volatiles \
     "
 
-RDEPENDS_${PN}-udev = "udev"
-
 RDEPENDS_${PN}-xencommons = "\
     bash \
     ${PN}-console \
@@ -182,7 +177,6 @@ PACKAGES = "\
     ${PN}-scripts-common \
     ${PN}-scripts-network \
     ${PN}-staticdev \
-    ${PN}-udev \
     ${PN}-volatiles \
     ${PN}-xcutils \
     ${PN}-xencommons \
@@ -512,11 +506,6 @@ FILES_${PN}-scripts-common = " \
     ${sysconfdir}/xen/scripts/xen-script-common.sh \

recipes-extended/xen/xen.inc FILES_${PN}-scripts-common = " \ · line 511

Quoted 10 lines
recipes-extended/xen/xen.inc +0 -5
     "
 
-FILES_${PN}-udev = "\
-    ${sysconfdir}/udev/rules.d/xen-backend.rules \
-    ${sysconfdir}/udev/rules.d/xend.rules \
-    "
-
 FILES_${PN}-volatiles = "\
     ${sysconfdir}/default/volatiles/99_xen \
     ${sysconfdir}/tmpfiles.d/xen.conf \

The dependency updates here aren't actually correct. You've dropped the udev rules but failed to capture the devd bits.

Quoted 114 lines
recipes-extended/xen/xen_4.5.0.bb deleted +0 -50
deleted file mode 100644
index 6c17b90..0000000
@@ -1,50 +0,0 @@
-require xen.inc
-
-SRC_URI = " \
-    http://bits.xensource.com/oss-xen/release/${PV}/xen-${PV}.tar.gz \
-    file://xen-x86-Fix-up-rules-when-forcing-mno-sse.patch \
-    "
-
-SRC_URI[md5sum] = "9bac43d2419d05a647064d9253bb03fa"
-SRC_URI[sha256sum] = "5bdb40e2b28d2eeb541bd71a9777f40cbe2ae444b987521d33f099541a006f3b"
-
-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"
-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 AS LD CC CPP AR RANLIB NM STRIP OBJCOPY OBJDUMP; 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
-
-    if [ -e ${D}${systemd_unitdir}/system/xen-qemu-dom0-disk-backend.service ]; then
-        sed -i 's#ExecStart=.*qemu-system-i386\(.*\)$#ExecStart=/usr/bin/qemu-system-i386\1#' \
-            ${D}${systemd_unitdir}/system/xen-qemu-dom0-disk-backend.service
-    fi
-}
recipes-extended/xen/xen_4.6.0.bb new file +51 -0
new file mode 100644
index 0000000..1c84a6f
@@ -0,0 +1,51 @@
+require xen.inc
+
+SRC_URI = " \
+    http://bits.xensource.com/oss-xen/release/${PV}/xen-${PV}.tar.gz \
+    file://xen-x86-Fix-up-rules-when-forcing-mno-sse.patch \
+    file://skip-headers.chk.patch \
+    "
+
+SRC_URI[md5sum] = "48e232f90927c08326a7b52bb06f49bc"
+SRC_URI[sha256sum] = "6fa1c2431df55aa5950d248e6093b8c8c0f11c357a0adbd348a2186478e80909"
+
+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"
+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 AS LD CC CPP AR RANLIB NM STRIP OBJCOPY OBJDUMP; 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
+
+    if [ -e ${D}${systemd_unitdir}/system/xen-qemu-dom0-disk-backend.service ]; then
+        sed -i 's#ExecStart=.*qemu-system-i386\(.*\)$#ExecStart=/usr/bin/qemu-system-i386\1#' \
+            ${D}${systemd_unitdir}/system/xen-qemu-dom0-disk-backend.service
+    fi
+}
Signature · 1 line
Doug Goldstein
#9 lore raw

Re: [PATCH 3/4] xen: uprev to 4.6.0

Quoted 5 lines · Doug Goldstein

The dependency updates here aren't actually correct. You've dropped the udev rules but failed to capture the devd bits.

Yes, you are right. I compared the list of systemd services and failed to do the same for the init scripts (which added xendriverdomain).

I'll add xendriverdomain to v2, then afterwards provide add an equivalent systemd service (as there is no upstream unit).

#10 lore raw

Re: [PATCH 3/4] xen: uprev to 4.6.0

Quoted 7 lines · Chris Patterson
Quoted 5 lines · Doug Goldstein

The dependency updates here aren't actually correct. You've dropped the udev rules but failed to capture the devd bits.

Quoted 7 lines

Yes, you are right. I compared the list of systemd services and failed to do the same for the init scripts (which added xendriverdomain).

I'll add xendriverdomain to v2, then afterwards provide add an equivalent systemd service (as there is no upstream unit).

Please submit the systemd service upstream if you would. That's been on my TODO list to do for a while.

Signature · 1 line
Doug Goldstein
#11 lore raw

Re: [PATCH 3/4] xen: uprev to 4.6.0

Quoted 4 lines · Doug Goldstein

Please submit the systemd service upstream if you would. That's been on my TODO list to do for a while.

Will do.

#12 lore raw

PATCH 4/4 xen: empty out rdepends for xen-dev to lose QA warning

In reply to Chris Patterson

It appears that it defaults to rdepend on xen, causing a QA error:
WARNING: QA Issue: xen-dev rdepends on xen,
but it isn't a build dependency? [build-deps]

---
 recipes-extended/xen/xen.inc |    2 ++
 1 file changed, 2 insertions(+)
recipes-extended/xen/xen.inc +2 -0
index c1be16d..1bacf38 100644
@@ -77,6 +77,8 @@ RDEPENDS_${PN}-base = "\
     ${PN}-xl \
     "
 
+RDEPENDS_${PN}-dev = ""
+
 RRECOMMENDS_${PN}-base = " \
     ${PN}-libblktap \
     ${PN}-flask \
Signature · 1 line
1.7.10.4
#13 lore raw
In reply to Chris Patterson

Ignore this, I switched machine targets and realized I should have kept CONFIG_PARAVIRT=y. Will update. :)

Thanks!

Quoted 51 lines · Chris Patterson
---
 recipes-kernel/linux/linux-yocto/xen.cfg |   20 +++++++-------------
 1 file changed, 7 insertions(+), 13 deletions(-)
recipes-kernel/linux/linux-yocto/xen.cfg +7 -14
index 4e796b9..206b162 100644
@@ -1,27 +1,18 @@
-###
-# linux 3.4, 3.8
-CONFIG_PARAVIRT_GUEST=y
-###
-
-###
-# linux 3.10
-CONFIG_HYPERVISOR_GUEST=y
-###
-
-CONFIG_PARAVIRT=y
 CONFIG_XEN=y
 CONFIG_XEN_DOM0=y
-CONFIG_XEN_PRIVILEGED_GUEST=y
 CONFIG_XEN_PVHVM=y
 CONFIG_XEN_MAX_DOMAIN_MEMORY=500
 CONFIG_XEN_SAVE_RESTORE=y
-CONFIG_PARAVIRT_CLOCK=y
+# CONFIG_XEN_DEBUG_FS is not set
+CONFIG_XEN_PVH=y
+CONFIG_MMU_NOTIFIER=y
 CONFIG_HIBERNATE_CALLBACKS=y
 CONFIG_PCI_XEN=y
 CONFIG_XEN_PCIDEV_FRONTEND=y
 CONFIG_SYS_HYPERVISOR=y
 CONFIG_XEN_BLKDEV_FRONTEND=y
 CONFIG_XEN_BLKDEV_BACKEND=m
+CONFIG_XEN_SCSI_FRONTEND=m
 CONFIG_XEN_NETDEV_FRONTEND=y
 CONFIG_XEN_NETDEV_BACKEND=m
 CONFIG_INPUT_MISC=y
@@ -52,3 +43,6 @@ CONFIG_XEN_PRIVCMD=y
 CONFIG_XEN_ACPI_PROCESSOR=m
 CONFIG_XEN_MCE_LOG=y
 CONFIG_XEN_HAVE_PVMMU=y
+CONFIG_XEN_EFI=y
+CONFIG_XEN_AUTO_XLATE=y
+CONFIG_XEN_ACPI=y
--

1.7.10.4