[meta-virtualization] [PATCH] xen: uprev to 4.7.0

Bruce Ashfield bruce.ashfield at gmail.com
Sun Jul 31 19:56:39 PDT 2016


On Wed, Jul 27, 2016 at 4:30 PM, Chris Patterson <cjp256 at gmail.com> wrote:

> From: Chris Patterson <pattersonc at ainfosec.com>
>
> - 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


>
> Signed-off-by: Chris Patterson <pattersonc at ainfosec.com>
> ---
>  ...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
> @@ -0,0 +1,58 @@
> +Upstream-Status: Submitted
> +
> +From 3716a7faf98e1e126d47fe1596593917c27ee1bd Mon Sep 17 00:00:00 2001
> +From: Chris Patterson <pattersonc at ainfosec.com>
> +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 <pattersonc at ainfosec.com>
> +---
> + 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
> +
> diff --git a/recipes-extended/xen/xen.inc b/recipes-extended/xen/xen.inc
> index de8c168..e911415 100644
> --- a/recipes-extended/xen/xen.inc
> +++ b/recipes-extended/xen/xen.inc
> @@ -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/xen-devel@lists.xen.org/msg67822.html
> +    unset CFLAGS
>      oe_runmake
>  }
>
> diff --git a/recipes-extended/xen/xen_4.6.1.bb b/recipes-extended/xen/
> xen_4.6.1.bb
> deleted file mode 100644
> index 0adf8ad..0000000
> --- a/recipes-extended/xen/xen_4.6.1.bb
> +++ /dev/null
> @@ -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}"
> diff --git a/recipes-extended/xen/xen_4.7.0.bb b/recipes-extended/xen/
> xen_4.7.0.bb
> new file mode 100644
> index 0000000..adb5c36
> --- /dev/null
> +++ b/recipes-extended/xen/xen_4.7.0.bb
> @@ -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}"
> diff --git a/recipes-extended/xen/xen_git.bb b/recipes-extended/xen/
> xen_git.bb
> index a86a501..e10d669 100644
> --- a/recipes-extended/xen/xen_git.bb
> +++ b/recipes-extended/xen/xen_git.bb
> @@ -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
> meta-virtualization at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-virtualization
>



-- 
"Thou shalt not follow the NULL pointer, for chaos and madness await thee
at its end"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/meta-virtualization/attachments/20160731/cc69a0cb/attachment-0001.html>


More information about the meta-virtualization mailing list