summaryrefslogtreecommitdiff
path: root/pcr/xen
diff options
context:
space:
mode:
authorIsaac David <isacdaavid@isacdaavid.info>2017-07-11 20:00:14 -0500
committerIsaac David <isacdaavid@isacdaavid.info>2017-07-11 20:03:17 -0500
commitff4a6a76b2c992ed9471419a2264edefe61f20bf (patch)
tree783db4f67adf07beb8b0c340d22ca2609f2c7d19 /pcr/xen
parent50633f2d519fef68201f9d2d8f2fcfff70ff7db1 (diff)
downloadabslibre-ff4a6a76b2c992ed9471419a2264edefe61f20bf.tar.gz
abslibre-ff4a6a76b2c992ed9471419a2264edefe61f20bf.tar.bz2
abslibre-ff4a6a76b2c992ed9471419a2264edefe61f20bf.zip
pcr/xen: update to 4.9.0
Diffstat (limited to 'pcr/xen')
-rwxr-xr-xpcr/xen/21_linux_xen_multiboot_arch294
-rw-r--r--pcr/xen/PKGBUILD585
-rw-r--r--pcr/xen/patch-gcc7-minios-udivmod.patch415
-rw-r--r--pcr/xen/patch-gcc7-vtpm-implicit-fallthrough.patch415
-rw-r--r--pcr/xen/patch-gcc7-vtpmmgr-make-inline-static.patch417
-rw-r--r--pcr/xen/patch-ipxe-patches-series.patch18
-rw-r--r--pcr/xen/patch-ovmf-apply-inbuild-patches.patch26
-rw-r--r--pcr/xen/patch-ovmf-patches-series.patch20
-rw-r--r--pcr/xen/patch-ovmf-use-python2.patch22
-rw-r--r--pcr/xen/xen.install93
10 files changed, 2085 insertions, 220 deletions
diff --git a/pcr/xen/21_linux_xen_multiboot_arch b/pcr/xen/21_linux_xen_multiboot_arch
new file mode 100755
index 000000000..2c7d457a0
--- /dev/null
+++ b/pcr/xen/21_linux_xen_multiboot_arch
@@ -0,0 +1,294 @@
+#! /bin/sh
+set -e
+
+# grub-mkconfig helper script.
+# Copyright (C) 2006,2007,2008,2009,2010 Free Software Foundation, Inc.
+#
+# GRUB is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# GRUB is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+
+prefix="/usr"
+exec_prefix="/usr"
+datarootdir="/usr/share"
+
+. "$pkgdatadir/grub-mkconfig_lib"
+
+export TEXTDOMAIN=grub
+export TEXTDOMAINDIR="${datarootdir}/locale"
+
+CLASS="--class gnu-linux --class gnu --class os --class xen"
+
+if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then
+ OS=GNU/Linux-libre
+else
+ OS="${GRUB_DISTRIBUTOR} GNU/Linux-libre"
+ CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr 'A-Z' 'a-z' | cut -d' ' -f1|LC_ALL=C sed 's,[^[:alnum:]_],_,g') ${CLASS}"
+fi
+
+# loop-AES arranges things so that /dev/loop/X can be our root device, but
+# the initrds that Linux-libre uses don't like that.
+case ${GRUB_DEVICE} in
+ /dev/loop/*|/dev/loop[0-9])
+ GRUB_DEVICE=`losetup ${GRUB_DEVICE} | sed -e "s/^[^(]*(\([^)]\+\)).*/\1/"`
+ ;;
+esac
+
+# btrfs may reside on multiple devices. We cannot pass them as value of root= parameter
+# and mounting btrfs requires user space scanning, so force UUID in this case.
+if [ "x${GRUB_DEVICE_UUID}" = "x" ] || [ "x${GRUB_DISABLE_LINUX_UUID}" = "xtrue" ] \
+ || ! test -e "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" \
+ || ( test -e "${GRUB_DEVICE}" && uses_abstraction "${GRUB_DEVICE}" lvm ); then
+ LINUX_ROOT_DEVICE=${GRUB_DEVICE}
+else
+ LINUX_ROOT_DEVICE=UUID=${GRUB_DEVICE_UUID}
+fi
+
+# Allow overriding GRUB_CMDLINE_LINUX and GRUB_CMDLINE_LINUX_DEFAULT.
+if [ "${GRUB_CMDLINE_LINUX_XEN_REPLACE}" ]; then
+ GRUB_CMDLINE_LINUX="${GRUB_CMDLINE_LINUX_XEN_REPLACE}"
+fi
+if [ "${GRUB_CMDLINE_LINUX_XEN_REPLACE_DEFAULT}" ]; then
+ GRUB_CMDLINE_LINUX_DEFAULT="${GRUB_CMDLINE_LINUX_XEN_REPLACE_DEFAULT}"
+fi
+
+case x"$GRUB_FS" in
+ xbtrfs)
+ rootsubvol="`make_system_path_relative_to_its_root /`"
+ rootsubvol="${rootsubvol#/}"
+ if [ "x${rootsubvol}" != x ]; then
+ GRUB_CMDLINE_LINUX="rootflags=subvol=${rootsubvol} ${GRUB_CMDLINE_LINUX}"
+ fi;;
+ xzfs)
+ rpool=`${grub_probe} --device ${GRUB_DEVICE} --target=fs_label 2>/dev/null || true`
+ bootfs="`make_system_path_relative_to_its_root / | sed -e "s,@$,,"`"
+ LINUX_ROOT_DEVICE="ZFS=${rpool}${bootfs}"
+ ;;
+esac
+
+title_correction_code=
+
+linux_entry ()
+{
+ os="$1"
+ version="$2"
+ xen_version="$3"
+ type="$4"
+ args="$5"
+ xen_args="$6"
+ ver=""
+ if $($grub_file --is-x86-multiboot2 ${xen_dirname}/${xen_basename}); then
+ ver="2"
+ fi
+ if [ -z "$boot_device_id" ]; then
+ boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")"
+ fi
+ if [ x$type != xsimple ] ; then
+ if [ x$type = xrecovery ] ; then
+ title="$(gettext_printf "%s, with Xen %s and Linux-libre %s (recovery mode)" "${os}" "${xen_version}" "${version}")"
+ else
+ title="$(gettext_printf "%s, with Xen %s and Linux-libre %s" "${os}" "${xen_version}" "${version}")"
+ fi
+ replacement_title="$(echo "Advanced options for ${OS}" | sed 's,>,>>,g')>$(echo "$title" | sed 's,>,>>,g')"
+ if [ x"Xen ${xen_version}>$title" = x"$GRUB_ACTUAL_DEFAULT" ]; then
+ quoted="$(echo "$GRUB_ACTUAL_DEFAULT" | grub_quote)"
+ title_correction_code="${title_correction_code}if [ \"x\$default\" = '$quoted' ]; then default='$(echo "$replacement_title" | grub_quote)'; fi;"
+ grub_warn "$(gettext_printf "Please don't use old title \`%s' for GRUB_DEFAULT, use \`%s' (for versions before 2.00) or \`%s' (for 2.00 or later)" "$GRUB_ACTUAL_DEFAULT" "$replacement_title" "gnulinux-advanced-$boot_device_id>gnulinux-$version-$type-$boot_device_id")"
+ fi
+ echo "menuentry '$(echo "$title" | grub_quote)' ${CLASS} \$menuentry_id_option 'xen-gnulinux-$version-$type-$boot_device_id' {" | sed "s/^/$submenu_indentation/"
+ else
+ title="$(gettext_printf "%s, with Xen hypervisor" "${os}")"
+ echo "menuentry '$(echo "$title" | grub_quote)' ${CLASS} \$menuentry_id_option 'xen-gnulinux-simple-$boot_device_id' {" | sed "s/^/$submenu_indentation/"
+ fi
+ if [ x$type != xrecovery ] ; then
+ save_default_entry | grub_add_tab | sed "s/^/$submenu_indentation/"
+ fi
+
+ if [ -z "${prepare_boot_cache}" ]; then
+ prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | grub_add_tab)"
+ fi
+ printf '%s\n' "${prepare_boot_cache}" | sed "s/^/$submenu_indentation/"
+ xmessage="$(gettext_printf "Loading Xen %s ..." ${xen_version})"
+ lmessage="$(gettext_printf "Loading Linux-libre %s ..." ${version})"
+ sed "s/^/$submenu_indentation/" << EOF
+ echo '$(echo "$xmessage" | grub_quote)'
+ if [ "\$grub_platform" = "pc" -o "\$grub_platform" = "" ]; then
+ xen_rm_opts=
+ else
+ xen_rm_opts="no-real-mode edd=off"
+ fi
+ multiboot${ver} ${rel_xen_dirname}/${xen_basename} placeholder ${xen_args} \${xen_rm_opts}
+ echo '$(echo "$lmessage" | grub_quote)'
+ module${ver} ${rel_dirname}/${basename} placeholder root=${linux_root_device_thisversion} ro ${args}
+EOF
+ if test -n "${initrd}" ; then
+ # TRANSLATORS: ramdisk isn't identifier. Should be translated.
+ message="$(gettext_printf "Loading initial ramdisk ...")"
+ sed "s/^/$submenu_indentation/" << EOF
+ echo '$(echo "$message" | grub_quote)'
+ module${ver} --nounzip ${rel_dirname}/${initrd}
+EOF
+ fi
+ sed "s/^/$submenu_indentation/" << EOF
+}
+EOF
+}
+
+linux_list=
+for i in /boot/vmlinu[xz]-* /vmlinu[xz]-* /boot/kernel-*; do
+ if grub_file_is_not_garbage "$i"; then
+ basename=$(basename $i)
+ version=$(echo $basename | sed -e "s,^[^0-9]*-,,g")
+ dirname=$(dirname $i)
+ config=
+ for j in "${dirname}/config-${version}" "${dirname}/config-${alt_version}" "/etc/kernels/kernel-config-${version}" ; do
+ if test -e "${j}" ; then
+ config="${j}"
+ break
+ fi
+ done
+ if (grep -qx "CONFIG_XEN_DOM0=y" "${config}" 2> /dev/null || grep -qx "CONFIG_XEN_PRIVILEGED_GUEST=y" "${config}" 2> /dev/null || [ -z ${config} ]); then linux_list="$linux_list $i" ; fi
+ fi
+done
+if [ "x${linux_list}" = "x" ] ; then
+ exit 0
+fi
+
+file_is_not_sym () {
+ case "$1" in
+ */xen-syms-*)
+ return 1;;
+ *)
+ return 0;;
+ esac
+}
+
+file_is_not_xen_config () {
+ case "$1" in
+ */xen*\.*config)
+ return 1;;
+ */xen*\.*cfg)
+ return 1;;
+ */xen*\.*efi)
+ return 1;;
+ *)
+ return 0;;
+ esac
+}
+
+
+xen_list=
+for i in /boot/xen*; do
+ if grub_file_is_not_garbage "$i" && file_is_not_sym "$i" && file_is_not_xen_config "$i"; then xen_list="$xen_list $i" ; fi
+done
+prepare_boot_cache=
+boot_device_id=
+
+title_correction_code=
+
+machine=`uname -m`
+
+case "$machine" in
+ i?86) GENKERNEL_ARCH="x86" ;;
+ mips|mips64) GENKERNEL_ARCH="mips" ;;
+ mipsel|mips64el) GENKERNEL_ARCH="mipsel" ;;
+ arm*) GENKERNEL_ARCH="arm" ;;
+ *) GENKERNEL_ARCH="$machine" ;;
+esac
+
+# Extra indentation to add to menu entries in a submenu. We're not in a submenu
+# yet, so it's empty. In a submenu it will be equal to '\t' (one tab).
+submenu_indentation=""
+
+is_top_level=true
+
+while [ "x${xen_list}" != "x" ] ; do
+ list="${linux_list}"
+ current_xen=`version_find_latest $xen_list`
+ xen_basename=`basename ${current_xen}`
+ xen_dirname=`dirname ${current_xen}`
+ rel_xen_dirname=`make_system_path_relative_to_its_root $xen_dirname`
+ xen_version=`echo $xen_basename | sed -e "s,.gz$,,g;s,^xen-,,g"`
+ if [ -z "$boot_device_id" ]; then
+ boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")"
+ fi
+ if [ "x$is_top_level" != xtrue ]; then
+ echo " submenu '$(gettext_printf "Xen hypervisor, version %s" "${xen_version}" | grub_quote)' \$menuentry_id_option 'xen-hypervisor-$xen_version-$boot_device_id' {"
+ fi
+ while [ "x$list" != "x" ] ; do
+ linux=`version_find_latest $list`
+ gettext_printf "Found linux-libre image: %s\n" "$linux" >&2
+ basename=`basename $linux`
+ dirname=`dirname $linux`
+ rel_dirname=`make_system_path_relative_to_its_root $dirname`
+ version=`echo $basename | sed -e "s,^[^0-9]*-,,g"`
+ alt_version=`echo $version | sed -e "s,\.old$,,g"`
+ linux_root_device_thisversion="${LINUX_ROOT_DEVICE}"
+
+ initrd=
+ for i in "initrd.img-${version}" "initrd-${version}.img" "initrd-${version}.gz" \
+ "initrd-${version}" "initramfs-${version}.img" \
+ "initrd.img-${alt_version}" "initrd-${alt_version}.img" \
+ "initrd-${alt_version}" "initramfs-${alt_version}.img" \
+ "initramfs-genkernel-${version}" \
+ "initramfs-genkernel-${alt_version}" \
+ "initramfs-genkernel-${GENKERNEL_ARCH}-${version}" \
+ "initramfs-genkernel-${GENKERNEL_ARCH}-${alt_version}" ; do
+ if test -e "${dirname}/${i}" ; then
+ initrd="$i"
+ break
+ fi
+ done
+ if test -n "${initrd}" ; then
+ gettext_printf "Found initrd image: %s\n" "${dirname}/${initrd}" >&2
+ else
+ # "UUID=" magic is parsed by initrds. Since there's no initrd, it can't work here.
+ linux_root_device_thisversion=${GRUB_DEVICE}
+ fi
+
+ if [ "x$is_top_level" = xtrue ] && [ "x${GRUB_DISABLE_SUBMENU}" != xy ]; then
+ linux_entry "${OS}" "${version}" "${xen_version}" simple \
+ "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}" "${GRUB_CMDLINE_XEN} ${GRUB_CMDLINE_XEN_DEFAULT}"
+
+ submenu_indentation="$grub_tab$grub_tab"
+
+ if [ -z "$boot_device_id" ]; then
+ boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")"
+ fi
+ # TRANSLATORS: %s is replaced with an OS name
+ echo "submenu '$(gettext_printf "Advanced options for %s (with Xen hypervisor)" "${OS}" | grub_quote)' \$menuentry_id_option 'gnulinux-advanced-$boot_device_id' {"
+ echo " submenu '$(gettext_printf "Xen hypervisor, version %s" "${xen_version}" | grub_quote)' \$menuentry_id_option 'xen-hypervisor-$xen_version-$boot_device_id' {"
+ is_top_level=false
+ fi
+
+ linux_entry "${OS}" "${version}" "${xen_version}" advanced \
+ "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}" "${GRUB_CMDLINE_XEN} ${GRUB_CMDLINE_XEN_DEFAULT}"
+ if [ "x${GRUB_DISABLE_RECOVERY}" != "xtrue" ]; then
+ linux_entry "${OS}" "${version}" "${xen_version}" recovery \
+ "single ${GRUB_CMDLINE_LINUX}" "${GRUB_CMDLINE_XEN}"
+ fi
+
+ list=`echo $list | tr ' ' '\n' | fgrep -vx "$linux" | tr '\n' ' '`
+ done
+ if [ x"$is_top_level" != xtrue ]; then
+ echo ' }'
+ fi
+ xen_list=`echo $xen_list | tr ' ' '\n' | fgrep -vx "$current_xen" | tr '\n' ' '`
+done
+
+# If at least one kernel was found, then we need to
+# add a closing '}' for the submenu command.
+if [ x"$is_top_level" != xtrue ]; then
+ echo '}'
+fi
+
+echo "$title_correction_code"
diff --git a/pcr/xen/PKGBUILD b/pcr/xen/PKGBUILD
index e6f8e5d23..c52c13c2f 100644
--- a/pcr/xen/PKGBUILD
+++ b/pcr/xen/PKGBUILD
@@ -1,100 +1,164 @@
-# Maintainer (Arch): David Sutton <kantras - gmail.com>
+# current version adapted from https://gitlab.com/johnth/aur-xen/blob/717dc1c8e32c3c615652f2b40838d1cb12441073/PKGBUILD
+
+# Maintainer (AUR): John Thomson <aur.xen at j0aur.mm.st>
+# Contributor (Arch): David Sutton <kantras - gmail.com>
# Contributor (Arch): Shanmu Thiagaraja <sthiagaraja+AUR@prshanmu.com>
# Contributor (Arch): Limao Luo
# Contributor (Arch): Luceo
# Contributor (Arch): Revellion
-# Contributor (Arch): John Thomson
-# Maintainer: André Silva <emulatorman@parabola.nu>
+# Contributor: André Silva <emulatorman@parabola.nu>
# Contributor: Márcio Silva <coadde@parabola.nu>
+# Contributor: Isaac David <isacdaavid@at@isacdaavid@dot@info>
+
+#linux-4.7 EFI boot panic issue (patch linux)
+#http://lkml.iu.edu/hypermail/linux/kernel/1608.2/03448.html
+_build_stubdom="${build_stubdom:-false}"
+_system_seabios="${system_seabios:-false}"
+_build_debug="${build_debug:-false}"
+_build_livepatch="${build_livepatch:-false}"
-_build_stubdom=${build_stubdom:-false}
## use _build_stubdom=true to build xen with stubdom
-#_build_stubdom=true
+## use _system_seabios=true to use system seabios
+## this bios file is slightly different to the xen seabios
+## /usr/share/qemu/bios-256k.bin uses CONFIG_ROM_SIZE=256, and newer seabios
+## can force use this file through vm.cfg bios_path_override='/usr/share/qemu/bios-256k.bin'
+## use _build_debug=true to compile Xen with debug options
+## use _build_livepatch=true to compile Xen with livepatch support
-pkgname=xen
-pkgver=4.7.0
-pkgrel=1.parabola1.1
+#_build_stubdom=true
+#_system_seabios=true
+#_build_debug=true
+#_build_livepatch=true
+
+pkgbase=xen
+pkgname=(xen{,-docs,-syms})
+_pkgname=xen
+pkgver=4.9.0
+_pkgver=${pkgver/rc/-rc}
+pkgrel=1.parabola1
pkgdesc="Virtual Machine Hypervisor & Tools (Parabola rebranded)"
-arch=(x86_64)
-url="http://www.xenproject.org/"
-license=(GPL2)
-depends=(bridge-utils curl gnutls iproute2 libaio libcap-ng libiscsi libnl libpng lzo pciutils python python2 sdl spice usbredir yajl
- # seabios ovmf qemu
- )
-[[ "$CARCH" == "x86_64" ]] && depends+=(lib32-glibc)
-makedepends=(bin86 cmake dev86 figlet git iasl markdown nasm ocaml-findlib spice-protocol wget)
+arch=(x86_64 armv7h)
+depends=(
+ bridge-utils
+ curl
+ gnutls
+ iproute2
+ libaio
+ libcap-ng
+ libiscsi
+ libnl
+ libpng
+ lzo
+ pciutils
+ python2
+ sdl
+ spice
+ systemd
+ usbredir
+ yajl
+ # seabios ovmf qemu
+)
+[[ "$CARCH" == 'x86_64' ]] && depends+=(
+ lib32-glibc
+)
+[[ "$CARCH" == *'arm'* ]] && depends+=(
+ dtc-overlay
+)
+[[ "$_system_seabios" == true ]] && depends+=(
+ seabios
+)
+url='http://www.xenproject.org/'
+license=('GPL2')
+makedepends=(
+ cmake
+ figlet
+ git
+ markdown
+ nasm
+ ocaml-findlib
+ spice-protocol
+ wget
+)
+[[ "$CARCH" == 'x86_64' ]] && makedepends+=(
+ bin86
+ dev86
+ gcc-multilib
+ iasl
+)
## For building Xen EFI boot file.
## mingw-w64-binutils only needed if
## binutils not built with --enable-targets=x86_64-pep
-_binutils_emulations=$(ld -V)
_binutils_efi=false
-if [[ $_binutils_emulations == *'i386pep'* ]]
-then
- _binutils_efi=true
- echo 'ld has efi support'
-else
- makedepends+=(mingw-w64-binutils)
- echo 'ld does not have efi support, using mingw'
-fi
-optdepends=('xen-docs: Official Xen Documentation' 'openvswitch: Optional Networking support')
-conflicts=(xen-4.2{,-testing-hg} xen-{gdbsx,hg-unstable,rc,git,igvtg} xen-4.3{,-testing-hg} xen-4.4 xen-4.5 xen-4.6)
-backup=(
- etc/modules-load.d/$pkgname.conf
- etc/$pkgname/xl.conf
- etc/conf.d/xen{stored,consoled,domains,commons}
- etc/$pkgname/grub.conf
+if [[ "$CARCH" == 'x86_64' ]]; then
+ _binutils_emulations="$(ld -V)"
+ if [[ "$_binutils_emulations" == *'i386pep'* ]]; then
+ _binutils_efi=true
+ echo '#ld has efi support'
+ else
+ makedepends+=(
+ mingw-w64-binutils
)
+ echo '#ld does not have efi support, using mingw'
+ fi
+fi
+
+
options=(!buildflags !strip)
-install=$pkgname.install
changelog=ChangeLog
+
+##SeaBIOS & OVMF tags are in src/xen-*/tools/Config.mk
+##grep -rE '_(REVISION|VERSION|TAG)( \?| :){0,1}=' src/xen**/{Config.mk,stubdom/configure,tools/firmware/etherboot/Makefile}
+_git_tag_seabios='#tag=rel-1.10.0'
+_git_tag_ovmf='#tag=5920a9d16b1ab887c2858224316a98e961d71b05'
+_git_tag_ipxe='827dd1bfee67daa683935ce65316f7e0f057fe1c'
+
+if [[ "$_build_stubdom" == true ]]; then
+ if [[ "$CARCH" == *'arm'* ]]; then
+ echo '####Compile settings error:'
+ echo "#cannot build stubdom for $CARCH"
+ _build_stubdom=false
+ fi
+fi
+
source=(
- http://bits.xensource.com/oss-xen/release/$pkgver/$pkgname-$pkgver.tar.gz
- http://xenbits.xen.org/xen-extfiles/ipxe-git-9a93db3f0947484e30e753bbd61a10b17336e20e.tar.gz
+ "https://downloads.xenproject.org/release/$_pkgname/$_pkgver/$_pkgname-$_pkgver.tar.gz"{,.sig}
+ "http://xenbits.xen.org/xen-extfiles/ipxe-git-$_git_tag_ipxe.tar.gz"
- ##SeaBIOS & OVMF tags are in src/xen-*/tools/Config.mk
- ##Can be found through: grep -R 'UPSTREAM_REVISION' src/xen-*/Config.mk
- #'seabios'::'git://xenbits.xen.org/seabios.git#tag=rel-1.9.2'
- #'ovmf'::'git://xenbits.xen.org/ovmf.git#tag=52a99493cce88a9d4ec8a02d7f1bd1a1001ce60d'
+ 'seabios'::"git://xenbits.xen.org/seabios.git$_git_tag_seabios"
+ 'ovmf'::"git://xenbits.xen.org/ovmf.git$_git_tag_ovmf"
##HTTP access
- 'seabios'::'git+http://xenbits.xen.org/git-http/seabios.git#tag=rel-1.9.2'
- 'ovmf'::'git+http://xenbits.xen.org/git-http/ovmf.git#tag=52a99493cce88a9d4ec8a02d7f1bd1a1001ce60d'
+ #'seabios'::"git+http://xenbits.xen.org/git-http/seabios.git$_git_tag_seabios"
## Compile patches
ati-passthrough.patch
- ovmf.patch
+ patch-ovmf-use-python2.patch
+ patch-ovmf-apply-inbuild-patches.patch
+ patch-ovmf-patches-series.patch
#patch-build-efi-with-mingw.patch::https://github.com/jakogut/xen-igvtg-aur/raw/28c81072e419d72a100ada9c393e37fae35ad263/xen_efi_build.patch
- patch-gcc6-ovmf-build.sh.patch
- #ipxe
- patch-gcc6-etherboot-nonnull-compare.patch::https://git.ipxe.org/ipxe.git/patch/e2f14c2f8c10674dbbd4f1228d79dc4c9be213b5
- patch-gcc6-etherboot-rm-unused-string-functions.patch
- patch-gcc6-etherboot-nic.c.patch::https://git.ipxe.org/ipxe.git/patch/a5885fbc19c4b60dc1a21624d1a9d1b77a93504e
- patch-gcc6-etherboot-ath.patch::https://git.ipxe.org/ipxe.git/patch/63037bdce4a325e5e1da85ffcdf27b77ac670c01
- patch-gcc6-etherboot-sis190.patch::https://git.ipxe.org/ipxe.git/patch/65b32a0b7000f70a5bb1d33190d40f9b04c93172
- patch-gcc6-etherboot-skge.patch::https://git.ipxe.org/ipxe.git/patch/76ec2a0540b25dbd183b9ce185583a4b24278cf1
- patch-gcc6-etherboot-via-velocity.c.patch
- patch-gcc6-etherboot-via-rhine.c.patch
- patch-gcc6-etherboot-e1000_phy.c.patch
- patch-gcc6-etherboot-igb_phy.c.patch
- patch-gcc6-etherboot-eth_broadcast.patch::https://git.ipxe.org/ipxe.git/patch/1cbb1581f16e235fafc963c906ad02b38d5457bd
- patch-gcc6-etherboot-link-header.patch::https://git.ipxe.org/ipxe.git/patch/6324bd9389521c7e86384591f41eb78a81e9af47
- patch-gcc6-etherboot-ath9k-9287-array.patch
+ patch-inbuild-ovmf-5-hiilib.c-pointer-zero.patch::'https://github.com/tianocore/edk2/commit/fe4a28ccbfd33cae9e1f56b174d46b4eb2329efd.patch'
+ patch-inbuild-ipxe-gcc7-implicit-fallthrough.patch::'https://github.com/ipxe/ipxe/commit/5f85cbb9ee1c00cec81a848a9e871ad5d1e7f53f.patch'
+ patch-inbuild-ipxe-gcc7-implicit-fallthrough-ath5k.patch::'https://github.com/ipxe/ipxe/commit/45f2265bfcbbf2afd7fac24372ae26e453f2b52d.patch'
+ patch-inbuild-ipxe-gcc7-implicit-fallthrough-curses.patch::'https://github.com/ipxe/ipxe/commit/28e26dd2503e6006fabb26f8c33050ba93a99623.patch'
+ patch-ipxe-patches-series.patch
+ patch-gcc7-vtpm-implicit-fallthrough.patch
+ patch-gcc7-vtpmmgr-make-inline-static.patch
+ patch-gcc7-minios-udivmod.patch
## Files
xen.install
- 09_xen
+ 21_linux_xen_multiboot_arch
efi-xen.cfg
- grub.conf
- $pkgname.conf
- tmpfiles.d-$pkgname.conf
+ "$_pkgname.conf"
+ "tmpfiles.d-$_pkgname.conf"
## XSA patches
- )
+)
-if [ "$_build_stubdom" = true ] ; then
- echo "building with stubdom"
+if [[ "$_build_stubdom" == true ]]; then
+ echo '#building with stubdom'
source+=(
http://xenbits.xen.org/xen-extfiles/lwip-1.3.0.tar.gz
http://xenbits.xen.org/xen-extfiles/zlib-1.2.3.tar.gz
@@ -104,16 +168,16 @@ if [ "$_build_stubdom" = true ] ; then
http://xenbits.xen.org/xen-extfiles/grub-0.97.tar.gz
http://xenbits.xen.org/xen-extfiles/tpm_emulator-0.7.4.tar.gz
http://xenbits.xen.org/xen-extfiles/gmp-4.3.2.tar.bz2
- #http://caml.inria.fr/pub/distrib/ocaml-3.11/ocaml-3.11.0.tar.gz
+ http://caml.inria.fr/pub/distrib/ocaml-3.11/ocaml-3.11.0.tar.gz
)
fi
noextract=(
- ipxe-git-9a93db3f0947484e30e753bbd61a10b17336e20e.tar.gz
- )
+ "ipxe-git-$_git_tag_ipxe.tar.gz"
+)
-if [ "$_build_stubdom" = true ] ; then
+if [[ "$_build_stubdom" == true ]]; then
noextract+=(
lwip-1.3.0.tar.gz
zlib-1.2.3.tar.gz
@@ -123,75 +187,90 @@ if [ "$_build_stubdom" = true ] ; then
grub-0.97.tar.gz
tpm_emulator-0.7.4.tar.gz
gmp-4.3.2.tar.bz2
- #ocaml-3.11.0.tar.gz
+ ocaml-3.11.0.tar.gz
)
fi
+validpgpkeys=('23E3222C145F4475FA8060A783FE14C957E82BD9')
+#gpg --keyserver pgp.mit.edu --recv-key 23E3222C145F4475FA8060A783FE14C957E82BD9
sha256sums=(
- 'be5876144d49729572ae06142e0bb93f1c1f2695578141eff2931995add24623'
- '632ce8c193ccacc3012bd354bdb733a4be126f7c098e111930aa41dad537405c'
-
- 'SKIP'
- 'SKIP'
-
- 'd93c2d5bcdf0c3e4c6e8efb357cb4b9d618209025361f5ccd9d03651a8acd7a3'
- '9cf9232c6e9a2b972cd4e1c7aacac9152bb8676db2b794381e1964c9f452e7de'
- #'a8ce42777e22af49080131e174b6b89c6e7597539838fb8b17a12280fd10b10b'
- '6403a0478e3cfed91dcad53b5f02e71745c98d18ab53930f87aeff1da8d71d55'
- #ipxe
- '17bb27d95c86af8cc5e499b1b0db9b95bba3f45910d55b420f9f1f5452355fab'
- '5d5fe7bf52cbae9da20cfd1fc798699b2355a1af907ebf7f764e227891a759bb'
- '9f34f8ecb9a44c688275b838c83efd233bb817f5e222629eac98e116168d704c'
- 'cdf7c4a089fe1fe493aafaf669decc3c9e071a0950da77dce526c09088d1c931'
- '32595581467772b9fa0fbb5384c99caefeb2cee3306b94b9bd2722084454f5a2'
- 'c73d1653b9b1d97ddce717817dc74429cd94c7b22989a08604eaa60df63f75f8'
- '448caed900ada2c030738218f5b82f5e29d9dc2e1beef9ebd49cbeb23734df0d'
- '61b1518c8d41792ec3b36e0fbfc265adb6c9304945a6fa18d6cc5a197e34b94f'
- '577f06e38a9ecbd3576907f2ba1c5040f4f1573fe92912635230702ad157b2e7'
- '80a24e9504d3893e83dc60550ffe364a873aaf3dafb52dcdade13f61f2ec0ee5'
- 'be05ccd8975af402dcba3a3dc78c173319b2edd636bac11ac11163091453b704'
- 'cace870b6629003b55d9df9ef24f3445067239b913c006b6e23da511c1a21d78'
- 'a15d73e0fb51fe3c1cf8b80a5ff17d532444016d14495d90d9e642ec60f320a6'
- #pkgbuild files
- '7da2db54d35914284d60bb4474aff3538897dd3cf5065347b393d6e18a029292'
- '92b8fc6679cc75bd993c8ead946eb1f212da03a52566b1c329d248fa1cdfe879'
- '95f09bccc104d98c14559000823cb50f0d076f6a65b9f3b4e7725762b84ab5c7'
- '3f0af16958c3e057b9baa5afc47050d9adf7dd553274dd97ae4f35938fefb568'
- '50a9b7fd19e8beb1dea09755f07318f36be0b7ec53d3c9e74f3266a63e682c0c'
- '40e0760810a49f925f2ae9f986940b40eba477dc6d3e83a78baaae096513b3cf'
-
- ## XSA patches
- )
-if [ "$_build_stubdom" = true ] ; then
+ 'cade643fe3310d4d6f97d0c215c6fa323bc1130d7e64d7e2043ffaa73a96f33b'
+ 'SKIP'
+ '36deacb946c59ad1d6600f6e5b89d6a7a8961e65eb000900e184075920120f49'
+
+ 'SKIP'
+ 'SKIP'
+
+ 'd93c2d5bcdf0c3e4c6e8efb357cb4b9d618209025361f5ccd9d03651a8acd7a3'
+ '5fb65130f96d1728368a09042e55f622c14117572030ce2141bff4ae150e4a01'
+ 'a853a38b8fd661d6b99979831cdae014cd23d831b57a90a467400660343f23f6'
+ '81b93e8c9e0ecb0d8c0555892b27b7e6c39d961af33cdea53ac72070e3e741b2'
+ #'a8ce42777e22af49080131e174b6b89c6e7597539838fb8b17a12280fd10b10b'
+ '79d8ce76bdeb72a1583254f1fb80309e56428d7406a6605a5ec860dc5a1beb3d'
+ 'e042b0161d76ee9af7b113c46703dde2663f762d696f4290585be36d907e97a5'
+ '2be4efb8be044c9b2459d09f5a6390fecb218ed4cb38964bce0674882817b91a'
+ 'db21442e38be53d342c7574c7c17fb8ce45e57c11dd1ad99e60641ea4061653b'
+ '9135c1ca7aed28a86afc7a0feb2930bd95b4fabf865dd368e8912cc77d38fb33'
+ '826cc633cd1a5b5ae88f50c3d94647a4a108747e946c398eb88f1dcc069be2b8'
+ 'e5328145563a0e9a5f118f6d7b68468dca04d14bf97ab5699bf99d7d8b966f12'
+ 'c2b004ad976c050ec19986cbca6586d2c137959f11a0c3494146a4ccb1e5f9d4'
+
+ #pkgbuild files
+ '330bcc5ab22e982d37495b57176d306353c220fec7c2b6c4a78a9133382a623e'
+ '7fa619845874e1a596acc5fb43b921496fba3014e04f40b2af462c51b02656ee'
+ '95f09bccc104d98c14559000823cb50f0d076f6a65b9f3b4e7725762b84ab5c7'
+ '50a9b7fd19e8beb1dea09755f07318f36be0b7ec53d3c9e74f3266a63e682c0c'
+ '40e0760810a49f925f2ae9f986940b40eba477dc6d3e83a78baaae096513b3cf'
+
+ ## XSA patches
+)
+
+
+if [[ "$_build_stubdom" == true ]]; then
sha256sums+=(
- #stubdom bits
- '772e4d550e07826665ed0528c071dd5404ef7dbe1825a38c8adbc2a00bca948f'
- '1795c7d067a43174113fdf03447532f373e1c6c57c08d61d9e4e9be5e244b05e'
- 'db426394965c48c1d29023e1cc6d965ea6b9a9035d8a849be2750ca4659a3d07'
- 'f60ae61cfbd5da1d849d0beaa21f593c38dac9359f0b3ddc612f447408265b24'
- '2d29fd04a0d0ba29dae6bd29fb418944c08d3916665dcca74afb297ef37584b6'
- '4e1d15d12dbd3e9208111d6b806ad5a9857ca8850c47877d36575b904559260b'
- '4e48ea0d83dd9441cc1af04ab18cd6c961b9fa54d5cbf2c2feee038988dea459'
- '936162c0312886c21581002b79932829aa048cfaf9937c6265aeaa14f1cd1775'
- #'ecdd4f8473ab0dee5d3acb5c0a31a4c1dd6aa12179895cf1903dd0f455c43a4f'
-
- #stubdom patches
- )
+ #stubdom bits
+ '772e4d550e07826665ed0528c071dd5404ef7dbe1825a38c8adbc2a00bca948f'
+ '1795c7d067a43174113fdf03447532f373e1c6c57c08d61d9e4e9be5e244b05e'
+ 'db426394965c48c1d29023e1cc6d965ea6b9a9035d8a849be2750ca4659a3d07'
+ 'f60ae61cfbd5da1d849d0beaa21f593c38dac9359f0b3ddc612f447408265b24'
+ '2d29fd04a0d0ba29dae6bd29fb418944c08d3916665dcca74afb297ef37584b6'
+ '4e1d15d12dbd3e9208111d6b806ad5a9857ca8850c47877d36575b904559260b'
+ '4e48ea0d83dd9441cc1af04ab18cd6c961b9fa54d5cbf2c2feee038988dea459'
+ '936162c0312886c21581002b79932829aa048cfaf9937c6265aeaa14f1cd1775'
+ 'ecdd4f8473ab0dee5d3acb5c0a31a4c1dd6aa12179895cf1903dd0f455c43a4f'
+
+ #stubdom patches
+ )
fi
+_xen_kconfig_debug=$(cat <<EOF
+CONFIG_DEBUG=y
+CONFIG_CRASH_DEBUG=y
+EOF
+)
+_xen_kconfig_livepatch=$(cat <<EOF
+CONFIG_LIVEPATCH=y
+EOF
+)
+
+_makevars=(
+ LANG=C
+ PYTHON=python2
+)
+
prepare() {
- cd "$pkgname-$pkgver/"
+ cd "$_pkgname-$_pkgver/"
### Copy git sourced tools/firmware
- # Copy seabios into place
- mkdir tools/firmware/seabios-dir-remote/
- cp -r ../seabios/* tools/firmware/seabios-dir-remote/
- # Copy ovmf into place
- mkdir tools/firmware/ovmf-dir-remote/
- cp -r ../ovmf/* tools/firmware/ovmf-dir-remote/
+ # move seabios into place
+ mv --force "$srcdir/seabios" tools/firmware/seabios-dir-remote
+ # move ovmf into place
+ mv --force "$srcdir/ovmf" tools/firmware/ovmf-dir-remote
- ### Patching
+ ### Patching
+ # XSA Patches
+ echo 'XSA patches'
# Security Patches - Base
# Security Patches - qemu-xen-traditional
@@ -202,139 +281,233 @@ prepare() {
cd 'tools/qemu-xen/'
cd '../../'
+
# Compile Patches
+ echo 'Compile patches'
# Build EFI binary with mingw
- if [ $_binutils_efi != true ]
- then
- #patch -Np1 -i "$srcdir/patch-build-efi-with-mingw.patch"
- sed -i.bak '/ EFI_LD/s/LD/LD_EFI/' xen/arch/x86/Makefile
- sed -i.bak 's/LD/LD_EFI/' xen/arch/x86/efi/Makefile
- sed -i.bak '/EFI_MOUNTPOINT .*/aLD_EFI ?= $(LD)' xen/Makefile
+ if [[ "$_binutils_efi" != true ]]; then
+ if $(stat /usr/x86_64-w64-mingw32/bin/ld >/dev/null 2>&1); then
+ #patch -Np1 -i "$srcdir/patch-build-efi-with-mingw.patch"
+ sed -i.bak '/ EFI_LD/s/LD/LD_EFI/' xen/arch/x86/Makefile
+ sed -i.bak 's/LD/LD_EFI/' xen/arch/x86/efi/Makefile
+ sed -i.bak '/EFI_MOUNTPOINT .*/aLD_EFI ?= $(LD)' xen/Makefile
+ else
+ echo '#Not capable of building xen.efi. Need either:'
+ echo '#(preferred) binutils compiled with --enable-targets=x86_64-pep'
+ echo '#or install mingw-w64-binutils'
+ fi
fi
# OVMF Compile support (Pulls from GIT repo, so patching to patch after pull request)
- patch -Np1 -i "$srcdir/ovmf.patch"
- cp "$srcdir/patch-gcc6-ovmf-build.sh.patch" tools/firmware/
+ patch -Np1 -i "$srcdir/patch-ovmf-use-python2.patch"
+ patch -Np1 -i "$srcdir/patch-ovmf-apply-inbuild-patches.patch"
+ mkdir -p tools/firmware/ovmf-patches
+ patch -Np1 -i "$srcdir/patch-ovmf-patches-series.patch"
+ cp "$srcdir"/patch-inbuild-ovmf*.patch tools/firmware/ovmf-patches/
# Uncomment line below if you want to enable ATI Passthrough support (some reported successes, untested with 4.4)
#patch -Np1 -i "$srcdir/ati-passthrough.patch"
- ## GCC-6
- #etherboot
- echo -e "patch-gcc6-etherboot-nonnull-compare.patch\npatch-gcc6-etherboot-rm-unused-string-functions.patch\npatch-gcc6-etherboot-nic.c.patch\npatch-gcc6-etherboot-ath.patch\npatch-gcc6-etherboot-sis190.patch\npatch-gcc6-etherboot-skge.patch\npatch-gcc6-etherboot-via-velocity.c.patch\npatch-gcc6-etherboot-via-rhine.c.patch\npatch-gcc6-etherboot-e1000_phy.c.patch\npatch-gcc6-etherboot-igb_phy.c.patch\npatch-gcc6-etherboot-link-header.patch\npatch-gcc6-etherboot-eth_broadcast.patch\npatch-gcc6-etherboot-ath9k-9287-array.patch" >> tools/firmware/etherboot/patches/series
- cp ${srcdir}/patch-gcc6-etherboot-*.patch tools/firmware/etherboot/patches/
+ ## Fix fixed rundir paths
+ ## grep -Rl '\/var\/run\/xen' * 2> /dev/null
+ _var_run_fixed_paths=(
+ tools/hotplug/Linux/locking.sh
+ tools/xenmon/xenbaked.c
+ tools/xenmon/xenmon.py
+ tools/pygrub/src/pygrub
+ )
+ sed -i 's:/var/run:/run:' ${_var_run_fixed_paths[@]}
- ## Fix Install Paths
- sed -i 's:\$localstatedir/run/xen:/run/xen:' m4/paths.m4
- sed -i 's:/var/run:/run:' tools/ocaml/xenstored/define.ml
- sed -i 's:/var/run:/run:' tools/ocaml/xenstored/systemd_stubs.c
+ ## Fix python version in shebang
+ echo 'Fix python shebang to python2'
+ _python_files=( $(grep -Rlse '^#!/usr/bin/.*python$' || : ) )
+ sed -Ei 's|(^#!.*/usr/bin/(env ){0,1})python$|\1python2|' ${_python_files[@]}
- if [ "$_build_stubdom" = true ] ; then
+ if [[ "$_build_stubdom" == true ]]; then
# Copy supporting tarballs into place
- cp "$srcdir/lwip-1.3.0.tar.gz" stubdom/
- cp "$srcdir/zlib-1.2.3.tar.gz" stubdom/
- cp "$srcdir/newlib-1.16.0.tar.gz" stubdom/
- cp "$srcdir/pciutils-2.2.9.tar.bz2" stubdom/
- cp "$srcdir/polarssl-1.1.4-gpl.tgz" stubdom/
- cp "$srcdir/grub-0.97.tar.gz" stubdom/
- cp "$srcdir/tpm_emulator-0.7.4.tar.gz" stubdom/
- cp "$srcdir/gmp-4.3.2.tar.bz2" stubdom/
- #cp "$srcdir/ocaml-3.11.0.tar.gz" stubdom/
+ ln -s "$srcdir/lwip-1.3.0.tar.gz" stubdom/
+ ln -s "$srcdir/zlib-1.2.3.tar.gz" stubdom/
+ ln -s "$srcdir/newlib-1.16.0.tar.gz" stubdom/
+ ln -s "$srcdir/pciutils-2.2.9.tar.bz2" stubdom/
+ ln -s "$srcdir/polarssl-1.1.4-gpl.tgz" stubdom/
+ ln -s "$srcdir/grub-0.97.tar.gz" stubdom/
+ ln -s "$srcdir/tpm_emulator-0.7.4.tar.gz" stubdom/
+ ln -s "$srcdir/gmp-4.3.2.tar.bz2" stubdom/
+ ln -s "$srcdir/ocaml-3.11.0.tar.gz" stubdom/
## Stubdom patches
cd 'extras/mini-os'
+ patch -Np1 -i "$srcdir/patch-gcc7-minios-udivmod.patch"
cd '../../'
+ #vtpm
+ patch -Np1 -i "$srcdir/patch-gcc7-vtpmmgr-make-inline-static.patch"
+ patch -Np1 -i "$srcdir/patch-gcc7-vtpm-implicit-fallthrough.patch"
fi
#etherboot
- cp "$srcdir/ipxe-git-9a93db3f0947484e30e753bbd61a10b17336e20e.tar.gz" tools/firmware/etherboot/ipxe.tar.gz
-
- #Workaround for cannot compute sizeof (unsigned short)
- #Makefile:170: recipe for target 'gmp-x86_64' failed
- #Probably not safe!
- #sed -i.bak "/< gmp.patch/a\ sed -i.bak 's/\\\\(\\\\s*\\\\)\\\\(fprintf (f,\\\\)\\\\(.*\\\\)/\\\\1\\\\2\\\\3\\\\n\\\\1clearerr(f);/' \$@/configure" stubdom/Makefile
-
-
+ ln -s "$srcdir/ipxe-git-$_git_tag_ipxe.tar.gz" tools/firmware/etherboot/ipxe.tar.gz
+ patch -Np1 -i "$srcdir/patch-ipxe-patches-series.patch"
+ cp "$srcdir"/patch-inbuild-ipxe*.patch tools/firmware/etherboot/patches/
}
build() {
- cd "$pkgname-$pkgver/"
- export LD_EFI="/usr/x86_64-w64-mingw32/bin/ld"
+ cd "$_pkgname-$_pkgver/"
+ export LD_EFI='/usr/x86_64-w64-mingw32/bin/ld'
./autogen.sh
- if [ "$_build_stubdom" = true ] ; then
- _config_stubdom='--enable-stubdom'
+ if [[ "$_build_stubdom" == true ]]; then
+ _config_stubdom=(--enable-stubdom)
+ _config_stubdom+=(
+ #--enable-ioemu-stubdom=no
+ #--enable-c-stubdom=no
+ #--enable-caml-stubdom=no
+ #--enable-pv-grub=no
+ #--enable-xenstore-stubdom=no
+ #--enable-vtpm-stubdom=no
+ #--enable-vtpmmgr-stubdom=no
+ )
+ else
+ _config_stubdom=(--disable-stubdom)
fi
- ./configure PYTHON=/usr/bin/python2 --prefix=/usr --sbindir=/usr/bin --with-sysconfig-leaf-dir=conf.d --with-initddir=/etc/init.d \
- --enable-systemd --disable-docs --enable-ovmf \
- "${_config_stubdom:---disable-stubdom}" \
- --with-extra-qemuu-configure-args="--disable-bluez --disable-gtk --enable-spice --enable-usb-redir"
+ _config_seabios=()
+ if [[ "$_system_seabios" == true ]]; then
+ _config_seabios=(--with-system-seabios=/usr/share/qemu/bios-256k.bin)
+ fi
+ _config_xen_kconfig=''
+ _config_debug=()
+ if [[ "$_build_debug" == true ]]; then
+ _config_debug=(--enable-debug --enable-debug-tcg --enable-debug-info)
+ _config_xen_kconfig+="\n$_xen_kconfig_debug"
+ _makevars+=(debug=y CONFIG_DEBUG=y)
+ fi
+ if [[ "$_build_livepatch" == true ]]; then
+ _config_xen_kconfig+="\n$_xen_kconfig_livepatch"
+ fi
+ if [[ -n "$_config_xen_kconfig" ]]; then
+ cd xen
+ echo -e "$_config_xen_kconfig" > .config
+ make "${_makevars[@]}" olddefconfig V=1
+ cd ../
+ fi
+ ./configure PYTHON=/usr/bin/python2 --prefix=/usr --sbindir=/usr/bin --with-sysconfig-leaf-dir=conf.d --with-rundir=/run \
+ --enable-systemd --enable-ovmf \
+ "${_config_seabios[@]}" \
+ "${_config_stubdom[@]}" \
+ "${_config_debug[@]}" \
+ --with-extra-qemuu-configure-args='--disable-bluez --disable-gtk --enable-spice --enable-usb-redir'
#--with-system-qemu --with-system-seabios --with-system-ovmf
#defaults --enable-qemu-traditional --enable-rombios \
- make LANG=C PYTHON=python2 dist-misc
- make LANG=C PYTHON=python2 dist-xen
- make LANG=C PYTHON=python2 dist-tools
- if [ "$_build_stubdom" = true ] ; then
- make LANG=C PYTHON=python2 dist-stubdom
+ make "${_makevars[@]}" dist
+ if [[ "$_build_livepatch" == true ]]; then
+ make "${_makevars[@]}" build-tests
fi
}
-package() {
- cd "$pkgname-$pkgver/"
+package_xen() {
+ _makevars_package=("${_makevars[@]}" DESTDIR="$pkgdir")
+ optdepends=(
+ 'xen-docs: Official Xen documentation'
+ 'openvswitch: Optional advanced networking support'
+ 'urlgrabber: Required for xenpvnetboot'
+ )
+ conflicts=(xen-{git,rc,igvtg,4.{5,6,7}} xenstore)
+ provides=(xenstore)
+ replaces=(xen-{git,rc,4.{5,6,7}})
+ backup=(
+ etc/conf.d/xen{domains,commons}
+ "etc/$_pkgname/grub.conf"
+ "etc/$_pkgname/oxenstored.conf"
+ "etc/$_pkgname/xl.conf"
+ )
+ install="$_pkgname.install"
+
+ cd "$_pkgname-$_pkgver/"
- make DESTDIR="$pkgdir" LANG=C PYTHON=python2 install
+ make "${_makevars_package[@]}" install-xen
+ make "${_makevars_package[@]}" install-tools
+ if [[ "$_build_stubdom" == true ]]; then
+ make "${_makevars_package[@]}" install-stubdom
+ fi
+ if [[ "$_build_livepatch" == true ]]; then
+ make "${_makevars_package[@]}" install-tests
+ fi
cd "$pkgdir"
# Install files from Parabola package
- install -Dm644 "$srcdir/tmpfiles.d-$pkgname.conf" usr/lib/tmpfiles.d/$pkgname.conf
- install -Dm644 "$srcdir/grub.conf" etc/xen/grub.conf
- install -Dm755 "$srcdir/09_xen" etc/grub.d/09_xen
+ install -Dm644 "$srcdir/tmpfiles.d-$_pkgname.conf" "usr/lib/tmpfiles.d/$_pkgname.conf"
+ install -Dm755 "$srcdir/21_linux_xen_multiboot_arch" etc/grub.d/21_linux_xen_multiboot_arch
install -Dm644 "$srcdir/efi-xen.cfg" etc/xen/efi-xen.cfg
- # Fix paths in scripts, move to right locations and create missing directories
- sed -i 's:/var/run:/run:' etc/init.d/xencommons
- sed -i 's:/var/lock:/run/lock:' etc/xen/scripts/hotplugpath.sh
- sed -i 's:/var/run:/run:' etc/xen/scripts/locking.sh
- sed -i 's:/var/run:/run:' usr/lib/systemd/system/xenstored.service
- sed -i 's:/var/run:/run:' usr/lib/systemd/system/xenstored.socket
- sed -i 's:/var/run:/run:' usr/lib/systemd/system/xenstored_ro.socket
-
- mkdir var/log/xen/console
+ mkdir -p var/log/xen/console
# Sanitize library path (if lib64 exists)
if [[ -d usr/lib64 ]]; then
cd usr/
- cp -r lib64/* lib/
- rm -rf lib64
- cd ../
+ mv lib64/* lib/
+ rmdir lib64
+ cd ../
fi
- # If EFI binaries build, move to /boot
+ # If EFI binaries built, move to /boot
if [[ -f usr/lib/efi/xen.efi ]]; then
- mv usr/lib/efi/xen-$pkgver.efi boot/xen-$pkgver.efi
- rm -rf usr/lib/efi
+ mv usr/lib/efi/*.efi boot/
+ rmdir usr/lib/efi
fi
- # Compress syms file and move to a share location
- #gzip boot/$pkgname-syms-*
- #mv boot/$pkgname-syms-*.gz usr/share/xen
+ # Remove syms
+ find usr/lib/debug -type f \( -name '*-syms*' -or -name '*\.map' \) -delete
+ rmdir --ignore-fail-on-non-empty usr/lib/debug
- ##### Kill unwanted stuff #####
- # hypervisor symlinks
- rm -f boot/xen{,-4,-4.7,-4.7-rc}.gz
+ # Remove hypervisor boot symlinks
+ rm -f boot/xen{,-4{,.8,.9}}{,.{gz,efi}}
# Documentation cleanup ( see xen-docs package )
- rm -rf usr/share/doc
- rm -rf usr/share/man
-
- # Unnecessary qemu support files
-# rm -rf usr/bin/qemu-*-xen
- rm usr/share/qemu-xen/qemu/{palcode,openbios}-*
- rm usr/share/xen/qemu/openbios-*
+ #rm -rf usr/share/doc
+ #rm -rf usr/share/man
+
+ # Remove tempdirs
+ rmdir run/xen{,stored}
+ rmdir run
+
+ # Remove unnecessary qemu ELF support files
+ # qemuu
+ rm -f usr/share/qemu-xen/qemu/{palcode,openbios,s390}-*
+ rm -f usr/share/qemu-xen/qemu/u-boot.e500
+ # qemut
+ if [[ "$CARCH" == *'x86'* ]]; then
+ rm -f usr/share/xen/qemu/openbios-*
+ fi
# adhere to Static Library Packaging Guidelines
rm -rf usr/lib/*.a
+ # Remove unneeded init.d files
+ rm -rf etc/init.d
+}
+
+package_xen-docs(){
+ _makevars_package=("${_makevars[@]}" DESTDIR="$pkgdir")
+ pkgdesc='Xen virtual machine hypervisor documentation'
+ arch=('any')
+ depends=()
+ cd "$_pkgname-$_pkgver/"
+ make "${_makevars_package[@]}" install-docs
+}
+
+package_xen-syms(){
+ _makevars_package=("${_makevars[@]}" DESTDIR="$pkgdir")
+ pkgdesc='Xen virtual machine hypervisor debugging symbols'
+ arch=('any')
+ depends=()
+ _installdir="${pkgdir}/usr/lib/debug"
+ cd "$_pkgname-$_pkgver/"
+ install -d -m0755 "$_installdir"
+ for _path in $(find xen -type f \( -name '*-syms' -or -name '*\.map' \)); do
+ _file=$(basename "$_path")
+ _installfile=$(echo "$_file" |
+ sed "s/\([^.]*\)\(\.*\)/\1-${_pkgver}\2/" )
+ install -D -m0644 -p "$_path" "$_installdir/$_installfile"
+ done
}
diff --git a/pcr/xen/patch-gcc7-minios-udivmod.patch b/pcr/xen/patch-gcc7-minios-udivmod.patch
new file mode 100644
index 000000000..8b67c3415
--- /dev/null
+++ b/pcr/xen/patch-gcc7-minios-udivmod.patch
@@ -0,0 +1,415 @@
+<!DOCTYPE html>
+<html class="" lang="en">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<meta content="IE=edge" http-equiv="X-UA-Compatible">
+<meta content="object" property="og:type">
+<meta content="GitLab" property="og:site_name">
+<meta content="patch-gcc7-minios-udivmod.patch · master · John Thomson / aur-xen" property="og:title">
+<meta content="Arch Linux PKGBUILD for Xen Project http://www.xenproject.org/ http://xenbits.xen.org/xsa/ Build in a clean chroot: https://wiki.archlinux.org/index.php/DeveloperWiki:Building_in_a_Clean_Chroot" property="og:description">
+<meta content="https://gitlab.com/assets/gitlab_logo-7ae504fe4f68fdebb3c2034e36621930cd36ea87924c11ff65dbcb8ed50dca58.png" property="og:image">
+<meta content="https://gitlab.com/johnth/aur-xen/blob/master/patch-gcc7-minios-udivmod.patch" property="og:url">
+<meta content="summary" property="twitter:card">
+<meta content="patch-gcc7-minios-udivmod.patch · master · John Thomson / aur-xen" property="twitter:title">
+<meta content="Arch Linux PKGBUILD for Xen Project http://www.xenproject.org/ http://xenbits.xen.org/xsa/ Build in a clean chroot: https://wiki.archlinux.org/index.php/DeveloperWiki:Building_in_a_Clean_Chroot" property="twitter:description">
+<meta content="https://gitlab.com/assets/gitlab_logo-7ae504fe4f68fdebb3c2034e36621930cd36ea87924c11ff65dbcb8ed50dca58.png" property="twitter:image">
+
+<title>patch-gcc7-minios-udivmod.patch · master · John Thomson / aur-xen · GitLab</title>
+<meta content="Arch Linux PKGBUILD for Xen Project http://www.xenproject.org/ http://xenbits.xen.org/xsa/ Build in a clean chroot: https://wiki.archlinux.org/index.php/DeveloperWiki:Building_in_a_Clean_Chroot" name="description">
+<link rel="shortcut icon" type="image/x-icon" href="/assets/favicon-075eba76312e8421991a0c1f89a89ee81678bcde72319dd3e8047e2a47cd3a42.ico" id="favicon" />
+<link rel="stylesheet" media="all" href="/assets/application-bf562c36db4b06702ba455fb509cdac15b6f7b5797112e8a3784394849c9bb3b.css" />
+<link rel="stylesheet" media="print" href="/assets/print-87b4ace0db1f79d91e4fe6e74435b66b71d70fee57ffbb72d0fade17374fcc6b.css" />
+
+
+<script>
+//<![CDATA[
+window.gon={};gon.api_version="v4";gon.default_avatar_url="https:\/\/gitlab.com\/assets\/no_avatar-849f9c04a3a0d0cea2424ae97b27447dc64a7dbfae83c036c45b403392f0e8ba.png";gon.max_file_size=10;gon.asset_host=null;gon.relative_url_root="";gon.shortcuts_path="\/help\/shortcuts";gon.user_color_scheme="white";gon.katex_css_url="\/assets\/katex-e46cafe9c3fa73920a7c2c063ee8bb0613e0cf85fd96a3aea25f8419c4bfcfba.css";gon.katex_js_url="\/assets\/katex-04bcf56379fcda0ee7c7a63f71d0fc15ffd2e014d017cd9d51fd6554dfccf40a.js";gon.sentry_dsn="https:\/\/526a2f38a53d44e3a8e69bfa001d1e8b@sentry.gitlap.com\/15";gon.gitlab_url="https:\/\/gitlab.com";gon.revision="44d109d";gon.gitlab_logo="\/assets\/gitlab_logo-7ae504fe4f68fdebb3c2034e36621930cd36ea87924c11ff65dbcb8ed50dca58.png";
+//]]>
+</script>
+<script src="/assets/webpack/runtime.1e4f1a3da7dfa5700156.bundle.js"></script>
+<script src="/assets/webpack/common.a208e8b828f4e7f4759b.bundle.js"></script>
+<script src="/assets/webpack/locale.3db4c8eef74bbad2de0a.bundle.js"></script>
+<script src="/assets/webpack/main.7ca17a24789acfd5a781.bundle.js"></script>
+<script src="/assets/webpack/raven.61375d9168165e89d174.bundle.js"></script>
+
+
+<script src="/assets/webpack/blob.0051a361f2a0188b534a.bundle.js"></script>
+
+
+<meta name="csrf-param" content="authenticity_token" />
+<meta name="csrf-token" content="8RFxZYtqx8pd4L1cIzXKym29kayNcTj2Lhj9oIzC6PJRk7gEJAgfhr+lCKa7/qMlWeVGZ25bHDMhLi+a7p3qXA==" />
+<meta content="origin-when-cross-origin" name="referrer">
+<meta content="width=device-width, initial-scale=1, maximum-scale=1" name="viewport">
+<meta content="#474D57" name="theme-color">
+<link rel="apple-touch-icon" type="image/x-icon" href="/assets/touch-icon-iphone-5a9cee0e8a51212e70b90c87c12f382c428870c0ff67d1eb034d884b78d2dae7.png" />
+<link rel="apple-touch-icon" type="image/x-icon" href="/assets/touch-icon-ipad-a6eec6aeb9da138e507593b464fdac213047e49d3093fc30e90d9a995df83ba3.png" sizes="76x76" />
+<link rel="apple-touch-icon" type="image/x-icon" href="/assets/touch-icon-iphone-retina-72e2aadf86513a56e050e7f0f2355deaa19cc17ed97bbe5147847f2748e5a3e3.png" sizes="120x120" />
+<link rel="apple-touch-icon" type="image/x-icon" href="/assets/touch-icon-ipad-retina-8ebe416f5313483d9c1bc772b5bbe03ecad52a54eba443e5215a22caed2a16a2.png" sizes="152x152" />
+<link color="rgb(226, 67, 41)" href="/assets/logo-d36b5212042cebc89b96df4bf6ac24e43db316143e89926c0db839ff694d2de4.svg" rel="mask-icon">
+<meta content="/assets/msapplication-tile-1196ec67452f618d39cdd85e2e3a542f76574c071051ae7effbfde01710eb17d.png" name="msapplication-TileImage">
+<meta content="#30353E" name="msapplication-TileColor">
+
+
+<!-- Piwik -->
+<script>
+ var _paq = _paq || [];
+ _paq.push(['trackPageView']);
+ _paq.push(['enableLinkTracking']);
+ (function() {
+ var u="//piwik.gitlab.com/";
+ _paq.push(['setTrackerUrl', u+'piwik.php']);
+ _paq.push(['setSiteId', 1]);
+ var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
+ g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
+ })();
+</script>
+<noscript><p><img src="//piwik.gitlab.com/piwik.php?idsite=1" style="border:0;" alt="" /></p></noscript>
+<!-- End Piwik Code -->
+
+
+</head>
+
+<body class="" data-group="" data-page="projects:blob:show" data-project="aur-xen">
+
+
+<header class="navbar navbar-gitlab with-horizontal-nav">
+<div class="navbar-border"></div>
+<a class="sr-only gl-accessibility" href="#content-body" tabindex="1">Skip to content</a>
+<div class="container-fluid">
+<div class="header-content">
+<div class="dropdown global-dropdown">
+<button class="global-dropdown-toggle" data-toggle="dropdown" type="button">
+<span class="sr-only">Toggle navigation</span>
+<i aria-hidden="true" data-hidden="true" class="fa fa-bars"></i>
+</button>
+<div class="dropdown-menu-nav global-dropdown-menu">
+<ul>
+<li class="home"><a title="Projects" class="dashboard-shortcuts-projects" href="/explore"><div class="shortcut-mappings">
+<div class="key">
+<i aria-label="hidden" class="fa fa-arrow-up"></i>
+P
+</div>
+</div>
+<span>
+Projects
+</span>
+</a></li><li class=""><a title="Groups" class="dashboard-shortcuts-groups" href="/explore/groups"><div class="shortcut-mappings">
+<div class="key">
+<i aria-label="hidden" class="fa fa-arrow-up"></i>
+G
+</div>
+</div>
+<span>
+Groups
+</span>
+</a></li><li class=""><a title="Snippets" class="dashboard-shortcuts-snippets" href="/explore/snippets"><div class="shortcut-mappings">
+<div class="key">
+<i aria-label="hidden" class="fa fa-arrow-up"></i>
+S
+</div>
+</div>
+<span>
+Snippets
+</span>
+</a></li><li class="divider"></li>
+<li class=""><a title="Help" href="/help"><span>
+Help
+</span>
+</a></li></ul>
+
+</div>
+</div>
+<div class="header-logo">
+<a class="home" title="Dashboard" id="logo" href="/"><svg width="28" height="28" class="tanuki-logo" viewBox="0 0 36 36">
+ <path class="tanuki-shape tanuki-left-ear" fill="#e24329" d="M2 14l9.38 9v-9l-4-12.28c-.205-.632-1.176-.632-1.38 0z"/>
+ <path class="tanuki-shape tanuki-right-ear" fill="#e24329" d="M34 14l-9.38 9v-9l4-12.28c.205-.632 1.176-.632 1.38 0z"/>
+ <path class="tanuki-shape tanuki-nose" fill="#e24329" d="M18,34.38 3,14 33,14 Z"/>
+ <path class="tanuki-shape tanuki-left-eye" fill="#fc6d26" d="M18,34.38 11.38,14 2,14 6,25Z"/>
+ <path class="tanuki-shape tanuki-right-eye" fill="#fc6d26" d="M18,34.38 24.62,14 34,14 30,25Z"/>
+ <path class="tanuki-shape tanuki-left-cheek" fill="#fca326" d="M2 14L.1 20.16c-.18.565 0 1.2.5 1.56l17.42 12.66z"/>
+ <path class="tanuki-shape tanuki-right-cheek" fill="#fca326" d="M34 14l1.9 6.16c.18.565 0 1.2-.5 1.56L18 34.38z"/>
+</svg>
+
+</a></div>
+<div class="title-container">
+<h1 class="title"><a href="/johnth">John Thomson</a> / <a class="project-item-select-holder" href="/johnth/aur-xen">aur-xen</a></h1>
+</div>
+<div class="navbar-collapse collapse">
+<ul class="nav navbar-nav">
+<li class="hidden-sm hidden-xs">
+<div class="has-location-badge search search-form">
+<form class="navbar-form" action="/search" accept-charset="UTF-8" method="get"><input name="utf8" type="hidden" value="&#x2713;" /><div class="search-input-container">
+<div class="location-badge">This project</div>
+<div class="search-input-wrap">
+<div class="dropdown" data-url="/search/autocomplete">
+<input type="search" name="search" id="search" placeholder="Search" class="search-input dropdown-menu-toggle no-outline js-search-dashboard-options" spellcheck="false" tabindex="1" autocomplete="off" data-toggle="dropdown" data-issues-path="https://gitlab.com/dashboard/issues" data-mr-path="https://gitlab.com/dashboard/merge_requests" aria-label="Search" />
+<div class="dropdown-menu dropdown-select">
+<div class="dropdown-content"><ul>
+<li>
+<a class="is-focused dropdown-menu-empty-link">
+Loading...
+</a>
+</li>
+</ul>
+</div><div class="dropdown-loading"><i aria-hidden="true" data-hidden="true" class="fa fa-spinner fa-spin"></i></div>
+</div>
+<i class="search-icon"></i>
+<i class="clear-icon js-clear-input"></i>
+</div>
+</div>
+</div>
+<input type="hidden" name="group_id" id="group_id" class="js-search-group-options" />
+<input type="hidden" name="project_id" id="search_project_id" value="870008" class="js-search-project-options" data-project-path="aur-xen" data-name="aur-xen" data-issues-path="/johnth/aur-xen/issues" data-mr-path="/johnth/aur-xen/merge_requests" />
+<input type="hidden" name="search_code" id="search_code" value="true" />
+<input type="hidden" name="repository_ref" id="repository_ref" value="master" />
+
+<div class="search-autocomplete-opts hide" data-autocomplete-path="/search/autocomplete" data-autocomplete-project-id="870008" data-autocomplete-project-ref="master"></div>
+</form></div>
+
+</li>
+<li class="visible-sm-inline-block visible-xs-inline-block">
+<a title="Search" aria-label="Search" data-toggle="tooltip" data-placement="bottom" data-container="body" href="/search"><i aria-hidden="true" data-hidden="true" class="fa fa-search"></i>
+</a></li>
+<li>
+<div>
+<a class="btn btn-sign-in btn-success" href="/users/sign_in?redirect_to_referer=yes">Sign in</a>
+</div>
+</li>
+</ul>
+</div>
+<button class="navbar-toggle" type="button">
+<span class="sr-only">Toggle navigation</span>
+<i aria-hidden="true" data-hidden="true" class="fa fa-ellipsis-v"></i>
+</button>
+<div class="js-dropdown-menu-projects">
+<div class="dropdown-menu dropdown-select dropdown-menu-projects">
+<div class="dropdown-title"><span>Go to a project</span><button class="dropdown-title-button dropdown-menu-close" aria-label="Close" type="button"><i aria-hidden="true" data-hidden="true" class="fa fa-times dropdown-menu-close-icon"></i></button></div>
+<div class="dropdown-input"><input type="search" id="" class="dropdown-input-field" placeholder="Search your projects" autocomplete="off" /><i aria-hidden="true" data-hidden="true" class="fa fa-search dropdown-input-search"></i><i role="button" aria-hidden="true" data-hidden="true" class="fa fa-times dropdown-input-clear js-dropdown-input-clear"></i></div>
+<div class="dropdown-content"></div>
+<div class="dropdown-loading"><i aria-hidden="true" data-hidden="true" class="fa fa-spinner fa-spin"></i></div>
+</div>
+</div>
+
+</div>
+</div>
+</header>
+
+<script>
+ var findFileURL = "/johnth/aur-xen/find_file/master";
+</script>
+
+<div class="page-with-sidebar">
+<div class="layout-nav">
+<div class="container-fluid">
+<div class="scrolling-tabs-container">
+<div class="fade-left">
+<i aria-hidden="true" data-hidden="true" class="fa fa-angle-left"></i>
+</div>
+<div class="fade-right">
+<i aria-hidden="true" data-hidden="true" class="fa fa-angle-right"></i>
+</div>
+<ul class="nav-links scrolling-tabs">
+<li class="home"><a title="Project" class="shortcuts-project" href="/johnth/aur-xen"><span>
+Project
+</span>
+</a></li><li class="active"><a title="Repository" class="shortcuts-tree" href="/johnth/aur-xen/tree/master"><span>
+Repository
+</span>
+</a></li><li class=""><a title="Issues" class="shortcuts-issues" href="/johnth/aur-xen/issues"><span>
+Issues
+<span class="badge count issue_counter">1</span>
+</span>
+</a></li><li class=""><a title="Merge Requests" class="shortcuts-merge_requests" href="/johnth/aur-xen/merge_requests"><span>
+Merge Requests
+<span class="badge count merge_counter js-merge-counter">0</span>
+</span>
+</a></li><li class=""><a title="Pipelines" class="shortcuts-pipelines" href="/johnth/aur-xen/pipelines"><span>
+Pipelines
+</span>
+</a></li><li class=""><a title="Wiki" class="shortcuts-wiki" href="/johnth/aur-xen/wikis/home"><span>
+Wiki
+</span>
+</a></li><li class=""><a title="Snippets" class="shortcuts-snippets" href="/johnth/aur-xen/snippets"><span>
+Snippets
+</span>
+</a></li><li class=""><a title="Settings" class="shortcuts-tree" href="/johnth/aur-xen/settings/members"><span>
+Settings
+</span>
+</a></li><li class="hidden">
+<a title="Activity" class="shortcuts-project-activity" href="/johnth/aur-xen/activity"><span>
+Activity
+</span>
+</a></li>
+<li class="hidden">
+<a title="Network" class="shortcuts-network" href="/johnth/aur-xen/network/master">Graph
+</a></li>
+<li class="hidden">
+<a title="Charts" class="shortcuts-repository-charts" href="/johnth/aur-xen/graphs/master/charts">Charts
+</a></li>
+<li class="hidden">
+<a class="shortcuts-new-issue" href="/johnth/aur-xen/issues/new">Create a new issue
+</a></li>
+<li class="hidden">
+<a title="Jobs" class="shortcuts-builds" href="/johnth/aur-xen/-/jobs">Jobs
+</a></li>
+<li class="hidden">
+<a title="Commits" class="shortcuts-commits" href="/johnth/aur-xen/commits/master">Commits
+</a></li>
+<li class="hidden">
+<a title="Issue Boards" class="shortcuts-issue-boards" href="/johnth/aur-xen/boards">Issue Boards</a>
+</li>
+</ul>
+</div>
+
+</div>
+</div>
+<div class="scrolling-tabs-container sub-nav-scroll">
+<div class="fade-left">
+<i aria-hidden="true" data-hidden="true" class="fa fa-angle-left"></i>
+</div>
+<div class="fade-right">
+<i aria-hidden="true" data-hidden="true" class="fa fa-angle-right"></i>
+</div>
+
+<div class="nav-links sub-nav scrolling-tabs">
+<ul class="container-fluid container-limited">
+<li class="active"><a href="/johnth/aur-xen/tree/master">Files
+</a></li><li class=""><a href="/johnth/aur-xen/commits/master">Commits
+</a></li><li class=""><a href="/johnth/aur-xen/branches">Branches
+</a></li><li class=""><a href="/johnth/aur-xen/tags">Tags
+</a></li><li class=""><a href="/johnth/aur-xen/graphs/master">Contributors
+</a></li><li class=""><a href="/johnth/aur-xen/network/master">Graph
+</a></li><li class=""><a href="/johnth/aur-xen/compare?from=master&amp;to=master">Compare
+</a></li><li class=""><a href="/johnth/aur-xen/graphs/master/charts">Charts
+</a></li><li class=""><a href="/johnth/aur-xen/path_locks">Locked Files
+</a></li></ul>
+</div>
+</div>
+
+<div class="content-wrapper page-with-layout-nav page-with-sub-nav">
+<div class="alert-wrapper">
+
+
+<div class="flash-container flash-container-page">
+</div>
+
+
+</div>
+<div class=" ">
+<div class="content" id="content-body">
+
+
+<div class="container-fluid container-limited">
+<div class="tree-holder" id="tree-holder">
+<div class="nav-block">
+<div class="tree-controls">
+<a class="btn btn-grouped shortcuts-find-file" rel="nofollow" href="/johnth/aur-xen/find_file/master"><i aria-hidden="true" data-hidden="true" class="fa fa-search"></i>
+<span>Find file</span>
+</a>
+<div class="btn-group prepend-left-10" role="group"><a class="btn js-blob-blame-link" href="/johnth/aur-xen/blame/master/patch-gcc7-minios-udivmod.patch">Blame</a><a class="btn" href="/johnth/aur-xen/commits/master/patch-gcc7-minios-udivmod.patch">History</a><a class="btn js-data-file-blob-permalink-url" href="/johnth/aur-xen/blob/717dc1c8e32c3c615652f2b40838d1cb12441073/patch-gcc7-minios-udivmod.patch">Permalink</a></div>
+</div>
+<div class="tree-ref-holder">
+<form class="project-refs-form" action="/johnth/aur-xen/refs/switch" accept-charset="UTF-8" method="get"><input name="utf8" type="hidden" value="&#x2713;" /><input type="hidden" name="destination" id="destination" value="blob" />
+<input type="hidden" name="path" id="path" value="patch-gcc7-minios-udivmod.patch" />
+<div class="dropdown">
+<button class="dropdown-menu-toggle js-project-refs-dropdown" type="button" data-toggle="dropdown" data-selected="master" data-ref="master" data-refs-url="/johnth/aur-xen/refs" data-field-name="ref" data-submit-form-on-click="true"><span class="dropdown-toggle-text ">master</span><i aria-hidden="true" data-hidden="true" class="fa fa-chevron-down"></i></button>
+<div class="dropdown-menu dropdown-menu-selectable git-revision-dropdown">
+<div class="dropdown-title"><span>Switch branch/tag</span><button class="dropdown-title-button dropdown-menu-close" aria-label="Close" type="button"><i aria-hidden="true" data-hidden="true" class="fa fa-times dropdown-menu-close-icon"></i></button></div>
+<div class="dropdown-input"><input type="search" id="" class="dropdown-input-field" placeholder="Search branches and tags" autocomplete="off" /><i aria-hidden="true" data-hidden="true" class="fa fa-search dropdown-input-search"></i><i role="button" aria-hidden="true" data-hidden="true" class="fa fa-times dropdown-input-clear js-dropdown-input-clear"></i></div>
+<div class="dropdown-content"></div>
+<div class="dropdown-loading"><i aria-hidden="true" data-hidden="true" class="fa fa-spinner fa-spin"></i></div>
+</div>
+</div>
+</form>
+</div>
+<ul class="breadcrumb repo-breadcrumb">
+<li>
+<a href="/johnth/aur-xen/tree/master">aur-xen
+</a></li>
+<li>
+<a href="/johnth/aur-xen/blob/master/patch-gcc7-minios-udivmod.patch"><strong>patch-gcc7-minios-udivmod.patch</strong>
+</a></li>
+</ul>
+</div>
+
+<div class="info-well hidden-xs">
+<div class="well-segment">
+<ul class="blob-commit-info">
+<li class="commit flex-list js-toggle-container" id="commit-1c8f2873">
+<div class="avatar-cell hidden-xs">
+<a href="mailto:git@johnthomson.fastmail.com.au"><img class="avatar has-tooltip s36 hidden-xs" alt="John Thomson&#39;s avatar" title="John Thomson" data-container="body" src="https://secure.gravatar.com/avatar/676a9943dfc35a8adfb1401efd8eb18c?s=72&amp;d=identicon" /></a>
+</div>
+<div class="commit-detail">
+<div class="commit-content">
+<a class="commit-row-message item-title" href="/johnth/aur-xen/commit/1c8f28733124a3d0a0156137a548426d0e3223c3">Add mini-os gcc7 patch</a>
+<span class="commit-row-message visible-xs-inline">
+&middot;
+1c8f2873
+</span>
+<div class="commiter">
+<a class="commit-author-link has-tooltip" title="git@johnthomson.fastmail.com.au" href="mailto:git@johnthomson.fastmail.com.au">John Thomson</a> committed <time class="js-timeago" title="Jun 27, 2017 6:51am" datetime="2017-06-27T06:51:03Z" data-toggle="tooltip" data-placement="top" data-container="body">Jun 27, 2017</time>
+</div>
+</div>
+<div class="commit-actions flex-row hidden-xs">
+<a class="commit-sha btn btn-transparent" href="/johnth/aur-xen/commit/1c8f28733124a3d0a0156137a548426d0e3223c3">1c8f2873</a>
+<button class="btn btn-clipboard btn-transparent" data-toggle="tooltip" data-placement="bottom" data-container="body" data-title="Copy commit SHA to clipboard" data-clipboard-text="1c8f28733124a3d0a0156137a548426d0e3223c3" type="button" title="Copy commit SHA to clipboard" aria-label="Copy commit SHA to clipboard"><i aria-hidden="true" aria-hidden="true" data-hidden="true" class="fa fa-clipboard"></i></button>
+<a class="btn btn-default" href="/johnth/aur-xen/blob/1c8f28733124a3d0a0156137a548426d0e3223c3/PKGBUILD">Browse File</a>
+</div>
+</div>
+</li>
+
+</ul>
+</div>
+
+</div>
+<div class="blob-content-holder" id="blob-content-holder">
+<article class="file-holder">
+<div class="js-file-title file-title-flex-parent">
+<div class="file-header-content">
+<i aria-hidden="true" data-hidden="true" class="fa fa-file-text-o fa-fw"></i>
+<strong class="file-title-name">
+patch-gcc7-minios-udivmod.patch
+</strong>
+<button class="btn btn-clipboard btn-transparent prepend-left-5" data-toggle="tooltip" data-placement="bottom" data-container="body" data-class="btn-clipboard btn-transparent prepend-left-5" data-title="Copy file path to clipboard" data-clipboard-text="{&quot;text&quot;:&quot;patch-gcc7-minios-udivmod.patch&quot;,&quot;gfm&quot;:&quot;`patch-gcc7-minios-udivmod.patch`&quot;}" type="button" title="Copy file path to clipboard" aria-label="Copy file path to clipboard"><i aria-hidden="true" aria-hidden="true" data-hidden="true" class="fa fa-clipboard"></i></button>
+<small>
+1.3 KB
+</small>
+</div>
+
+<div class="file-actions hidden-xs">
+
+<div class="btn-group" role="group"><button class="btn btn btn-sm js-copy-blob-source-btn" data-toggle="tooltip" data-placement="bottom" data-container="body" data-class="btn btn-sm js-copy-blob-source-btn" data-title="Copy source to clipboard" data-clipboard-target=".blob-content[data-blob-id=&#39;868e63c202da55f461eeb315048afac4ceb1973d&#39;]" type="button" title="Copy source to clipboard" aria-label="Copy source to clipboard"><i aria-hidden="true" aria-hidden="true" data-hidden="true" class="fa fa-clipboard"></i></button><a class="btn btn-sm has-tooltip" target="_blank" rel="noopener noreferrer" title="Open raw" data-container="body" href="/johnth/aur-xen/raw/master/patch-gcc7-minios-udivmod.patch"><i aria-hidden="true" data-hidden="true" class="fa fa-file-code-o"></i></a></div>
+<div class="btn-group" role="group"><a class="btn js-edit-blob btn-sm" href="/johnth/aur-xen/edit/master/patch-gcc7-minios-udivmod.patch">Edit</a></div>
+</div>
+</div>
+
+<script>
+ PathLocks.init(
+ '/johnth/aur-xen/path_locks/toggle',
+ 'patch-gcc7-minios-udivmod.patch'
+ );
+</script>
+
+<div class="blob-viewer" data-type="simple" data-url="/johnth/aur-xen/blob/master/patch-gcc7-minios-udivmod.patch?format=json&amp;viewer=simple">
+<div class="text-center prepend-top-default append-bottom-default">
+<i aria-hidden="true" aria-label="Loading content…" class="fa fa-spinner fa-spin fa-2x"></i>
+</div>
+
+</div>
+
+
+</article>
+</div>
+
+</div>
+</div>
+
+</div>
+</div>
+</div>
+</div>
+
+
+</body>
+</html>
+
diff --git a/pcr/xen/patch-gcc7-vtpm-implicit-fallthrough.patch b/pcr/xen/patch-gcc7-vtpm-implicit-fallthrough.patch
new file mode 100644
index 000000000..69a025942
--- /dev/null
+++ b/pcr/xen/patch-gcc7-vtpm-implicit-fallthrough.patch
@@ -0,0 +1,415 @@
+<!DOCTYPE html>
+<html class="" lang="en">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<meta content="IE=edge" http-equiv="X-UA-Compatible">
+<meta content="object" property="og:type">
+<meta content="GitLab" property="og:site_name">
+<meta content="patch-gcc7-vtpm-implicit-fallthrough.patch · master · John Thomson / aur-xen" property="og:title">
+<meta content="Arch Linux PKGBUILD for Xen Project http://www.xenproject.org/ http://xenbits.xen.org/xsa/ Build in a clean chroot: https://wiki.archlinux.org/index.php/DeveloperWiki:Building_in_a_Clean_Chroot" property="og:description">
+<meta content="https://gitlab.com/assets/gitlab_logo-7ae504fe4f68fdebb3c2034e36621930cd36ea87924c11ff65dbcb8ed50dca58.png" property="og:image">
+<meta content="https://gitlab.com/johnth/aur-xen/blob/master/patch-gcc7-vtpm-implicit-fallthrough.patch" property="og:url">
+<meta content="summary" property="twitter:card">
+<meta content="patch-gcc7-vtpm-implicit-fallthrough.patch · master · John Thomson / aur-xen" property="twitter:title">
+<meta content="Arch Linux PKGBUILD for Xen Project http://www.xenproject.org/ http://xenbits.xen.org/xsa/ Build in a clean chroot: https://wiki.archlinux.org/index.php/DeveloperWiki:Building_in_a_Clean_Chroot" property="twitter:description">
+<meta content="https://gitlab.com/assets/gitlab_logo-7ae504fe4f68fdebb3c2034e36621930cd36ea87924c11ff65dbcb8ed50dca58.png" property="twitter:image">
+
+<title>patch-gcc7-vtpm-implicit-fallthrough.patch · master · John Thomson / aur-xen · GitLab</title>
+<meta content="Arch Linux PKGBUILD for Xen Project http://www.xenproject.org/ http://xenbits.xen.org/xsa/ Build in a clean chroot: https://wiki.archlinux.org/index.php/DeveloperWiki:Building_in_a_Clean_Chroot" name="description">
+<link rel="shortcut icon" type="image/x-icon" href="/assets/favicon-075eba76312e8421991a0c1f89a89ee81678bcde72319dd3e8047e2a47cd3a42.ico" id="favicon" />
+<link rel="stylesheet" media="all" href="/assets/application-bf562c36db4b06702ba455fb509cdac15b6f7b5797112e8a3784394849c9bb3b.css" />
+<link rel="stylesheet" media="print" href="/assets/print-87b4ace0db1f79d91e4fe6e74435b66b71d70fee57ffbb72d0fade17374fcc6b.css" />
+
+
+<script>
+//<![CDATA[
+window.gon={};gon.api_version="v4";gon.default_avatar_url="https:\/\/gitlab.com\/assets\/no_avatar-849f9c04a3a0d0cea2424ae97b27447dc64a7dbfae83c036c45b403392f0e8ba.png";gon.max_file_size=10;gon.asset_host=null;gon.relative_url_root="";gon.shortcuts_path="\/help\/shortcuts";gon.user_color_scheme="white";gon.katex_css_url="\/assets\/katex-e46cafe9c3fa73920a7c2c063ee8bb0613e0cf85fd96a3aea25f8419c4bfcfba.css";gon.katex_js_url="\/assets\/katex-04bcf56379fcda0ee7c7a63f71d0fc15ffd2e014d017cd9d51fd6554dfccf40a.js";gon.sentry_dsn="https:\/\/526a2f38a53d44e3a8e69bfa001d1e8b@sentry.gitlap.com\/15";gon.gitlab_url="https:\/\/gitlab.com";gon.revision="44d109d";gon.gitlab_logo="\/assets\/gitlab_logo-7ae504fe4f68fdebb3c2034e36621930cd36ea87924c11ff65dbcb8ed50dca58.png";
+//]]>
+</script>
+<script src="/assets/webpack/runtime.1e4f1a3da7dfa5700156.bundle.js"></script>
+<script src="/assets/webpack/common.a208e8b828f4e7f4759b.bundle.js"></script>
+<script src="/assets/webpack/locale.3db4c8eef74bbad2de0a.bundle.js"></script>
+<script src="/assets/webpack/main.7ca17a24789acfd5a781.bundle.js"></script>
+<script src="/assets/webpack/raven.61375d9168165e89d174.bundle.js"></script>
+
+
+<script src="/assets/webpack/blob.0051a361f2a0188b534a.bundle.js"></script>
+
+
+<meta name="csrf-param" content="authenticity_token" />
+<meta name="csrf-token" content="qEW9hoZcwmhatqIjnyB1YnnuH8hU0Q6f/Eq/KK6gN//Pw6tCW7VaRNbrBqah4D+ouMeeJsDEVk2pH3oDI3xnjg==" />
+<meta content="origin-when-cross-origin" name="referrer">
+<meta content="width=device-width, initial-scale=1, maximum-scale=1" name="viewport">
+<meta content="#474D57" name="theme-color">
+<link rel="apple-touch-icon" type="image/x-icon" href="/assets/touch-icon-iphone-5a9cee0e8a51212e70b90c87c12f382c428870c0ff67d1eb034d884b78d2dae7.png" />
+<link rel="apple-touch-icon" type="image/x-icon" href="/assets/touch-icon-ipad-a6eec6aeb9da138e507593b464fdac213047e49d3093fc30e90d9a995df83ba3.png" sizes="76x76" />
+<link rel="apple-touch-icon" type="image/x-icon" href="/assets/touch-icon-iphone-retina-72e2aadf86513a56e050e7f0f2355deaa19cc17ed97bbe5147847f2748e5a3e3.png" sizes="120x120" />
+<link rel="apple-touch-icon" type="image/x-icon" href="/assets/touch-icon-ipad-retina-8ebe416f5313483d9c1bc772b5bbe03ecad52a54eba443e5215a22caed2a16a2.png" sizes="152x152" />
+<link color="rgb(226, 67, 41)" href="/assets/logo-d36b5212042cebc89b96df4bf6ac24e43db316143e89926c0db839ff694d2de4.svg" rel="mask-icon">
+<meta content="/assets/msapplication-tile-1196ec67452f618d39cdd85e2e3a542f76574c071051ae7effbfde01710eb17d.png" name="msapplication-TileImage">
+<meta content="#30353E" name="msapplication-TileColor">
+
+
+<!-- Piwik -->
+<script>
+ var _paq = _paq || [];
+ _paq.push(['trackPageView']);
+ _paq.push(['enableLinkTracking']);
+ (function() {
+ var u="//piwik.gitlab.com/";
+ _paq.push(['setTrackerUrl', u+'piwik.php']);
+ _paq.push(['setSiteId', 1]);
+ var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
+ g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
+ })();
+</script>
+<noscript><p><img src="//piwik.gitlab.com/piwik.php?idsite=1" style="border:0;" alt="" /></p></noscript>
+<!-- End Piwik Code -->
+
+
+</head>
+
+<body class="" data-group="" data-page="projects:blob:show" data-project="aur-xen">
+
+
+<header class="navbar navbar-gitlab with-horizontal-nav">
+<div class="navbar-border"></div>
+<a class="sr-only gl-accessibility" href="#content-body" tabindex="1">Skip to content</a>
+<div class="container-fluid">
+<div class="header-content">
+<div class="dropdown global-dropdown">
+<button class="global-dropdown-toggle" data-toggle="dropdown" type="button">
+<span class="sr-only">Toggle navigation</span>
+<i aria-hidden="true" data-hidden="true" class="fa fa-bars"></i>
+</button>
+<div class="dropdown-menu-nav global-dropdown-menu">
+<ul>
+<li class="home"><a title="Projects" class="dashboard-shortcuts-projects" href="/explore"><div class="shortcut-mappings">
+<div class="key">
+<i aria-label="hidden" class="fa fa-arrow-up"></i>
+P
+</div>
+</div>
+<span>
+Projects
+</span>
+</a></li><li class=""><a title="Groups" class="dashboard-shortcuts-groups" href="/explore/groups"><div class="shortcut-mappings">
+<div class="key">
+<i aria-label="hidden" class="fa fa-arrow-up"></i>
+G
+</div>
+</div>
+<span>
+Groups
+</span>
+</a></li><li class=""><a title="Snippets" class="dashboard-shortcuts-snippets" href="/explore/snippets"><div class="shortcut-mappings">
+<div class="key">
+<i aria-label="hidden" class="fa fa-arrow-up"></i>
+S
+</div>
+</div>
+<span>
+Snippets
+</span>
+</a></li><li class="divider"></li>
+<li class=""><a title="Help" href="/help"><span>
+Help
+</span>
+</a></li></ul>
+
+</div>
+</div>
+<div class="header-logo">
+<a class="home" title="Dashboard" id="logo" href="/"><svg width="28" height="28" class="tanuki-logo" viewBox="0 0 36 36">
+ <path class="tanuki-shape tanuki-left-ear" fill="#e24329" d="M2 14l9.38 9v-9l-4-12.28c-.205-.632-1.176-.632-1.38 0z"/>
+ <path class="tanuki-shape tanuki-right-ear" fill="#e24329" d="M34 14l-9.38 9v-9l4-12.28c.205-.632 1.176-.632 1.38 0z"/>
+ <path class="tanuki-shape tanuki-nose" fill="#e24329" d="M18,34.38 3,14 33,14 Z"/>
+ <path class="tanuki-shape tanuki-left-eye" fill="#fc6d26" d="M18,34.38 11.38,14 2,14 6,25Z"/>
+ <path class="tanuki-shape tanuki-right-eye" fill="#fc6d26" d="M18,34.38 24.62,14 34,14 30,25Z"/>
+ <path class="tanuki-shape tanuki-left-cheek" fill="#fca326" d="M2 14L.1 20.16c-.18.565 0 1.2.5 1.56l17.42 12.66z"/>
+ <path class="tanuki-shape tanuki-right-cheek" fill="#fca326" d="M34 14l1.9 6.16c.18.565 0 1.2-.5 1.56L18 34.38z"/>
+</svg>
+
+</a></div>
+<div class="title-container">
+<h1 class="title"><a href="/johnth">John Thomson</a> / <a class="project-item-select-holder" href="/johnth/aur-xen">aur-xen</a></h1>
+</div>
+<div class="navbar-collapse collapse">
+<ul class="nav navbar-nav">
+<li class="hidden-sm hidden-xs">
+<div class="has-location-badge search search-form">
+<form class="navbar-form" action="/search" accept-charset="UTF-8" method="get"><input name="utf8" type="hidden" value="&#x2713;" /><div class="search-input-container">
+<div class="location-badge">This project</div>
+<div class="search-input-wrap">
+<div class="dropdown" data-url="/search/autocomplete">
+<input type="search" name="search" id="search" placeholder="Search" class="search-input dropdown-menu-toggle no-outline js-search-dashboard-options" spellcheck="false" tabindex="1" autocomplete="off" data-toggle="dropdown" data-issues-path="https://gitlab.com/dashboard/issues" data-mr-path="https://gitlab.com/dashboard/merge_requests" aria-label="Search" />
+<div class="dropdown-menu dropdown-select">
+<div class="dropdown-content"><ul>
+<li>
+<a class="is-focused dropdown-menu-empty-link">
+Loading...
+</a>
+</li>
+</ul>
+</div><div class="dropdown-loading"><i aria-hidden="true" data-hidden="true" class="fa fa-spinner fa-spin"></i></div>
+</div>
+<i class="search-icon"></i>
+<i class="clear-icon js-clear-input"></i>
+</div>
+</div>
+</div>
+<input type="hidden" name="group_id" id="group_id" class="js-search-group-options" />
+<input type="hidden" name="project_id" id="search_project_id" value="870008" class="js-search-project-options" data-project-path="aur-xen" data-name="aur-xen" data-issues-path="/johnth/aur-xen/issues" data-mr-path="/johnth/aur-xen/merge_requests" />
+<input type="hidden" name="search_code" id="search_code" value="true" />
+<input type="hidden" name="repository_ref" id="repository_ref" value="master" />
+
+<div class="search-autocomplete-opts hide" data-autocomplete-path="/search/autocomplete" data-autocomplete-project-id="870008" data-autocomplete-project-ref="master"></div>
+</form></div>
+
+</li>
+<li class="visible-sm-inline-block visible-xs-inline-block">
+<a title="Search" aria-label="Search" data-toggle="tooltip" data-placement="bottom" data-container="body" href="/search"><i aria-hidden="true" data-hidden="true" class="fa fa-search"></i>
+</a></li>
+<li>
+<div>
+<a class="btn btn-sign-in btn-success" href="/users/sign_in?redirect_to_referer=yes">Sign in</a>
+</div>
+</li>
+</ul>
+</div>
+<button class="navbar-toggle" type="button">
+<span class="sr-only">Toggle navigation</span>
+<i aria-hidden="true" data-hidden="true" class="fa fa-ellipsis-v"></i>
+</button>
+<div class="js-dropdown-menu-projects">
+<div class="dropdown-menu dropdown-select dropdown-menu-projects">
+<div class="dropdown-title"><span>Go to a project</span><button class="dropdown-title-button dropdown-menu-close" aria-label="Close" type="button"><i aria-hidden="true" data-hidden="true" class="fa fa-times dropdown-menu-close-icon"></i></button></div>
+<div class="dropdown-input"><input type="search" id="" class="dropdown-input-field" placeholder="Search your projects" autocomplete="off" /><i aria-hidden="true" data-hidden="true" class="fa fa-search dropdown-input-search"></i><i role="button" aria-hidden="true" data-hidden="true" class="fa fa-times dropdown-input-clear js-dropdown-input-clear"></i></div>
+<div class="dropdown-content"></div>
+<div class="dropdown-loading"><i aria-hidden="true" data-hidden="true" class="fa fa-spinner fa-spin"></i></div>
+</div>
+</div>
+
+</div>
+</div>
+</header>
+
+<script>
+ var findFileURL = "/johnth/aur-xen/find_file/master";
+</script>
+
+<div class="page-with-sidebar">
+<div class="layout-nav">
+<div class="container-fluid">
+<div class="scrolling-tabs-container">
+<div class="fade-left">
+<i aria-hidden="true" data-hidden="true" class="fa fa-angle-left"></i>
+</div>
+<div class="fade-right">
+<i aria-hidden="true" data-hidden="true" class="fa fa-angle-right"></i>
+</div>
+<ul class="nav-links scrolling-tabs">
+<li class="home"><a title="Project" class="shortcuts-project" href="/johnth/aur-xen"><span>
+Project
+</span>
+</a></li><li class="active"><a title="Repository" class="shortcuts-tree" href="/johnth/aur-xen/tree/master"><span>
+Repository
+</span>
+</a></li><li class=""><a title="Issues" class="shortcuts-issues" href="/johnth/aur-xen/issues"><span>
+Issues
+<span class="badge count issue_counter">1</span>
+</span>
+</a></li><li class=""><a title="Merge Requests" class="shortcuts-merge_requests" href="/johnth/aur-xen/merge_requests"><span>
+Merge Requests
+<span class="badge count merge_counter js-merge-counter">0</span>
+</span>
+</a></li><li class=""><a title="Pipelines" class="shortcuts-pipelines" href="/johnth/aur-xen/pipelines"><span>
+Pipelines
+</span>
+</a></li><li class=""><a title="Wiki" class="shortcuts-wiki" href="/johnth/aur-xen/wikis/home"><span>
+Wiki
+</span>
+</a></li><li class=""><a title="Snippets" class="shortcuts-snippets" href="/johnth/aur-xen/snippets"><span>
+Snippets
+</span>
+</a></li><li class=""><a title="Settings" class="shortcuts-tree" href="/johnth/aur-xen/settings/members"><span>
+Settings
+</span>
+</a></li><li class="hidden">
+<a title="Activity" class="shortcuts-project-activity" href="/johnth/aur-xen/activity"><span>
+Activity
+</span>
+</a></li>
+<li class="hidden">
+<a title="Network" class="shortcuts-network" href="/johnth/aur-xen/network/master">Graph
+</a></li>
+<li class="hidden">
+<a title="Charts" class="shortcuts-repository-charts" href="/johnth/aur-xen/graphs/master/charts">Charts
+</a></li>
+<li class="hidden">
+<a class="shortcuts-new-issue" href="/johnth/aur-xen/issues/new">Create a new issue
+</a></li>
+<li class="hidden">
+<a title="Jobs" class="shortcuts-builds" href="/johnth/aur-xen/-/jobs">Jobs
+</a></li>
+<li class="hidden">
+<a title="Commits" class="shortcuts-commits" href="/johnth/aur-xen/commits/master">Commits
+</a></li>
+<li class="hidden">
+<a title="Issue Boards" class="shortcuts-issue-boards" href="/johnth/aur-xen/boards">Issue Boards</a>
+</li>
+</ul>
+</div>
+
+</div>
+</div>
+<div class="scrolling-tabs-container sub-nav-scroll">
+<div class="fade-left">
+<i aria-hidden="true" data-hidden="true" class="fa fa-angle-left"></i>
+</div>
+<div class="fade-right">
+<i aria-hidden="true" data-hidden="true" class="fa fa-angle-right"></i>
+</div>
+
+<div class="nav-links sub-nav scrolling-tabs">
+<ul class="container-fluid container-limited">
+<li class="active"><a href="/johnth/aur-xen/tree/master">Files
+</a></li><li class=""><a href="/johnth/aur-xen/commits/master">Commits
+</a></li><li class=""><a href="/johnth/aur-xen/branches">Branches
+</a></li><li class=""><a href="/johnth/aur-xen/tags">Tags
+</a></li><li class=""><a href="/johnth/aur-xen/graphs/master">Contributors
+</a></li><li class=""><a href="/johnth/aur-xen/network/master">Graph
+</a></li><li class=""><a href="/johnth/aur-xen/compare?from=master&amp;to=master">Compare
+</a></li><li class=""><a href="/johnth/aur-xen/graphs/master/charts">Charts
+</a></li><li class=""><a href="/johnth/aur-xen/path_locks">Locked Files
+</a></li></ul>
+</div>
+</div>
+
+<div class="content-wrapper page-with-layout-nav page-with-sub-nav">
+<div class="alert-wrapper">
+
+
+<div class="flash-container flash-container-page">
+</div>
+
+
+</div>
+<div class=" ">
+<div class="content" id="content-body">
+
+
+<div class="container-fluid container-limited">
+<div class="tree-holder" id="tree-holder">
+<div class="nav-block">
+<div class="tree-controls">
+<a class="btn btn-grouped shortcuts-find-file" rel="nofollow" href="/johnth/aur-xen/find_file/master"><i aria-hidden="true" data-hidden="true" class="fa fa-search"></i>
+<span>Find file</span>
+</a>
+<div class="btn-group prepend-left-10" role="group"><a class="btn js-blob-blame-link" href="/johnth/aur-xen/blame/master/patch-gcc7-vtpm-implicit-fallthrough.patch">Blame</a><a class="btn" href="/johnth/aur-xen/commits/master/patch-gcc7-vtpm-implicit-fallthrough.patch">History</a><a class="btn js-data-file-blob-permalink-url" href="/johnth/aur-xen/blob/717dc1c8e32c3c615652f2b40838d1cb12441073/patch-gcc7-vtpm-implicit-fallthrough.patch">Permalink</a></div>
+</div>
+<div class="tree-ref-holder">
+<form class="project-refs-form" action="/johnth/aur-xen/refs/switch" accept-charset="UTF-8" method="get"><input name="utf8" type="hidden" value="&#x2713;" /><input type="hidden" name="destination" id="destination" value="blob" />
+<input type="hidden" name="path" id="path" value="patch-gcc7-vtpm-implicit-fallthrough.patch" />
+<div class="dropdown">
+<button class="dropdown-menu-toggle js-project-refs-dropdown" type="button" data-toggle="dropdown" data-selected="master" data-ref="master" data-refs-url="/johnth/aur-xen/refs" data-field-name="ref" data-submit-form-on-click="true"><span class="dropdown-toggle-text ">master</span><i aria-hidden="true" data-hidden="true" class="fa fa-chevron-down"></i></button>
+<div class="dropdown-menu dropdown-menu-selectable git-revision-dropdown">
+<div class="dropdown-title"><span>Switch branch/tag</span><button class="dropdown-title-button dropdown-menu-close" aria-label="Close" type="button"><i aria-hidden="true" data-hidden="true" class="fa fa-times dropdown-menu-close-icon"></i></button></div>
+<div class="dropdown-input"><input type="search" id="" class="dropdown-input-field" placeholder="Search branches and tags" autocomplete="off" /><i aria-hidden="true" data-hidden="true" class="fa fa-search dropdown-input-search"></i><i role="button" aria-hidden="true" data-hidden="true" class="fa fa-times dropdown-input-clear js-dropdown-input-clear"></i></div>
+<div class="dropdown-content"></div>
+<div class="dropdown-loading"><i aria-hidden="true" data-hidden="true" class="fa fa-spinner fa-spin"></i></div>
+</div>
+</div>
+</form>
+</div>
+<ul class="breadcrumb repo-breadcrumb">
+<li>
+<a href="/johnth/aur-xen/tree/master">aur-xen
+</a></li>
+<li>
+<a href="/johnth/aur-xen/blob/master/patch-gcc7-vtpm-implicit-fallthrough.patch"><strong>patch-gcc7-vtpm-implicit-fallthrough....</strong>
+</a></li>
+</ul>
+</div>
+
+<div class="info-well hidden-xs">
+<div class="well-segment">
+<ul class="blob-commit-info">
+<li class="commit flex-list js-toggle-container" id="commit-e2367dfa">
+<div class="avatar-cell hidden-xs">
+<a href="mailto:git@johnthomson.fastmail.com.au"><img class="avatar has-tooltip s36 hidden-xs" alt="John Thomson&#39;s avatar" title="John Thomson" data-container="body" src="https://secure.gravatar.com/avatar/676a9943dfc35a8adfb1401efd8eb18c?s=72&amp;d=identicon" /></a>
+</div>
+<div class="commit-detail">
+<div class="commit-content">
+<a class="commit-row-message item-title" href="/johnth/aur-xen/commit/e2367dfafa3ccddb4e4897a742bbab469ca7071c">Fix vtpm implicit fallthrough patch</a>
+<span class="commit-row-message visible-xs-inline">
+&middot;
+e2367dfa
+</span>
+<div class="commiter">
+<a class="commit-author-link has-tooltip" title="git@johnthomson.fastmail.com.au" href="mailto:git@johnthomson.fastmail.com.au">John Thomson</a> committed <time class="js-timeago" title="Jun 27, 2017 9:37pm" datetime="2017-06-27T21:37:35Z" data-toggle="tooltip" data-placement="top" data-container="body">Jun 28, 2017</time>
+</div>
+</div>
+<div class="commit-actions flex-row hidden-xs">
+<a class="commit-sha btn btn-transparent" href="/johnth/aur-xen/commit/e2367dfafa3ccddb4e4897a742bbab469ca7071c">e2367dfa</a>
+<button class="btn btn-clipboard btn-transparent" data-toggle="tooltip" data-placement="bottom" data-container="body" data-title="Copy commit SHA to clipboard" data-clipboard-text="e2367dfafa3ccddb4e4897a742bbab469ca7071c" type="button" title="Copy commit SHA to clipboard" aria-label="Copy commit SHA to clipboard"><i aria-hidden="true" aria-hidden="true" data-hidden="true" class="fa fa-clipboard"></i></button>
+<a class="btn btn-default" href="/johnth/aur-xen/blob/e2367dfafa3ccddb4e4897a742bbab469ca7071c/PKGBUILD">Browse File</a>
+</div>
+</div>
+</li>
+
+</ul>
+</div>
+
+</div>
+<div class="blob-content-holder" id="blob-content-holder">
+<article class="file-holder">
+<div class="js-file-title file-title-flex-parent">
+<div class="file-header-content">
+<i aria-hidden="true" data-hidden="true" class="fa fa-file-text-o fa-fw"></i>
+<strong class="file-title-name">
+patch-gcc7-vtpm-implicit-fallthrough.patch
+</strong>
+<button class="btn btn-clipboard btn-transparent prepend-left-5" data-toggle="tooltip" data-placement="bottom" data-container="body" data-class="btn-clipboard btn-transparent prepend-left-5" data-title="Copy file path to clipboard" data-clipboard-text="{&quot;text&quot;:&quot;patch-gcc7-vtpm-implicit-fallthrough.patch&quot;,&quot;gfm&quot;:&quot;`patch-gcc7-vtpm-implicit-fallthrough.patch`&quot;}" type="button" title="Copy file path to clipboard" aria-label="Copy file path to clipboard"><i aria-hidden="true" aria-hidden="true" data-hidden="true" class="fa fa-clipboard"></i></button>
+<small>
+1.91 KB
+</small>
+</div>
+
+<div class="file-actions hidden-xs">
+
+<div class="btn-group" role="group"><button class="btn btn btn-sm js-copy-blob-source-btn" data-toggle="tooltip" data-placement="bottom" data-container="body" data-class="btn btn-sm js-copy-blob-source-btn" data-title="Copy source to clipboard" data-clipboard-target=".blob-content[data-blob-id=&#39;068752d2d1a04828f9b9b2c9112a567717d7b66a&#39;]" type="button" title="Copy source to clipboard" aria-label="Copy source to clipboard"><i aria-hidden="true" aria-hidden="true" data-hidden="true" class="fa fa-clipboard"></i></button><a class="btn btn-sm has-tooltip" target="_blank" rel="noopener noreferrer" title="Open raw" data-container="body" href="/johnth/aur-xen/raw/master/patch-gcc7-vtpm-implicit-fallthrough.patch"><i aria-hidden="true" data-hidden="true" class="fa fa-file-code-o"></i></a></div>
+<div class="btn-group" role="group"><a class="btn js-edit-blob btn-sm" href="/johnth/aur-xen/edit/master/patch-gcc7-vtpm-implicit-fallthrough.patch">Edit</a></div>
+</div>
+</div>
+
+<script>
+ PathLocks.init(
+ '/johnth/aur-xen/path_locks/toggle',
+ 'patch-gcc7-vtpm-implicit-fallthrough.patch'
+ );
+</script>
+
+<div class="blob-viewer" data-type="simple" data-url="/johnth/aur-xen/blob/master/patch-gcc7-vtpm-implicit-fallthrough.patch?format=json&amp;viewer=simple">
+<div class="text-center prepend-top-default append-bottom-default">
+<i aria-hidden="true" aria-label="Loading content…" class="fa fa-spinner fa-spin fa-2x"></i>
+</div>
+
+</div>
+
+
+</article>
+</div>
+
+</div>
+</div>
+
+</div>
+</div>
+</div>
+</div>
+
+
+</body>
+</html>
+
diff --git a/pcr/xen/patch-gcc7-vtpmmgr-make-inline-static.patch b/pcr/xen/patch-gcc7-vtpmmgr-make-inline-static.patch
new file mode 100644
index 000000000..4238d3d66
--- /dev/null
+++ b/pcr/xen/patch-gcc7-vtpmmgr-make-inline-static.patch
@@ -0,0 +1,417 @@
+<!DOCTYPE html>
+<html class="" lang="en">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<meta content="IE=edge" http-equiv="X-UA-Compatible">
+<meta content="object" property="og:type">
+<meta content="GitLab" property="og:site_name">
+<meta content="patch-gcc7-vtpmmgr-make-inline-static.patch · master · John Thomson / aur-xen" property="og:title">
+<meta content="Arch Linux PKGBUILD for Xen Project http://www.xenproject.org/ http://xenbits.xen.org/xsa/ Build in a clean chroot: https://wiki.archlinux.org/index.php/DeveloperWiki:Building_in_a_Clean_Chroot" property="og:description">
+<meta content="https://gitlab.com/assets/gitlab_logo-7ae504fe4f68fdebb3c2034e36621930cd36ea87924c11ff65dbcb8ed50dca58.png" property="og:image">
+<meta content="https://gitlab.com/johnth/aur-xen/blob/master/patch-gcc7-vtpmmgr-make-inline-static.patch" property="og:url">
+<meta content="summary" property="twitter:card">
+<meta content="patch-gcc7-vtpmmgr-make-inline-static.patch · master · John Thomson / aur-xen" property="twitter:title">
+<meta content="Arch Linux PKGBUILD for Xen Project http://www.xenproject.org/ http://xenbits.xen.org/xsa/ Build in a clean chroot: https://wiki.archlinux.org/index.php/DeveloperWiki:Building_in_a_Clean_Chroot" property="twitter:description">
+<meta content="https://gitlab.com/assets/gitlab_logo-7ae504fe4f68fdebb3c2034e36621930cd36ea87924c11ff65dbcb8ed50dca58.png" property="twitter:image">
+
+<title>patch-gcc7-vtpmmgr-make-inline-static.patch · master · John Thomson / aur-xen · GitLab</title>
+<meta content="Arch Linux PKGBUILD for Xen Project http://www.xenproject.org/ http://xenbits.xen.org/xsa/ Build in a clean chroot: https://wiki.archlinux.org/index.php/DeveloperWiki:Building_in_a_Clean_Chroot" name="description">
+<link rel="shortcut icon" type="image/x-icon" href="/assets/favicon-075eba76312e8421991a0c1f89a89ee81678bcde72319dd3e8047e2a47cd3a42.ico" id="favicon" />
+<link rel="stylesheet" media="all" href="/assets/application-bf562c36db4b06702ba455fb509cdac15b6f7b5797112e8a3784394849c9bb3b.css" />
+<link rel="stylesheet" media="print" href="/assets/print-87b4ace0db1f79d91e4fe6e74435b66b71d70fee57ffbb72d0fade17374fcc6b.css" />
+
+
+<script>
+//<![CDATA[
+window.gon={};gon.api_version="v4";gon.default_avatar_url="https:\/\/gitlab.com\/assets\/no_avatar-849f9c04a3a0d0cea2424ae97b27447dc64a7dbfae83c036c45b403392f0e8ba.png";gon.max_file_size=10;gon.asset_host=null;gon.relative_url_root="";gon.shortcuts_path="\/help\/shortcuts";gon.user_color_scheme="white";gon.katex_css_url="\/assets\/katex-e46cafe9c3fa73920a7c2c063ee8bb0613e0cf85fd96a3aea25f8419c4bfcfba.css";gon.katex_js_url="\/assets\/katex-04bcf56379fcda0ee7c7a63f71d0fc15ffd2e014d017cd9d51fd6554dfccf40a.js";gon.sentry_dsn="https:\/\/526a2f38a53d44e3a8e69bfa001d1e8b@sentry.gitlap.com\/15";gon.gitlab_url="https:\/\/gitlab.com";gon.revision="44d109d";gon.gitlab_logo="\/assets\/gitlab_logo-7ae504fe4f68fdebb3c2034e36621930cd36ea87924c11ff65dbcb8ed50dca58.png";
+//]]>
+</script>
+<script src="/assets/webpack/runtime.1e4f1a3da7dfa5700156.bundle.js"></script>
+<script src="/assets/webpack/common.a208e8b828f4e7f4759b.bundle.js"></script>
+<script src="/assets/webpack/locale.3db4c8eef74bbad2de0a.bundle.js"></script>
+<script src="/assets/webpack/main.7ca17a24789acfd5a781.bundle.js"></script>
+<script src="/assets/webpack/raven.61375d9168165e89d174.bundle.js"></script>
+
+
+<script src="/assets/webpack/blob.0051a361f2a0188b534a.bundle.js"></script>
+
+
+<meta name="csrf-param" content="authenticity_token" />
+<meta name="csrf-token" content="UjqSq8HM/ZyErgTvpLB8ZdX0nRoeDqDV5gNQCpNkkklP5FVeqmYiw8szmtxGjaln+NcSPMiKZzJ03Q6t+Scn2w==" />
+<meta content="origin-when-cross-origin" name="referrer">
+<meta content="width=device-width, initial-scale=1, maximum-scale=1" name="viewport">
+<meta content="#474D57" name="theme-color">
+<link rel="apple-touch-icon" type="image/x-icon" href="/assets/touch-icon-iphone-5a9cee0e8a51212e70b90c87c12f382c428870c0ff67d1eb034d884b78d2dae7.png" />
+<link rel="apple-touch-icon" type="image/x-icon" href="/assets/touch-icon-ipad-a6eec6aeb9da138e507593b464fdac213047e49d3093fc30e90d9a995df83ba3.png" sizes="76x76" />
+<link rel="apple-touch-icon" type="image/x-icon" href="/assets/touch-icon-iphone-retina-72e2aadf86513a56e050e7f0f2355deaa19cc17ed97bbe5147847f2748e5a3e3.png" sizes="120x120" />
+<link rel="apple-touch-icon" type="image/x-icon" href="/assets/touch-icon-ipad-retina-8ebe416f5313483d9c1bc772b5bbe03ecad52a54eba443e5215a22caed2a16a2.png" sizes="152x152" />
+<link color="rgb(226, 67, 41)" href="/assets/logo-d36b5212042cebc89b96df4bf6ac24e43db316143e89926c0db839ff694d2de4.svg" rel="mask-icon">
+<meta content="/assets/msapplication-tile-1196ec67452f618d39cdd85e2e3a542f76574c071051ae7effbfde01710eb17d.png" name="msapplication-TileImage">
+<meta content="#30353E" name="msapplication-TileColor">
+
+
+<!-- Piwik -->
+<script>
+ var _paq = _paq || [];
+ _paq.push(['trackPageView']);
+ _paq.push(['enableLinkTracking']);
+ (function() {
+ var u="//piwik.gitlab.com/";
+ _paq.push(['setTrackerUrl', u+'piwik.php']);
+ _paq.push(['setSiteId', 1]);
+ var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
+ g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
+ })();
+</script>
+<noscript><p><img src="//piwik.gitlab.com/piwik.php?idsite=1" style="border:0;" alt="" /></p></noscript>
+<!-- End Piwik Code -->
+
+
+</head>
+
+<body class="" data-group="" data-page="projects:blob:show" data-project="aur-xen">
+
+
+<header class="navbar navbar-gitlab with-horizontal-nav">
+<div class="navbar-border"></div>
+<a class="sr-only gl-accessibility" href="#content-body" tabindex="1">Skip to content</a>
+<div class="container-fluid">
+<div class="header-content">
+<div class="dropdown global-dropdown">
+<button class="global-dropdown-toggle" data-toggle="dropdown" type="button">
+<span class="sr-only">Toggle navigation</span>
+<i aria-hidden="true" data-hidden="true" class="fa fa-bars"></i>
+</button>
+<div class="dropdown-menu-nav global-dropdown-menu">
+<ul>
+<li class="home"><a title="Projects" class="dashboard-shortcuts-projects" href="/explore"><div class="shortcut-mappings">
+<div class="key">
+<i aria-label="hidden" class="fa fa-arrow-up"></i>
+P
+</div>
+</div>
+<span>
+Projects
+</span>
+</a></li><li class=""><a title="Groups" class="dashboard-shortcuts-groups" href="/explore/groups"><div class="shortcut-mappings">
+<div class="key">
+<i aria-label="hidden" class="fa fa-arrow-up"></i>
+G
+</div>
+</div>
+<span>
+Groups
+</span>
+</a></li><li class=""><a title="Snippets" class="dashboard-shortcuts-snippets" href="/explore/snippets"><div class="shortcut-mappings">
+<div class="key">
+<i aria-label="hidden" class="fa fa-arrow-up"></i>
+S
+</div>
+</div>
+<span>
+Snippets
+</span>
+</a></li><li class="divider"></li>
+<li class=""><a title="Help" href="/help"><span>
+Help
+</span>
+</a></li></ul>
+
+</div>
+</div>
+<div class="header-logo">
+<a class="home" title="Dashboard" id="logo" href="/"><svg width="28" height="28" class="tanuki-logo" viewBox="0 0 36 36">
+ <path class="tanuki-shape tanuki-left-ear" fill="#e24329" d="M2 14l9.38 9v-9l-4-12.28c-.205-.632-1.176-.632-1.38 0z"/>
+ <path class="tanuki-shape tanuki-right-ear" fill="#e24329" d="M34 14l-9.38 9v-9l4-12.28c.205-.632 1.176-.632 1.38 0z"/>
+ <path class="tanuki-shape tanuki-nose" fill="#e24329" d="M18,34.38 3,14 33,14 Z"/>
+ <path class="tanuki-shape tanuki-left-eye" fill="#fc6d26" d="M18,34.38 11.38,14 2,14 6,25Z"/>
+ <path class="tanuki-shape tanuki-right-eye" fill="#fc6d26" d="M18,34.38 24.62,14 34,14 30,25Z"/>
+ <path class="tanuki-shape tanuki-left-cheek" fill="#fca326" d="M2 14L.1 20.16c-.18.565 0 1.2.5 1.56l17.42 12.66z"/>
+ <path class="tanuki-shape tanuki-right-cheek" fill="#fca326" d="M34 14l1.9 6.16c.18.565 0 1.2-.5 1.56L18 34.38z"/>
+</svg>
+
+</a></div>
+<div class="title-container">
+<h1 class="title"><a href="/johnth">John Thomson</a> / <a class="project-item-select-holder" href="/johnth/aur-xen">aur-xen</a></h1>
+</div>
+<div class="navbar-collapse collapse">
+<ul class="nav navbar-nav">
+<li class="hidden-sm hidden-xs">
+<div class="has-location-badge search search-form">
+<form class="navbar-form" action="/search" accept-charset="UTF-8" method="get"><input name="utf8" type="hidden" value="&#x2713;" /><div class="search-input-container">
+<div class="location-badge">This project</div>
+<div class="search-input-wrap">
+<div class="dropdown" data-url="/search/autocomplete">
+<input type="search" name="search" id="search" placeholder="Search" class="search-input dropdown-menu-toggle no-outline js-search-dashboard-options" spellcheck="false" tabindex="1" autocomplete="off" data-toggle="dropdown" data-issues-path="https://gitlab.com/dashboard/issues" data-mr-path="https://gitlab.com/dashboard/merge_requests" aria-label="Search" />
+<div class="dropdown-menu dropdown-select">
+<div class="dropdown-content"><ul>
+<li>
+<a class="is-focused dropdown-menu-empty-link">
+Loading...
+</a>
+</li>
+</ul>
+</div><div class="dropdown-loading"><i aria-hidden="true" data-hidden="true" class="fa fa-spinner fa-spin"></i></div>
+</div>
+<i class="search-icon"></i>
+<i class="clear-icon js-clear-input"></i>
+</div>
+</div>
+</div>
+<input type="hidden" name="group_id" id="group_id" class="js-search-group-options" />
+<input type="hidden" name="project_id" id="search_project_id" value="870008" class="js-search-project-options" data-project-path="aur-xen" data-name="aur-xen" data-issues-path="/johnth/aur-xen/issues" data-mr-path="/johnth/aur-xen/merge_requests" />
+<input type="hidden" name="search_code" id="search_code" value="true" />
+<input type="hidden" name="repository_ref" id="repository_ref" value="master" />
+
+<div class="search-autocomplete-opts hide" data-autocomplete-path="/search/autocomplete" data-autocomplete-project-id="870008" data-autocomplete-project-ref="master"></div>
+</form></div>
+
+</li>
+<li class="visible-sm-inline-block visible-xs-inline-block">
+<a title="Search" aria-label="Search" data-toggle="tooltip" data-placement="bottom" data-container="body" href="/search"><i aria-hidden="true" data-hidden="true" class="fa fa-search"></i>
+</a></li>
+<li>
+<div>
+<a class="btn btn-sign-in btn-success" href="/users/sign_in?redirect_to_referer=yes">Sign in</a>
+</div>
+</li>
+</ul>
+</div>
+<button class="navbar-toggle" type="button">
+<span class="sr-only">Toggle navigation</span>
+<i aria-hidden="true" data-hidden="true" class="fa fa-ellipsis-v"></i>
+</button>
+<div class="js-dropdown-menu-projects">
+<div class="dropdown-menu dropdown-select dropdown-menu-projects">
+<div class="dropdown-title"><span>Go to a project</span><button class="dropdown-title-button dropdown-menu-close" aria-label="Close" type="button"><i aria-hidden="true" data-hidden="true" class="fa fa-times dropdown-menu-close-icon"></i></button></div>
+<div class="dropdown-input"><input type="search" id="" class="dropdown-input-field" placeholder="Search your projects" autocomplete="off" /><i aria-hidden="true" data-hidden="true" class="fa fa-search dropdown-input-search"></i><i role="button" aria-hidden="true" data-hidden="true" class="fa fa-times dropdown-input-clear js-dropdown-input-clear"></i></div>
+<div class="dropdown-content"></div>
+<div class="dropdown-loading"><i aria-hidden="true" data-hidden="true" class="fa fa-spinner fa-spin"></i></div>
+</div>
+</div>
+
+</div>
+</div>
+</header>
+
+<script>
+ var findFileURL = "/johnth/aur-xen/find_file/master";
+</script>
+
+<div class="page-with-sidebar">
+<div class="layout-nav">
+<div class="container-fluid">
+<div class="scrolling-tabs-container">
+<div class="fade-left">
+<i aria-hidden="true" data-hidden="true" class="fa fa-angle-left"></i>
+</div>
+<div class="fade-right">
+<i aria-hidden="true" data-hidden="true" class="fa fa-angle-right"></i>
+</div>
+<ul class="nav-links scrolling-tabs">
+<li class="home"><a title="Project" class="shortcuts-project" href="/johnth/aur-xen"><span>
+Project
+</span>
+</a></li><li class="active"><a title="Repository" class="shortcuts-tree" href="/johnth/aur-xen/tree/master"><span>
+Repository
+</span>
+</a></li><li class=""><a title="Issues" class="shortcuts-issues" href="/johnth/aur-xen/issues"><span>
+Issues
+<span class="badge count issue_counter">1</span>
+</span>
+</a></li><li class=""><a title="Merge Requests" class="shortcuts-merge_requests" href="/johnth/aur-xen/merge_requests"><span>
+Merge Requests
+<span class="badge count merge_counter js-merge-counter">0</span>
+</span>
+</a></li><li class=""><a title="Pipelines" class="shortcuts-pipelines" href="/johnth/aur-xen/pipelines"><span>
+Pipelines
+</span>
+</a></li><li class=""><a title="Wiki" class="shortcuts-wiki" href="/johnth/aur-xen/wikis/home"><span>
+Wiki
+</span>
+</a></li><li class=""><a title="Snippets" class="shortcuts-snippets" href="/johnth/aur-xen/snippets"><span>
+Snippets
+</span>
+</a></li><li class=""><a title="Settings" class="shortcuts-tree" href="/johnth/aur-xen/settings/members"><span>
+Settings
+</span>
+</a></li><li class="hidden">
+<a title="Activity" class="shortcuts-project-activity" href="/johnth/aur-xen/activity"><span>
+Activity
+</span>
+</a></li>
+<li class="hidden">
+<a title="Network" class="shortcuts-network" href="/johnth/aur-xen/network/master">Graph
+</a></li>
+<li class="hidden">
+<a title="Charts" class="shortcuts-repository-charts" href="/johnth/aur-xen/graphs/master/charts">Charts
+</a></li>
+<li class="hidden">
+<a class="shortcuts-new-issue" href="/johnth/aur-xen/issues/new">Create a new issue
+</a></li>
+<li class="hidden">
+<a title="Jobs" class="shortcuts-builds" href="/johnth/aur-xen/-/jobs">Jobs
+</a></li>
+<li class="hidden">
+<a title="Commits" class="shortcuts-commits" href="/johnth/aur-xen/commits/master">Commits
+</a></li>
+<li class="hidden">
+<a title="Issue Boards" class="shortcuts-issue-boards" href="/johnth/aur-xen/boards">Issue Boards</a>
+</li>
+</ul>
+</div>
+
+</div>
+</div>
+<div class="scrolling-tabs-container sub-nav-scroll">
+<div class="fade-left">
+<i aria-hidden="true" data-hidden="true" class="fa fa-angle-left"></i>
+</div>
+<div class="fade-right">
+<i aria-hidden="true" data-hidden="true" class="fa fa-angle-right"></i>
+</div>
+
+<div class="nav-links sub-nav scrolling-tabs">
+<ul class="container-fluid container-limited">
+<li class="active"><a href="/johnth/aur-xen/tree/master">Files
+</a></li><li class=""><a href="/johnth/aur-xen/commits/master">Commits
+</a></li><li class=""><a href="/johnth/aur-xen/branches">Branches
+</a></li><li class=""><a href="/johnth/aur-xen/tags">Tags
+</a></li><li class=""><a href="/johnth/aur-xen/graphs/master">Contributors
+</a></li><li class=""><a href="/johnth/aur-xen/network/master">Graph
+</a></li><li class=""><a href="/johnth/aur-xen/compare?from=master&amp;to=master">Compare
+</a></li><li class=""><a href="/johnth/aur-xen/graphs/master/charts">Charts
+</a></li><li class=""><a href="/johnth/aur-xen/path_locks">Locked Files
+</a></li></ul>
+</div>
+</div>
+
+<div class="content-wrapper page-with-layout-nav page-with-sub-nav">
+<div class="alert-wrapper">
+
+
+<div class="flash-container flash-container-page">
+</div>
+
+
+</div>
+<div class=" ">
+<div class="content" id="content-body">
+
+
+<div class="container-fluid container-limited">
+<div class="tree-holder" id="tree-holder">
+<div class="nav-block">
+<div class="tree-controls">
+<a class="btn btn-grouped shortcuts-find-file" rel="nofollow" href="/johnth/aur-xen/find_file/master"><i aria-hidden="true" data-hidden="true" class="fa fa-search"></i>
+<span>Find file</span>
+</a>
+<div class="btn-group prepend-left-10" role="group"><a class="btn js-blob-blame-link" href="/johnth/aur-xen/blame/master/patch-gcc7-vtpmmgr-make-inline-static.patch">Blame</a><a class="btn" href="/johnth/aur-xen/commits/master/patch-gcc7-vtpmmgr-make-inline-static.patch">History</a><a class="btn js-data-file-blob-permalink-url" href="/johnth/aur-xen/blob/717dc1c8e32c3c615652f2b40838d1cb12441073/patch-gcc7-vtpmmgr-make-inline-static.patch">Permalink</a></div>
+</div>
+<div class="tree-ref-holder">
+<form class="project-refs-form" action="/johnth/aur-xen/refs/switch" accept-charset="UTF-8" method="get"><input name="utf8" type="hidden" value="&#x2713;" /><input type="hidden" name="destination" id="destination" value="blob" />
+<input type="hidden" name="path" id="path" value="patch-gcc7-vtpmmgr-make-inline-static.patch" />
+<div class="dropdown">
+<button class="dropdown-menu-toggle js-project-refs-dropdown" type="button" data-toggle="dropdown" data-selected="master" data-ref="master" data-refs-url="/johnth/aur-xen/refs" data-field-name="ref" data-submit-form-on-click="true"><span class="dropdown-toggle-text ">master</span><i aria-hidden="true" data-hidden="true" class="fa fa-chevron-down"></i></button>
+<div class="dropdown-menu dropdown-menu-selectable git-revision-dropdown">
+<div class="dropdown-title"><span>Switch branch/tag</span><button class="dropdown-title-button dropdown-menu-close" aria-label="Close" type="button"><i aria-hidden="true" data-hidden="true" class="fa fa-times dropdown-menu-close-icon"></i></button></div>
+<div class="dropdown-input"><input type="search" id="" class="dropdown-input-field" placeholder="Search branches and tags" autocomplete="off" /><i aria-hidden="true" data-hidden="true" class="fa fa-search dropdown-input-search"></i><i role="button" aria-hidden="true" data-hidden="true" class="fa fa-times dropdown-input-clear js-dropdown-input-clear"></i></div>
+<div class="dropdown-content"></div>
+<div class="dropdown-loading"><i aria-hidden="true" data-hidden="true" class="fa fa-spinner fa-spin"></i></div>
+</div>
+</div>
+</form>
+</div>
+<ul class="breadcrumb repo-breadcrumb">
+<li>
+<a href="/johnth/aur-xen/tree/master">aur-xen
+</a></li>
+<li>
+<a href="/johnth/aur-xen/blob/master/patch-gcc7-vtpmmgr-make-inline-static.patch"><strong>patch-gcc7-vtpmmgr-make-inline-static...</strong>
+</a></li>
+</ul>
+</div>
+
+<div class="info-well hidden-xs">
+<div class="well-segment">
+<ul class="blob-commit-info">
+<li class="commit flex-list js-toggle-container" id="commit-2c8370a2">
+<div class="avatar-cell hidden-xs">
+<a href="mailto:git@johnthomson.fastmail.com.au"><img class="avatar has-tooltip s36 hidden-xs" alt="John Thomson&#39;s avatar" title="John Thomson" data-container="body" src="https://secure.gravatar.com/avatar/676a9943dfc35a8adfb1401efd8eb18c?s=72&amp;d=identicon" /></a>
+</div>
+<div class="commit-detail">
+<div class="commit-content">
+<a class="commit-row-message item-title" href="/johnth/aur-xen/commit/2c8370a23b1fcc835277977d820b083b8add32cd">Add make inline functions static for vtpmmgr patch</a>
+<span class="commit-row-message visible-xs-inline">
+&middot;
+2c8370a2
+</span>
+<button class="text-expander hidden-xs js-toggle-button" type="button">...</button>
+<pre class="commit-row-description js-toggle-content">&#x000A;<a href="http://markmail.org/message/vwjl6evpa7t5cghf" rel="nofollow noreferrer noopener" target="_blank">http://markmail.org/message/vwjl6evpa7t5cghf</a></pre>
+<div class="commiter">
+<a class="commit-author-link has-tooltip" title="git@johnthomson.fastmail.com.au" href="mailto:git@johnthomson.fastmail.com.au">John Thomson</a> committed <time class="js-timeago" title="Jun 27, 2017 9:52pm" datetime="2017-06-27T21:52:48Z" data-toggle="tooltip" data-placement="top" data-container="body">Jun 28, 2017</time>
+</div>
+</div>
+<div class="commit-actions flex-row hidden-xs">
+<a class="commit-sha btn btn-transparent" href="/johnth/aur-xen/commit/2c8370a23b1fcc835277977d820b083b8add32cd">2c8370a2</a>
+<button class="btn btn-clipboard btn-transparent" data-toggle="tooltip" data-placement="bottom" data-container="body" data-title="Copy commit SHA to clipboard" data-clipboard-text="2c8370a23b1fcc835277977d820b083b8add32cd" type="button" title="Copy commit SHA to clipboard" aria-label="Copy commit SHA to clipboard"><i aria-hidden="true" aria-hidden="true" data-hidden="true" class="fa fa-clipboard"></i></button>
+<a class="btn btn-default" href="/johnth/aur-xen/blob/2c8370a23b1fcc835277977d820b083b8add32cd/PKGBUILD">Browse File</a>
+</div>
+</div>
+</li>
+
+</ul>
+</div>
+
+</div>
+<div class="blob-content-holder" id="blob-content-holder">
+<article class="file-holder">
+<div class="js-file-title file-title-flex-parent">
+<div class="file-header-content">
+<i aria-hidden="true" data-hidden="true" class="fa fa-file-text-o fa-fw"></i>
+<strong class="file-title-name">
+patch-gcc7-vtpmmgr-make-inline-static.patch
+</strong>
+<button class="btn btn-clipboard btn-transparent prepend-left-5" data-toggle="tooltip" data-placement="bottom" data-container="body" data-class="btn-clipboard btn-transparent prepend-left-5" data-title="Copy file path to clipboard" data-clipboard-text="{&quot;text&quot;:&quot;patch-gcc7-vtpmmgr-make-inline-static.patch&quot;,&quot;gfm&quot;:&quot;`patch-gcc7-vtpmmgr-make-inline-static.patch`&quot;}" type="button" title="Copy file path to clipboard" aria-label="Copy file path to clipboard"><i aria-hidden="true" aria-hidden="true" data-hidden="true" class="fa fa-clipboard"></i></button>
+<small>
+37.4 KB
+</small>
+</div>
+
+<div class="file-actions hidden-xs">
+
+<div class="btn-group" role="group"><button class="btn btn btn-sm js-copy-blob-source-btn" data-toggle="tooltip" data-placement="bottom" data-container="body" data-class="btn btn-sm js-copy-blob-source-btn" data-title="Copy source to clipboard" data-clipboard-target=".blob-content[data-blob-id=&#39;a2c96691a95f0a55fa016e1c209f292259975dbb&#39;]" type="button" title="Copy source to clipboard" aria-label="Copy source to clipboard"><i aria-hidden="true" aria-hidden="true" data-hidden="true" class="fa fa-clipboard"></i></button><a class="btn btn-sm has-tooltip" target="_blank" rel="noopener noreferrer" title="Open raw" data-container="body" href="/johnth/aur-xen/raw/master/patch-gcc7-vtpmmgr-make-inline-static.patch"><i aria-hidden="true" data-hidden="true" class="fa fa-file-code-o"></i></a></div>
+<div class="btn-group" role="group"><a class="btn js-edit-blob btn-sm" href="/johnth/aur-xen/edit/master/patch-gcc7-vtpmmgr-make-inline-static.patch">Edit</a></div>
+</div>
+</div>
+
+<script>
+ PathLocks.init(
+ '/johnth/aur-xen/path_locks/toggle',
+ 'patch-gcc7-vtpmmgr-make-inline-static.patch'
+ );
+</script>
+
+<div class="blob-viewer" data-type="simple" data-url="/johnth/aur-xen/blob/master/patch-gcc7-vtpmmgr-make-inline-static.patch?format=json&amp;viewer=simple">
+<div class="text-center prepend-top-default append-bottom-default">
+<i aria-hidden="true" aria-label="Loading content…" class="fa fa-spinner fa-spin fa-2x"></i>
+</div>
+
+</div>
+
+
+</article>
+</div>
+
+</div>
+</div>
+
+</div>
+</div>
+</div>
+</div>
+
+
+</body>
+</html>
+
diff --git a/pcr/xen/patch-ipxe-patches-series.patch b/pcr/xen/patch-ipxe-patches-series.patch
new file mode 100644
index 000000000..30e916417
--- /dev/null
+++ b/pcr/xen/patch-ipxe-patches-series.patch
@@ -0,0 +1,18 @@
+Subject: [PATCH] Fix gcc7 warn
+
+---
+ tools/firmware/etherboot/patches/series | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/tools/firmware/etherboot/patches/series b/tools/firmware/etherboot/patches/series
+index 86cb300..780c6c6 100644
+--- a/tools/firmware/etherboot/patches/series
++++ b/tools/firmware/etherboot/patches/series
+@@ -1 +1,4 @@
+ boot_prompt_option.patch
++patch-inbuild-ipxe-gcc7-implicit-fallthrough.patch
++patch-inbuild-ipxe-gcc7-implicit-fallthrough-ath5k.patch
++patch-inbuild-ipxe-gcc7-implicit-fallthrough-curses.patch
+--
+2.13.0
+
diff --git a/pcr/xen/patch-ovmf-apply-inbuild-patches.patch b/pcr/xen/patch-ovmf-apply-inbuild-patches.patch
new file mode 100644
index 000000000..2c2f3ed75
--- /dev/null
+++ b/pcr/xen/patch-ovmf-apply-inbuild-patches.patch
@@ -0,0 +1,26 @@
+From 088d0d605131eeb43dc1c4ab21631ea7e51f8501 Mon Sep 17 00:00:00 2001
+From: John Thomson <git@johnthomson.fastmail.com.au>
+Date: Sat, 24 Jun 2017 09:38:13 +1000
+Subject: [PATCH] Fix OVMF apply patches series
+
+---
+ tools/firmware/Makefile | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/tools/firmware/Makefile b/tools/firmware/Makefile
+index a5a6802..875e7e5 100644
+--- a/tools/firmware/Makefile
++++ b/tools/firmware/Makefile
+@@ -20,6 +20,9 @@ ovmf-dir:
+ sed 's|python |python2 |g' -i "ovmf-dir/BaseTools/BinWrappers/PosixLike"/* || true
+ sed 's|python |python2 |g' -i "ovmf-dir/BaseTools/Tests/GNUmakefile"
+ cp ovmf-makefile ovmf-dir/Makefile;
++ for i in $$(cat ovmf-patches/series); do \
++ patch -d ovmf-dir -Np1 < ovmf-patches/$$i || exit 1; \
++ done
+
+ seabios-dir:
+ GIT=$(GIT) $(XEN_ROOT)/scripts/git-checkout.sh $(SEABIOS_UPSTREAM_URL) $(SEABIOS_UPSTREAM_REVISION) seabios-dir
+--
+2.13.1
+
diff --git a/pcr/xen/patch-ovmf-patches-series.patch b/pcr/xen/patch-ovmf-patches-series.patch
new file mode 100644
index 000000000..0f230e504
--- /dev/null
+++ b/pcr/xen/patch-ovmf-patches-series.patch
@@ -0,0 +1,20 @@
+From 30f9f61c42b9530332a856a5bc09db52c446289d Mon Sep 17 00:00:00 2001
+From: John Thomson <git@johnthomson.fastmail.com.au>
+Date: Sat, 24 Jun 2017 09:48:02 +1000
+Subject: [PATCH] Add ovmf patches series file
+
+---
+ tools/firmware/ovmf-patches/series | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 tools/firmware/ovmf-patches/series
+
+diff --git a/tools/firmware/ovmf-patches/series b/tools/firmware/ovmf-patches/series
+new file mode 100644
+index 0000000..ac6bda5
+--- /dev/null
++++ b/tools/firmware/ovmf-patches/series
+@@ -0,0 +1 @@
++patch-inbuild-ovmf-5-hiilib.c-pointer-zero.patch
+--
+2.13.1
+
diff --git a/pcr/xen/patch-ovmf-use-python2.patch b/pcr/xen/patch-ovmf-use-python2.patch
new file mode 100644
index 000000000..b52b9230c
--- /dev/null
+++ b/pcr/xen/patch-ovmf-use-python2.patch
@@ -0,0 +1,22 @@
+Subject: [PATCH] Fix ovmf, use python2
+
+---
+ tools/firmware/Makefile | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/tools/firmware/Makefile b/tools/firmware/Makefile
+index b840c6a..a5a6802 100644
+--- a/tools/firmware/Makefile
++++ b/tools/firmware/Makefile
+@@ -17,6 +17,8 @@ LD32BIT-$(CONFIG_FreeBSD) := LD32BIT_FLAG=-melf_i386_fbsd
+
+ ovmf-dir:
+ GIT=$(GIT) $(XEN_ROOT)/scripts/git-checkout.sh $(OVMF_UPSTREAM_URL) $(OVMF_UPSTREAM_REVISION) ovmf-dir
++ sed 's|python |python2 |g' -i "ovmf-dir/BaseTools/BinWrappers/PosixLike"/* || true
++ sed 's|python |python2 |g' -i "ovmf-dir/BaseTools/Tests/GNUmakefile"
+ cp ovmf-makefile ovmf-dir/Makefile;
+
+ seabios-dir:
+--
+2.13.0
+
diff --git a/pcr/xen/xen.install b/pcr/xen/xen.install
index f48de62f8..f629e6643 100644
--- a/pcr/xen/xen.install
+++ b/pcr/xen/xen.install
@@ -1,17 +1,64 @@
+xen_boot() {
+ cat << __EOF__
+You are not running xen unless you boot xen.
+Possible Xen boot paths:
+EFI boot -> grubx64.efi -> multiboot2 -> [xen.gz, vmlinuz, ramdisk]
+BIOS boot -> grub -> multiboot(2) -> [xen.gz, vmlinuz, ramdisk]
+
+EFI boot -> xen.efi
+
+##########
+grub multiboot2 preparation:
+Install grub: https://wiki.parabola.nu/index.php/GRUB
+
+At this time, some modifications are needed to 20_linux_xen.
+These are included in this package as 21_linux_xen
+
+Set the values needed for your configuration in /etc/default/grub
+Detailed here: https://www.gnu.org/software/grub/manual/html_node/Simple-configuration.html
+Needed:
+GRUB_CMDLINE_XEN
+GRUB_CMDLINE_LINUX_XEN_REPLACE
+These values are not required but can be used; they are appended to the previous values, then this is used for the non-recovery (default) entry:
+GRUB_CMDLINE_XEN_DEFAULT
+GRUB_CMDLINE_LINUX_XEN_REPLACE_DEFAULT
+
+run grub-mkconfig
+
+To boot xen as default:
+suggested: inspect and use this config to boot with. Check if the xen entry works as expected
+find the id of the xen entry and set this as DEFAULT in /etc/default/grub.
+This may look something like:
+GRUB_DEFAULT="xen-gnulinux-simple-a-unique-id-from-your-grub-goes-here"
+
+run grub-mkconfig
+
+##########
+
+Direct EFI boot preperation:
+Create a xen.cfg file in the same directory as xen.efi.
+These need to be in ESP, or in a directory accessible from you EFI bootloader.
+Put settings relevant to your system into xen.cfg
+Detailed here: https://xenbits.xen.org/docs/4.9-testing/misc/efi.html
+Needed:
+kernel
+ramdisk
+Add the xen.efi file to your EFI bootloader (such as Refind).
+And / or add the xen.efi file to you EFI boot options (efibootmgr).
+__EOF__
+}
+
install_msg() {
cat << __EOF__
===> IMPORTANT NOTICES:
In order to complete the installation, and enable Xen,
at the very least you must:
-1. If using GRUB2, edit your GRUB2 config files as specified at
- https://wiki.parabola.nu/index.php/Xen#Bootloader_Configuration
-
- Support for the grub-mkconfig command was added, and will auto-discover
- the deployed xen hypervisor and linux kernel
-2. If booting via efi, copy the example /etc/xen/efi-xen.cfg to /boot/xen.cfg
- and edit the contents to match the settings you need.
-3. Issue the following commands to allow you to create and start VMs:
+1. Configure your bootloader to boot Xen:
+__EOF__
+ xen_boot
+ cat << __EOF__
+2. Issue the following commands to allow you to create and start VMs:
systemctl enable xen-qemu-dom0-disk-backend.service
systemctl enable xen-init-dom0.service
@@ -20,34 +67,52 @@ at the very least you must:
Other optional services are:
systemctl enable xen-watchdog.service
-4. If you want some domains to automatically start up/shutdown, run the following:
+3. If you want some domains to automatically start up/shutdown, run the following:
systemctl enable xendomains.service
For more information refer to the Wiki:
https://wiki.parabola.nu/index.php/Xen
__EOF__
-
}
upgrade_msg() {
cat << __EOF__
-Xen 4.7
+Xen 4.9
Release notes
-http://wiki.xen.org/wiki/Xen_Project_4.7_Release_Notes
+http://wiki.xen.org/wiki/Xen_Project_4.9_Release_Notes
Feature list
-http://wiki.xen.org/wiki/Xen_Project_4.7_Feature_List
+http://wiki.xen.org/wiki/Xen_Project_4.9_Feature_List
__EOF__
+}
+upgrade_msg_grub_multiboot2() {
+ cat << __EOF__
+##########
+Xen 4.9 can now use grub>=2.02 multiboot2.
+If you previously booted using xen.efi, you have an alternative.
+If you previously relied on the packaged 09_xen for grub-mkconfig:
+It is now removed.
+You will need to do the following under grub multiboot2 preparation:
+##########
+__EOF__
+ xen_boot
}
post_install() {
install_msg
upgrade_msg
+ systemd-tmpfiles --create
}
post_upgrade() {
- upgrade_msg
+ if [[ "$2" < 4.9.0 || "$2" == *'4.9.0rc'* ]]; then
+ upgrade_msg
+ fi
+ if [[ "$2" < 4.9.0 || "$2" == *'4.9.0rc'* ]]; then
+ upgrade_msg_grub_multiboot2
+ fi
+ systemd-tmpfiles --create
}
pre_remove() {