Skip to contentSkip to conversation

xen, xen-tools: patch and recipe fixes

PATCH In review Christopher Clark 2 participants 4 messages Jul 7, 2020 – Jul 9, 2020

lore
Share & tools
lore
#0 lore raw

cover xen, xen-tools: patch and recipe fixes

These two patches are to be applied on top of v2 of the previously-posted "Xen on Raspberry Pi 4" series:
https://lists.yoctoproject.org/g/meta-virtualization/message/5495

The first patch in this additional series here applies a new upstream patch to a fix a previous patch that has been imported from upstream, and the second is a minor recipe fix.

Christopher Clark (2):
xen-tools: apply kdd tool patch
xen, xen-tools: configure: install defconfig to ${S} not ${B}

 ...xen-build-temporarily-inhibit-Werror.patch | 12 ------
 .../files/xen-tools-kdd-fix-build-again.patch | 39 +++++++++++++++++++
 recipes-extended/xen/xen-tools_git.bb         |  1 +
 recipes-extended/xen/xen.inc                  |  2 +-
 4 files changed, 41 insertions(+), 13 deletions(-)
 create mode 100644 recipes-extended/xen/files/xen-tools-kdd-fix-build-again.patch
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/2 xen-tools: apply kdd tool patch

Apply an upstream Xen Release-acked patch to fix kdd debugger and remove the temporary inhibit of Werror on building that tool.

---
 ...xen-build-temporarily-inhibit-Werror.patch | 12 ------
 .../files/xen-tools-kdd-fix-build-again.patch | 39 +++++++++++++++++++
 recipes-extended/xen/xen-tools_git.bb         |  1 +
 3 files changed, 40 insertions(+), 12 deletions(-)
 create mode 100644 recipes-extended/xen/files/xen-tools-kdd-fix-build-again.patch
recipes-extended/xen/files/0001-xen-build-temporarily-inhibit-Werror.patch +0 -12
index 6e43a4f..ba97c4b 100644
@@ -40,15 +40,3 @@ index a151b3f625..a05ceec1e5 100644
 -- 
 2.19.1
 
-diff --git a/tools/debugger/kdd/Makefile b/tools/debugger/kdd/Makefile
-index 26116949d4..a72ad3b1e0 100644
---- a/tools/debugger/kdd/Makefile
-+++ b/tools/debugger/kdd/Makefile
-@@ -1,7 +1,6 @@
- XEN_ROOT = $(CURDIR)/../../..
- include $(XEN_ROOT)/tools/Rules.mk
- 
--CFLAGS  += -Werror
- CFLAGS  += $(CFLAGS_libxenctrl)
- CFLAGS  += -DXC_WANT_COMPAT_MAP_FOREIGN_API
- LDLIBS  += $(LDLIBS_libxenctrl)
recipes-extended/xen/files/xen-tools-kdd-fix-build-again.patch new file +39 -0
new file mode 100644
index 0000000..6122999
@@ -0,0 +1,39 @@
+From d44cbbe0f3243afcc56e47dcfa97bbfe23e46fbb Mon Sep 17 00:00:00 2001
+From: Wei Liu <[email protected]>
+Date: Fri, 3 Jul 2020 20:10:01 +0000
+Subject: [PATCH] kdd: fix build again
+
+Restore Tim's patch. The one that was committed was recreated by me
+because git didn't accept my saved copy. I made some mistakes while
+recreating that patch and here we are.
+
+Fixes: 3471cafbdda3 ("kdd: stop using [0] arrays to access packet contents")
+Reported-by: Michael Young <[email protected]>
+Signed-off-by: Wei Liu <[email protected]>
+Reviewed-by: Tim Deegan <[email protected]>
+Release-acked-by: Paul Durrant <[email protected]>
+---
+ tools/debugger/kdd/kdd.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/tools/debugger/kdd/kdd.c b/tools/debugger/kdd/kdd.c
+index 866532f0c7..a7d0976ea4 100644
+--- a/tools/debugger/kdd/kdd.c
++++ b/tools/debugger/kdd/kdd.c
+@@ -79,11 +79,11 @@ typedef struct {
+ /* State of the debugger stub */
+ typedef struct {
+     union {
+-        uint8_t txb[sizeof (kdd_hdr)];           /* Marshalling area for tx */
++        uint8_t txb[sizeof (kdd_pkt)];           /* Marshalling area for tx */
+         kdd_pkt txp;                 /* Also readable as a packet structure */
+     };
+     union {
+-        uint8_t rxb[sizeof (kdd_hdr)];           /* Marshalling area for rx */
++        uint8_t rxb[sizeof (kdd_pkt)];           /* Marshalling area for rx */
+         kdd_pkt rxp;                 /* Also readable as a packet structure */
+     };
+     unsigned int cur;       /* Offset into rx where we'll put the next byte */
+-- 
+2.17.1
+
recipes-extended/xen/xen-tools_git.bb +1 -0
index 5f41915..679feb1 100644
@@ -8,6 +8,7 @@ SRC_URI = " \
     file://0001-python-pygrub-pass-DISTUTILS-xen.4.12.patch \
     file://0001-xen-build-temporarily-inhibit-Werror.patch \
     file://xen-tools-kdd-stop-using-0-arrays-to-access-packet-contents.patch \
+    file://xen-tools-kdd-fix-build-again.patch \
     "
 
 LIC_FILES_CHKSUM ?= "file://COPYING;md5=4295d895d4b5ce9d070263d52f030e49"
Signature · 1 line
2.17.1
#2 lore raw

PATCH 2/2 xen, xen-tools: configure: install defconfig to ${S} not ${B}

In reply to Christopher Clark
---
 recipes-extended/xen/xen.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
recipes-extended/xen/xen.inc +1 -1
index 2a02805..58b57e5 100644
@@ -213,7 +213,7 @@ do_configure_common() {
     fi
 
     if [ -f "${WORKDIR}/defconfig" ]; then
-        cp "${WORKDIR}/defconfig" "${B}/xen/.config" || \
+        cp "${WORKDIR}/defconfig" "${S}/xen/.config" || \
         bbfatal "Unable to copy defconfig to .config"
     fi
 
Signature · 1 line
2.17.1
#3 lore raw
In reply to Christopher Clark
Quoted 8 lines · Christopher Clark

These two patches are to be applied on top of v2 of the previously-posted "Xen on Raspberry Pi 4" series:
https://lists.yoctoproject.org/g/meta-virtualization/message/5495

The first patch in this additional series here applies a new upstream patch to a fix a previous patch that has been imported from upstream, and the second is a minor recipe fix.

merged.

Bruce

Quoted 15 lines

Christopher Clark (2):
xen-tools: apply kdd tool patch
xen, xen-tools: configure: install defconfig to ${S} not ${B}

 ...xen-build-temporarily-inhibit-Werror.patch | 12 ------
 .../files/xen-tools-kdd-fix-build-again.patch | 39 +++++++++++++++++++
 recipes-extended/xen/xen-tools_git.bb         |  1 +
 recipes-extended/xen/xen.inc                  |  2 +-
 4 files changed, 41 insertions(+), 13 deletions(-)
 create mode 100644 recipes-extended/xen/files/xen-tools-kdd-fix-build-again.patch

--
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