Skip to contentSkip to conversation

xen: uprev to 4.7.0

PATCH In review Chris Patterson 2 participants 2 messages Jul 27, 2016 – Aug 1, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xen: uprev to 4.7.0

From: Chris Patterson <[email protected]>

- update packages and add additional ones for new binaries (cpuid and livepatch)
- update xen_git to point to 4.7, make branch= fully variable, and remove assumed .0 from release version
- add patch to fix compilation of xen with gcc 6 on arm/aarch64

Build tested x86_64 and aarch64 targets.

---
 ...l-compilation-warning-fix-for-arm-aarch64.patch | 58 ++++++++++++++++++++++
 recipes-extended/xen/xen.inc                       | 19 ++++++-
 recipes-extended/xen/xen_4.6.1.bb                  | 10 ----
 recipes-extended/xen/xen_4.7.0.bb                  | 11 ++++
 recipes-extended/xen/xen_git.bb                    |  9 ++--
 5 files changed, 92 insertions(+), 15 deletions(-)
 create mode 100644 recipes-extended/xen/files/libxl-compilation-warning-fix-for-arm-aarch64.patch
 delete mode 100644 recipes-extended/xen/xen_4.6.1.bb
 create mode 100644 recipes-extended/xen/xen_4.7.0.bb
recipes-extended/xen/files/libxl-compilation-warning-fix-for-arm-aarch64.patch new file +58 -0
new file mode 100644
index 0000000..baab928
@@ -0,0 +1,58 @@
+Upstream-Status: Submitted
+
+From 3716a7faf98e1e126d47fe1596593917c27ee1bd Mon Sep 17 00:00:00 2001
+From: Chris Patterson <[email protected]>
+Date: Tue, 26 Jul 2016 16:01:47 -0400
+Subject: [PATCH] libxl: compilation warning fix for arm & aarch64
+
+GCC 6 will warn on unused static const variables in c modules:
+https://gcc.gnu.org/ml/gcc-patches/2015-09/msg00847.html
+
+When compiling with LIBXL_HAVE_NO_SUSPEND_RESUME set (arm & aarch64),
+the compiler emits the following errors:
+  xl_cmdimpl.c:101:19: error: 'migrate_report'
+      defined but not used [-Werror=unused-const-variable=]
+  xl_cmdimpl.c:99:19: error: 'migrate_permission_to_go'
+      defined but not used [-Werror=unused-const-variable=]
+  xl_cmdimpl.c:97:19: error: 'migrate_receiver_ready'
+      defined but not used [-Werror=unused-const-variable=]
+  xl_cmdimpl.c:95:19: error: 'migrate_receiver_banner'
+      defined but not used [-Werror=unused-const-variable=]
+
+These unused const variables are only used in functions which exist between
+the ifndef block:
+   #ifndef LIBXL_HAVE_NO_SUSPEND_RESUME
+   ...
+   #endif
+
+Wrap the same ifndef around these variables.
+
+Signed-off-by: Chris Patterson <[email protected]>
+---
+ tools/libxl/xl_cmdimpl.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
+index d1fcfa4..ada8178 100644
+--- a/tools/libxl/xl_cmdimpl.c
++++ b/tools/libxl/xl_cmdimpl.c
+@@ -92,6 +92,7 @@ static int fd_lock = -1;
+ static const char savefileheader_magic[32]=
+     "Xen saved domain, xl format\n \0 \r";
+ 
++#ifndef LIBXL_HAVE_NO_SUSPEND_RESUME
+ static const char migrate_receiver_banner[]=
+     "xl migration receiver ready, send binary domain data.\n";
+ static const char migrate_receiver_ready[]=
+@@ -100,6 +101,8 @@ static const char migrate_permission_to_go[]=
+     "domain is yours, you are cleared to unpause";
+ static const char migrate_report[]=
+     "my copy unpause results are as follows";
++#endif
++
+   /* followed by one byte:
+    *     0: everything went well, domain is running
+    *            next thing is we all exit
+-- 
+2.7.4
+
recipes-extended/xen/xen.inc +18 -1
index de8c168..e911415 100644
@@ -151,6 +151,7 @@ PACKAGES = "\
     ${PN}-base \
     ${PN}-blktap \
     ${PN}-console \
+    ${PN}-cpuid \
     ${PN}-dbg \
     ${PN}-dev \
     ${PN}-devd \
@@ -196,6 +197,7 @@ PACKAGES = "\
     ${PN}-libxenvchan-dev \
     ${PN}-libxlutil \
     ${PN}-libxlutil-dev \
+    ${PN}-livepatch \
     ${PN}-misc \
     ${PN}-pygrub \
     ${PN}-python \
@@ -369,6 +371,10 @@ FILES_${PN}-console = "\
     ${sbindir}/xenconsoled \
     "
 
+FILES_${PN}-cpuid = "\
+    ${bindir}/xen-cpuid \
+    "
+
 FILES_${PN}-devd = "\
     ${sysconfdir}/init.d/xendriverdomain \
     "
@@ -399,6 +405,10 @@ FILES_${PN}-kdd = "\
     ${sbindir}/kdd \
     "
 
+FILES_${PN}-livepatch += " \
+    ${sbindir}/xen-livepatch \
+    "
+
 FILES_${PN}-misc = "\
     ${bindir}/xencons \
     ${bindir}/xencov_split \
@@ -527,6 +537,7 @@ FILES_${PN}-remus = "\
     "
 
 FILES_${PN}-scripts-network = " \
+    ${sysconfdir}/xen/scripts/colo-proxy-setup \
     ${sysconfdir}/xen/scripts/network-bridge \
     ${sysconfdir}/xen/scripts/network-nat \
     ${sysconfdir}/xen/scripts/network-route \
@@ -544,6 +555,7 @@ FILES_${PN}-scripts-block = " \
     ${sysconfdir}/xen/scripts/blktap \
     ${sysconfdir}/xen/scripts/block \
     ${sysconfdir}/xen/scripts/block-common.sh \
+    ${sysconfdir}/xen/scripts/block-dummy \
     ${sysconfdir}/xen/scripts/block-enbd \
     ${sysconfdir}/xen/scripts/block-iscsi \
     ${sysconfdir}/xen/scripts/block-nbd \
@@ -744,9 +756,11 @@ export XEN_OS = "Linux"
 
 # this is used for the header (#!${bindir}/python) of the install python scripts
 export PYTHONPATH="${bindir}/python"
+export ac_cv_path_PYTHONPATH="${bindir}/python"
 
-# seabios forcefully sets HOSTCC to CC - fixup to allow it to build native conf executable
+# xen and seabios require HOSTCC and HOSTCXX set to cross-compile
 export HOSTCC="${BUILD_CC}"
+export HOSTCXX="${BUILD_CXX}"
 
 # make xen requires CROSS_COMPILE set by hand as it does not abide by ./configure
 export CROSS_COMPILE="${TARGET_PREFIX}"
@@ -837,6 +851,9 @@ do_configure() {
 }
 
 do_compile() {
+    # workaround for build bug when CFLAGS is exported
+    # https://www.mail-archive.com/[email protected]/msg67822.html
+    unset CFLAGS
     oe_runmake
 }
 
recipes-extended/xen/xen_4.6.1.bb deleted +0 -10
deleted file mode 100644
index 0adf8ad..0000000
@@ -1,10 +0,0 @@
-require xen.inc
-
-SRC_URI = " \
-    http://bits.xensource.com/oss-xen/release/${PV}/xen-${PV}.tar.gz \
-    "
-
-SRC_URI[md5sum] = "df2d854c3c90ffeefaf71e7f868fb326"
-SRC_URI[sha256sum] = "44cc2fccba1e147ef4c8da0584ce0f24189c8743de0e3e9a9226da88ddb5f589"
-
-S = "${WORKDIR}/xen-${PV}"
recipes-extended/xen/xen_4.7.0.bb new file +11 -0
new file mode 100644
index 0000000..adb5c36
@@ -0,0 +1,11 @@
+require xen.inc
+
+SRC_URI = " \
+    http://bits.xensource.com/oss-xen/release/${PV}/xen-${PV}.tar.gz \
+    file://libxl-compilation-warning-fix-for-arm-aarch64.patch \
+    "
+
+SRC_URI[md5sum] = "3aa4e01bf37a3a5bc8572907cb88e649"
+SRC_URI[sha256sum] = "be5876144d49729572ae06142e0bb93f1c1f2695578141eff2931995add24623"
+
+S = "${WORKDIR}/xen-${PV}"
recipes-extended/xen/xen_git.bb +5 -4
index a86a501..e10d669 100644
@@ -1,15 +1,16 @@
 require xen.inc
 
-SRCREV = "1fd615aa0108490ffc558d27627f509183cbfdaf"
+SRCREV ?= "9a6cc4f5c14b3d7542b7523f88a1b65464733d3a"
 
-XEN_REL="4.6"
+XEN_REL ?= "4.7"
+XEN_BRANCH ?= "staging-${XEN_REL}"
 
-PV = "${XEN_REL}.0+git${SRCPV}"
+PV = "${XEN_REL}+git${SRCPV}"
 
 S = "${WORKDIR}/git"
 
 SRC_URI = " \
-    git://xenbits.xen.org/xen.git;branch=staging-${XEN_REL} \
+    git://xenbits.xen.org/xen.git;branch=${XEN_BRANCH} \
     "
 
 DEFAULT_PREFERENCE = "-1"
Signature · 1 line
2.1.4
#1 lore raw
Quoted 10 lines · Chris Patterson

From: Chris Patterson <[email protected]>

- update packages and add additional ones for new binaries (cpuid and livepatch)
- update xen_git to point to 4.7, make branch= fully variable, and remove assumed .0 from release version
- add patch to fix compilation of xen with gcc 6 on arm/aarch64

Build tested x86_64 and aarch64 targets.

It's been 4 days, and no comments, so I've pushed this patch. If anyone has issues or comments, we can do incremental patches.

Bruce

Quoted 239 lines
---
 ...l-compilation-warning-fix-for-arm-aarch64.patch | 58
++++++++++++++++++++++
 recipes-extended/xen/xen.inc                       | 19 ++++++-
 recipes-extended/xen/xen_4.6.1.bb                  | 10 ----
 recipes-extended/xen/xen_4.7.0.bb                  | 11 ++++
 recipes-extended/xen/xen_git.bb                    |  9 ++--
 5 files changed, 92 insertions(+), 15 deletions(-)
 create mode 100644
recipes-extended/xen/files/libxl-compilation-warning-fix-for-arm-aarch64.patch
 delete mode 100644 recipes-extended/xen/xen_4.6.1.bb
 create mode 100644 recipes-extended/xen/xen_4.7.0.bb

diff --git a/recipes-extended/xen/files/libxl-compilation-warning-fix-for-arm-aarch64.patch b/recipes-extended/xen/files/libxl-compilation-warning-fix-for-arm-aarch64.patch new file mode 100644
index 0000000..baab928
--- /dev/null
+++
b/recipes-extended/xen/files/libxl-compilation-warning-fix-for-arm-aarch64.patch

recipes-extended/xen/files/libxl-compilation-warning-fix-for-arm-aarch64.patch new file +22 -0
@@ -0,0 +1,58 @@
+Upstream-Status: Submitted
+
+From 3716a7faf98e1e126d47fe1596593917c27ee1bd Mon Sep 17 00:00:00 2001
+From: Chris Patterson <[email protected]>
+Date: Tue, 26 Jul 2016 16:01:47 -0400
+Subject: [PATCH] libxl: compilation warning fix for arm & aarch64
+
+GCC 6 will warn on unused static const variables in c modules:
+https://gcc.gnu.org/ml/gcc-patches/2015-09/msg00847.html
+
+When compiling with LIBXL_HAVE_NO_SUSPEND_RESUME set (arm & aarch64),
+the compiler emits the following errors:
+  xl_cmdimpl.c:101:19: error: 'migrate_report'
+      defined but not used [-Werror=unused-const-variable=]
+  xl_cmdimpl.c:99:19: error: 'migrate_permission_to_go'
+      defined but not used [-Werror=unused-const-variable=]
+  xl_cmdimpl.c:97:19: error: 'migrate_receiver_ready'
+      defined but not used [-Werror=unused-const-variable=]
+  xl_cmdimpl.c:95:19: error: 'migrate_receiver_banner'
+      defined but not used [-Werror=unused-const-variable=]
+
+These unused const variables are only used in functions which exist

between

recipes-extended/xen/files/libxl-compilation-warning-fix-for-arm-aarch64.patch new file +36 -0
+the ifndef block:
+   #ifndef LIBXL_HAVE_NO_SUSPEND_RESUME
+   ...
+   #endif
+
+Wrap the same ifndef around these variables.
+
+Signed-off-by: Chris Patterson <[email protected]>
+---
+ tools/libxl/xl_cmdimpl.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
+index d1fcfa4..ada8178 100644
+--- a/tools/libxl/xl_cmdimpl.c
++++ b/tools/libxl/xl_cmdimpl.c
+@@ -92,6 +92,7 @@ static int fd_lock = -1;
+ static const char savefileheader_magic[32]=
+     "Xen saved domain, xl format\n \0 \r";
+
++#ifndef LIBXL_HAVE_NO_SUSPEND_RESUME
+ static const char migrate_receiver_banner[]=
+     "xl migration receiver ready, send binary domain data.\n";
+ static const char migrate_receiver_ready[]=
+@@ -100,6 +101,8 @@ static const char migrate_permission_to_go[]=
+     "domain is yours, you are cleared to unpause";
+ static const char migrate_report[]=
+     "my copy unpause results are as follows";
++#endif
++
+   /* followed by one byte:
+    *     0: everything went well, domain is running
+    *            next thing is we all exit
+--
+2.7.4
+
recipes-extended/xen/xen.inc +12 -0
index de8c168..e911415 100644
@@ -151,6 +151,7 @@ PACKAGES = "\
     ${PN}-base \
     ${PN}-blktap \
     ${PN}-console \
+    ${PN}-cpuid \
     ${PN}-dbg \
     ${PN}-dev \
     ${PN}-devd \
@@ -196,6 +197,7 @@ PACKAGES = "\
     ${PN}-libxenvchan-dev \
     ${PN}-libxlutil \
     ${PN}-libxlutil-dev \
+    ${PN}-livepatch \
     ${PN}-misc \
     ${PN}-pygrub \
     ${PN}-python \
@@ -369,6 +371,10 @@ FILES_${PN}-console = "\
     ${sbindir}/xenconsoled \
     "
 
+FILES_${PN}-cpuid = "\
+    ${bindir}/xen-cpuid \
+    "
+
 FILES_${PN}-devd = "\
     ${sysconfdir}/init.d/xendriverdomain \
     "
@@ -399,6 +405,10 @@ FILES_${PN}-kdd = "\
     ${sbindir}/kdd \
     "
 
+FILES_${PN}-livepatch += " \
+    ${sbindir}/xen-livepatch \
+    "
+
 FILES_${PN}-misc = "\
     ${bindir}/xencons \
     ${bindir}/xencov_split \
@@ -527,6 +537,7 @@ FILES_${PN}-remus = "\
     "
 
 FILES_${PN}-scripts-network = " \
+    ${sysconfdir}/xen/scripts/colo-proxy-setup \
     ${sysconfdir}/xen/scripts/network-bridge \
     ${sysconfdir}/xen/scripts/network-nat \
     ${sysconfdir}/xen/scripts/network-route \
@@ -544,6 +555,7 @@ FILES_${PN}-scripts-block = " \
     ${sysconfdir}/xen/scripts/blktap \
     ${sysconfdir}/xen/scripts/block \
     ${sysconfdir}/xen/scripts/block-common.sh \
+    ${sysconfdir}/xen/scripts/block-dummy \
     ${sysconfdir}/xen/scripts/block-enbd \
     ${sysconfdir}/xen/scripts/block-iscsi \
     ${sysconfdir}/xen/scripts/block-nbd \
@@ -744,9 +756,11 @@ export XEN_OS = "Linux"
 
 # this is used for the header (#!${bindir}/python) of the install python

scripts
export PYTHONPATH="${bindir}/python"

recipes-extended/xen/xen.inc +1 -1
+export ac_cv_path_PYTHONPATH="${bindir}/python"
 
-# seabios forcefully sets HOSTCC to CC - fixup to allow it to build

native conf executable

recipes-extended/xen/xen.inc +2 -0
+# xen and seabios require HOSTCC and HOSTCXX set to cross-compile
 export HOSTCC="${BUILD_CC}"
+export HOSTCXX="${BUILD_CXX}"
 
 # make xen requires CROSS_COMPILE set by hand as it does not abide by

./configure
export CROSS_COMPILE="${TARGET_PREFIX}"

recipes-extended/xen/xen.inc +3 -0
@@ -837,6 +851,9 @@ do_configure() {
 }
 
 do_compile() {
+    # workaround for build bug when CFLAGS is exported
+    # https://www.mail-archive.com/[email protected]/msg67822.html
+    unset CFLAGS
     oe_runmake
 }
 
recipes-extended/xen/ renamed from recipes-extended/xen/xen_4.6.1.bb +0 -0

xen_4.6.1.bb
deleted file mode 100644
index 0adf8ad..0000000

recipes-extended/xen/xen_4.6.1.bb deleted +0 -8
@@ -1,10 +0,0 @@
-require xen.inc
-
-SRC_URI = " \
-    http://bits.xensource.com/oss-xen/release/${PV}/xen-${PV}.tar.gz \
-    "
-
-SRC_URI[md5sum] = "df2d854c3c90ffeefaf71e7f868fb326"
-SRC_URI[sha256sum] =

"44cc2fccba1e147ef4c8da0584ce0f24189c8743de0e3e9a9226da88ddb5f589"

recipes-extended/xen/xen_4.6.1.bb deleted +0 -2
-
-S = "${WORKDIR}/xen-${PV}"
recipes-extended/xen/ renamed from recipes-extended/xen/xen_4.7.0.bb +0 -0

xen_4.7.0.bb
new file mode 100644
index 0000000..adb5c36

recipes-extended/xen/xen_4.7.0.bb new file +9 -0
@@ -0,0 +1,11 @@
+require xen.inc
+
+SRC_URI = " \
+    http://bits.xensource.com/oss-xen/release/${PV}/xen-${PV}.tar.gz \
+    file://libxl-compilation-warning-fix-for-arm-aarch64.patch \
+    "
+
+SRC_URI[md5sum] = "3aa4e01bf37a3a5bc8572907cb88e649"
+SRC_URI[sha256sum] =

"be5876144d49729572ae06142e0bb93f1c1f2695578141eff2931995add24623"

recipes-extended/xen/xen_4.7.0.bb new file +2 -0
+
+S = "${WORKDIR}/xen-${PV}"
recipes-extended/xen/ renamed from recipes-extended/xen/xen_git.bb +0 -0

xen_git.bb
index a86a501..e10d669 100644

recipes-extended/xen/xen_git.bb +5 -5
@@ -1,15 +1,16 @@
 require xen.inc
 
-SRCREV = "1fd615aa0108490ffc558d27627f509183cbfdaf"
+SRCREV ?= "9a6cc4f5c14b3d7542b7523f88a1b65464733d3a"
 
-XEN_REL="4.6"
+XEN_REL ?= "4.7"
+XEN_BRANCH ?= "staging-${XEN_REL}"
 
-PV = "${XEN_REL}.0+git${SRCPV}"
+PV = "${XEN_REL}+git${SRCPV}"
 
 S = "${WORKDIR}/git"
 
 SRC_URI = " \
-    git://xenbits.xen.org/xen.git;branch=staging-${XEN_REL} \
+    git://xenbits.xen.org/xen.git;branch=${XEN_BRANCH} \
     "
 
 DEFAULT_PREFERENCE = "-1"
--

2.1.4

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