xen-tools: packaging for new files in Xen 4.14
PATCH 1/4 xen-tools: packaging for new files in Xen 4.14
From: Christopher Clark <[email protected]>
--- recipes-extended/xen/xen-tools.inc | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+)
recipes-extended/xen/xen-tools.inc +25 -0
@@ -64,9 +64,12 @@ RRECOMMENDS_${PN} = " \ ${@bb.utils.contains('PACKAGECONFIG', 'externalblktap', '', '${BLKTAP_RRECOMMENDS}', d)} \ ${PN}-flask \ ${PN}-hvmloader \ + ${PN}-libxenhypfs \ ${PN}-shim \ ${PN}-ucode \ + ${PN}-vchan \ ${PN}-xenpaging \ + ${PN}-xenhypfs \ " RDEPENDS_${PN}-devd = " \
@@ -137,6 +140,10 @@ RDEPENDS_${PN}-xendomains = "\ virtual/xenstored \ " +RDEPENDS_${PN}-xenhypfs = " \ + ${PN}-libxenhypfs \ + " + RDEPENDS_${PN}-xl = "libgcc" RDEPENDS_${PN}-xenmon = " \
@@ -179,6 +186,8 @@ PACKAGES = " \ ${PN}-libxengnttab-dev \ ${PN}-libxenguest \ ${PN}-libxenguest-dev \ + ${PN}-libxenhypfs \ + ${PN}-libxenhypfs-dev \ ${PN}-libxenlight \ ${PN}-libxenlight-dev \ ${PN}-libxenstat \
@@ -204,6 +213,7 @@ PACKAGES = " \ ${PN}-shim \ ${PN}-staticdev \ ${PN}-ucode \ + ${PN}-vchan \ ${PN}-volatiles \ ${PN}-xcutils \ ${PN}-xencommons \
@@ -211,6 +221,7 @@ PACKAGES = " \ ${PN}-xend \ ${PN}-xend-examples \ ${PN}-xendomains \ + ${PN}-xenhypfs \ ${PN}-xenmon \ ${PN}-xenpaging \ ${PN}-xenpmd \
@@ -324,6 +335,12 @@ FILES_${PN}-libxenguest-dev = " \ ${datadir}/pkgconfig/xenguest.pc \ " +FILES_${PN}-libxenhypfs = "${libdir}/libxenhypfs.so.*" +FILES_${PN}-libxenhypfs-dev = " \ + ${libdir}/libxenhypfs.so \ + ${libdir}/pkgconfig/xenhypfs.pc \ + " + FILES_${PN}-libxenlight = "${libdir}/libxenlight.so.*" FILES_${PN}-libxenlight-dev = " \ ${libdir}/libxenlight.so \
@@ -535,6 +552,10 @@ FILES_${PN}-ucode = "\ ${sbindir}/xen-ucode \ " +FILES_${PN}-vchan = "\ + ${bindir}/vchan-socket-proxy \ + " + FILES_${PN}-volatiles = "\ ${sysconfdir}/default/volatiles/99_xen \ ${sysconfdir}/tmpfiles.d/xen.conf \
@@ -557,6 +578,10 @@ FILES_${PN}-xend-examples = "\ ${sysconfdir}/xen/xend-pci-quirks.sxp \ " +FILES_${PN}-xenhypfs = "\ + ${sbindir}/xenhypfs \ + " + FILES_${PN}-xenpaging = "\ ${libdir}/xen/bin/xenpaging \ ${localstatedir}/lib/xen/xenpaging \
Signature · 1 line
2.17.1
PATCH 2/4 xen, xen-tools: add recipes for Xen 4.14
From: Christopher Clark <[email protected]>
Add a versioned-suffix pair of recipes for Xen 4.14, allowing selection of which Xen version to build via setting PREFERRED_VERSION.
4.14 is currently still pre-release, so the new recipes for it set DEFAULT_PREFERENCE to -1, and the default for now remains the existing stable version. Forward ports of patches needed for 4.14 are included.
Implementation note: since both this version and the git recipe are built from git branches -- important for Xen since significant updates are made available there inbetween point releases -- the recipe includes 'stable' as a string in PV so as to distinguish it from 'git' in the git recipe, and thereby allow PREFERRED_VERSION to select the correct recipe in the situation where both happen to be configured with the same XEN_REL.
--- ...ython-pygrub-pass-DISTUTILS-xen-4.14.patch | 66 +++++++++++++++++++ ...uild-temporarily-inhibit-Werror-4.14.patch | 26 ++++++++ recipes-extended/xen/xen-tools_4.14.bb | 21 ++++++ recipes-extended/xen/xen_4.14.bb | 20 ++++++ 4 files changed, 133 insertions(+) create mode 100644 recipes-extended/xen/files/0001-python-pygrub-pass-DISTUTILS-xen-4.14.patch create mode 100644 recipes-extended/xen/files/0001-xen-build-temporarily-inhibit-Werror-4.14.patch create mode 100644 recipes-extended/xen/xen-tools_4.14.bb create mode 100644 recipes-extended/xen/xen_4.14.bb
recipes-extended/xen/files/0001-python-pygrub-pass-DISTUTILS-xen-4.14.patch new file +66 -0
@@ -0,0 +1,66 @@ +From d79dcc2002008c58683de82f06c168d6eea57991 Mon Sep 17 00:00:00 2001 +From: Maciej Pijanowski <[email protected]> +Date: Fri, 19 Oct 2018 11:01:37 +0200 +Subject: [PATCH] python,pygrub: pass DISTUTILS env vars as setup.py args + +Allow to respect the target install dir (PYTHON_SITEPACKAGES_DIR) +as well as other parameters set by the OpenEmbedded build system. +This is especially useful when the target libdir is not the default one +(/usr/lib), but for example /usr/lib64. + +Signed-off-by: Maciej Pijanowski <[email protected]> + +Forward-ported to Xen 4.12.0 +Signed-off-by: Christopher Clark <[email protected]> + +Modified to support pygrub installation with python 3 +Signed-off-by: Christopher Clark <[email protected]> + +Forward-ported to Xen 4.14.0 +Signed-off-by: Christopher Clark <[email protected]> +diff --git a/tools/pygrub/Makefile b/tools/pygrub/Makefile +index 3063c49..513314b 100644 +--- a/tools/pygrub/Makefile ++++ b/tools/pygrub/Makefile +@@ -10,14 +10,17 @@ INSTALL_LOG = build/installed_files.txt + all: build + .PHONY: build + build: +- CC="$(CC)" CFLAGS="$(PY_CFLAGS)" LDFLAGS="$(PY_LDFLAGS)" $(PYTHON) setup.py build ++ CC="$(CC)" CFLAGS="$(PY_CFLAGS)" LDFLAGS="$(PY_LDFLAGS)" $(PYTHON) setup.py build $(DISTUTILS_BUILD_ARGS) + + .PHONY: install + install: all + $(INSTALL_DIR) $(DESTDIR)/$(bindir) + CC="$(CC)" CFLAGS="$(PY_CFLAGS)" LDFLAGS="$(PY_LDFLAGS)" $(PYTHON) \ + setup.py install --record $(INSTALL_LOG) $(PYTHON_PREFIX_ARG) \ +- --root="$(DESTDIR)" --install-scripts=$(LIBEXEC_BIN) --force ++ --root="$(DESTDIR)" --install-scripts=$(LIBEXEC_BIN) --force \ ++ $(DISTUTILS_INSTALL_ARGS) ++ rm -f $(DESTDIR)/$(LIBEXEC_BIN)/pygrub ++ $(INSTALL_PYTHON_PROG) src/pygrub $(DESTDIR)/$(LIBEXEC_BIN)/pygrub + set -e; if [ $(bindir) != $(LIBEXEC_BIN) -a \ + "`readlink -f $(DESTDIR)/$(bindir)`" != \ + "`readlink -f $(LIBEXEC_BIN)`" ]; then \ +diff --git a/tools/python/Makefile b/tools/python/Makefile +index 541858e..4d4a344 100644 +--- a/tools/python/Makefile ++++ b/tools/python/Makefile +@@ -10,7 +10,7 @@ INSTALL_LOG = build/installed_files.txt + + .PHONY: build + build: +- CC="$(CC)" CFLAGS="$(PY_CFLAGS)" $(PYTHON) setup.py build ++ CC="$(CC)" CFLAGS="$(PY_CFLAGS)" $(PYTHON) setup.py build $(DISTUTILS_BUILD_ARGS) + + .PHONY: install + install: +@@ -18,7 +18,7 @@ install: + + CC="$(CC)" CFLAGS="$(PY_CFLAGS)" LDFLAGS="$(PY_LDFLAGS)" $(PYTHON) \ + setup.py install --record $(INSTALL_LOG) $(PYTHON_PREFIX_ARG) \ +- --root="$(DESTDIR)" --force ++ --root="$(DESTDIR)" --force $(DISTUTILS_INSTALL_ARGS) + + $(INSTALL_PYTHON_PROG) scripts/convert-legacy-stream $(DESTDIR)$(LIBEXEC_BIN) + $(INSTALL_PYTHON_PROG) scripts/verify-stream-v2 $(DESTDIR)$(LIBEXEC_BIN)
recipes-extended/xen/files/0001-xen-build-temporarily-inhibit-Werror-4.14.patch new file +26 -0
@@ -0,0 +1,26 @@ +From 9cff3bf8425ccc593825fcde8ca5eaa32a43d04d Mon Sep 17 00:00:00 2001 +From: Bruce Ashfield <[email protected]> +Date: Thu, 18 Jun 2020 09:05:22 -0400 +Subject: [PATCH] xen/build: temporarily inhibit Werror + +Signed-off-by: Bruce Ashfield <[email protected]> +Rebased on Xen 4.14: +Signed-off-by: Christopher Clark <[email protected]> +--- + tools/libxl/Makefile | 2 +- + xen/Rules.mk | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/tools/libxl/Makefile b/tools/libxl/Makefile +index 6da342ed61..c67560e269 100644 +--- a/tools/libxl/Makefile ++++ b/tools/libxl/Makefile +@@ -11,7 +11,7 @@ MINOR = 0 + XLUMAJOR = 4.14 + XLUMINOR = 0 + +-CFLAGS += -Werror -Wno-format-zero-length -Wmissing-declarations \ ++CFLAGS += -Wno-format-zero-length -Wmissing-declarations \ + -Wno-declaration-after-statement -Wformat-nonliteral + CFLAGS += -I. -fPIC +
recipes-extended/xen/xen-tools_4.14.bb new file +21 -0
@@ -0,0 +1,21 @@ +SRCREV ?= "02d69864b51a4302a148c28d6d391238a6778b4b" + +XEN_REL ?= "4.14" +XEN_BRANCH ?= "stable-${XEN_REL}" + +SRC_URI = " \ + git://xenbits.xen.org/xen.git;branch=${XEN_BRANCH} \ + file://0001-python-pygrub-pass-DISTUTILS-xen-4.14.patch \ + file://0001-xen-build-temporarily-inhibit-Werror-4.14.patch \ + " + +LIC_FILES_CHKSUM ?= "file://COPYING;md5=419739e325a50f3d7b4501338e44a4e5" + +PV = "${XEN_REL}+stable${SRCPV}" + +S = "${WORKDIR}/git" + +DEFAULT_PREFERENCE ??= "-1" + +require xen.inc +require xen-tools.inc
recipes-extended/xen/xen_4.14.bb new file +20 -0
@@ -0,0 +1,20 @@ +SRCREV ?= "02d69864b51a4302a148c28d6d391238a6778b4b" + +XEN_REL ?= "4.14" +XEN_BRANCH ?= "stable-${XEN_REL}" + +SRC_URI = " \ + git://xenbits.xen.org/xen.git;branch=${XEN_BRANCH} \ + file://xen-arm64-implement-atomic-fetch-add.patch \ + " + +LIC_FILES_CHKSUM ?= "file://COPYING;md5=419739e325a50f3d7b4501338e44a4e5" + +PV = "${XEN_REL}+stable${SRCPV}" + +S = "${WORKDIR}/git" + +DEFAULT_PREFERENCE ??= "-1" + +require xen.inc +require xen-hypervisor.inc
Signature · 1 line
2.17.1
PATCH 3/4 xen: drop vars that duplicate hvc console from the r-pi4 config
In reply to Christopher ClarkFrom: Christopher Clark <[email protected]>
These settings are not needed here. Serial configuration is done in the bsp layer. Tested and working on the Raspberry Pi 4.
--- conf/distro/include/meta-virt-xen.inc | 3 --- 1 file changed, 3 deletions(-)
conf/distro/include/meta-virt-xen.inc +0 -3
@@ -6,9 +6,6 @@ PACKAGECONFIG_append_pn-qemu_arm = " fdt" PACKAGECONFIG_append_pn-qemu_aarch64 = " fdt" # Raspberry Pi settings -# - Xen guest console -KERNEL_CONSOLE = "hvc0" -SERIAL_CONSOLES = "115200;hvc0" # - Xen uses u-boot for configuration and uses the uart RPI_USE_U_BOOT = "1" ENABLE_UART = "1"
Signature · 1 line
2.17.1
Re: [PATCH 3/4] xen: drop vars that duplicate hvc console from the r-pi4 config
Hi Christopher ,
Can you please provide some inputs for :
- To build xen-image-minimal using *master branch of meta-virtualization* Whats the branch suggested to be used for layers ( meta-openembedded / meta-raspberrypi & poky )
- I am trying dunfell branch ( meta-openembedded / meta-raspberrypi & poky ) *with master branch of meta-virtualization*
Idea is to get image with the latest patches being pushed for XEN & also to understand setup being used by community.
Thanks ,
Ashish
Re: [meta-virtualization] [PATCH 3/4] xen: drop vars that duplicate hvc console from the r-pi4 config
Quoted 6 lines · Ashish
Hi Christopher ,
Can you please provide some inputs for :
- To build xen-image-minimal using master branch of meta-virtualization Whats the branch suggested to be used for layers ( meta-openembedded / meta-raspberrypi & poky )
Hi Ashish
I have been building xen-image-minimal using the master branch of each
of: poky, meta-raspberrypi, meta-openembedded and meta-virtualization with the submitted patches applied.
I would recommend doing this if your aim is to develop patches for submissions to this list and inclusion in the next Yocto release, since building it this way will test compatibility of your work with current component versions. It is often more unstable than developing against a release branch though.
Quoted 3 lines
- I am trying dunfell branch ( meta-openembedded / meta-raspberrypi & poky ) with master branch of meta-virtualization
Idea is to get image with the latest patches being pushed for XEN & also to understand setup being used by community.
At the point where a patch series for Xen is posted, you should be able to build and test it with master across each of the repositories.
Christopher
Quoted 7 lines
Thanks ,
Ashish
PATCH 4/4 xen, arm32: filter out unwanted tune flags from CPP as per CC
In reply to Christopher ClarkFrom: Christopher Clark <[email protected]>
Avoids passing the wrong floating point ABI flags to the linker.
--- recipes-extended/xen/xen.inc | 1 + 1 file changed, 1 insertion(+)
recipes-extended/xen/xen.inc +1 -0
@@ -193,6 +193,7 @@ do_post_patch() { do_post_patch_append_arm() { # The hypervisor binary must not be built with the hard floating point ABI. echo "CC := \$(filter-out ${TUNE_CCARGS},\$(CC))" >> ${S}/xen/arch/arm/Rules.mk + echo "CPP := \$(filter-out ${TUNE_CCARGS},\$(CPP))" >> ${S}/xen/arch/arm/Rules.mk } addtask post_patch after do_patch before do_configure
Signature · 1 line
2.17.1
The series has been merged.
Thanks!
Bruce
Quoted 99 lines · On Fri, Jul 17, 2020 at 5:04 PM <[email protected]> wrote:
From: Christopher Clark <[email protected]>
Signed-off-by Christopher Clark <[email protected]>--- recipes-extended/xen/xen-tools.inc | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+)recipes-extended/xen/xen-tools.inc +25
-1@@ -64,9 +64,12 @@ RRECOMMENDS_${PN} = " \ ${@bb.utils.contains('PACKAGECONFIG', 'externalblktap', '', '${BLKTAP_RRECOMMENDS}', d)} \ ${PN}-flask \ ${PN}-hvmloader \ + ${PN}-libxenhypfs \ ${PN}-shim \ ${PN}-ucode \ + ${PN}-vchan \ ${PN}-xenpaging \ + ${PN}-xenhypfs \ " RDEPENDS_${PN}-devd = " \@@ -137,6 +140,10 @@ RDEPENDS_${PN}-xendomains = "\ virtual/xenstored \ " +RDEPENDS_${PN}-xenhypfs = " \ + ${PN}-libxenhypfs \ + " + RDEPENDS_${PN}-xl = "libgcc" RDEPENDS_${PN}-xenmon = " \@@ -179,6 +186,8 @@ PACKAGES = " \ ${PN}-libxengnttab-dev \ ${PN}-libxenguest \ ${PN}-libxenguest-dev \ + ${PN}-libxenhypfs \ + ${PN}-libxenhypfs-dev \ ${PN}-libxenlight \ ${PN}-libxenlight-dev \ ${PN}-libxenstat \@@ -204,6 +213,7 @@ PACKAGES = " \ ${PN}-shim \ ${PN}-staticdev \ ${PN}-ucode \ + ${PN}-vchan \ ${PN}-volatiles \ ${PN}-xcutils \ ${PN}-xencommons \@@ -211,6 +221,7 @@ PACKAGES = " \ ${PN}-xend \ ${PN}-xend-examples \ ${PN}-xendomains \ + ${PN}-xenhypfs \ ${PN}-xenmon \ ${PN}-xenpaging \ ${PN}-xenpmd \@@ -324,6 +335,12 @@ FILES_${PN}-libxenguest-dev = " \ ${datadir}/pkgconfig/xenguest.pc \ " +FILES_${PN}-libxenhypfs = "${libdir}/libxenhypfs.so.*" +FILES_${PN}-libxenhypfs-dev = " \ + ${libdir}/libxenhypfs.so \ + ${libdir}/pkgconfig/xenhypfs.pc \ + " + FILES_${PN}-libxenlight = "${libdir}/libxenlight.so.*" FILES_${PN}-libxenlight-dev = " \ ${libdir}/libxenlight.so \@@ -535,6 +552,10 @@ FILES_${PN}-ucode = "\ ${sbindir}/xen-ucode \ " +FILES_${PN}-vchan = "\ + ${bindir}/vchan-socket-proxy \ + " + FILES_${PN}-volatiles = "\ ${sysconfdir}/default/volatiles/99_xen \ ${sysconfdir}/tmpfiles.d/xen.conf \@@ -557,6 +578,10 @@ FILES_${PN}-xend-examples = "\ ${sysconfdir}/xen/xend-pci-quirks.sxp \ " +FILES_${PN}-xenhypfs = "\ + ${sbindir}/xenhypfs \ + " + FILES_${PN}-xenpaging = "\ ${libdir}/xen/bin/xenpaging \ ${localstatedir}/lib/xen/xenpaging \ --2.17.1
Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end - "Use the force Harry" - Gandalf, Star Trek II