diff options
author | David Sutton | 2015-07-04 18:43:49 -0500 |
---|---|---|
committer | David Sutton | 2015-07-04 18:43:49 -0500 |
commit | b293e293082aac93522f894cf21799cacca73f7a (patch) | |
tree | 8ca23d4ca4d8dcc8280cd12088e97851af985f95 | |
download | aur-b293e293082aac93522f894cf21799cacca73f7a.tar.gz |
Initial Import for 4.5.1-1
-rw-r--r-- | .SRCINFO | 119 | ||||
-rw-r--r-- | 09_xen | 230 | ||||
-rw-r--r-- | ChangeLog | 128 | ||||
-rw-r--r-- | PKGBUILD | 194 | ||||
-rw-r--r-- | ati-passthrough.patch | 415 | ||||
-rw-r--r-- | efi-xen.cfg | 7 | ||||
-rw-r--r-- | etherboot-gcc5.patch | 40 | ||||
-rw-r--r-- | gcc5.patch | 10 | ||||
-rw-r--r-- | grub.conf | 3 | ||||
-rw-r--r-- | ovmf-gcc4.9-basetools.patch | 231 | ||||
-rw-r--r-- | ovmf-gcc4.9-ovmfpkg.patch | 19 | ||||
-rw-r--r-- | ovmf.patch | 13 | ||||
-rw-r--r-- | seabios-gcc5.patch | 48 | ||||
-rw-r--r-- | tmpfiles.d-xen.conf | 2 | ||||
-rw-r--r-- | xen.conf | 19 | ||||
-rw-r--r-- | xen.install | 88 |
16 files changed, 1566 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..5827e8a687c1 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,119 @@ +pkgbase = xen + pkgdesc = Virtual Machine Hypervisor & Tools + pkgver = 4.5.1 + pkgrel = 1 + url = http://www.xenproject.org/ + install = xen.install + changelog = ChangeLog + arch = i686 + arch = x86_64 + license = GPL2 + makedepends = bin86 + makedepends = cmake + makedepends = dev86 + makedepends = git + makedepends = iasl + makedepends = markdown + makedepends = ocaml-findlib + makedepends = figlet + makedepends = wget + makedepends = spice-protocol + depends = bridge-utils + depends = curl + depends = gnutls + depends = iproute2 + depends = libaio + depends = libcap-ng + depends = libiscsi + depends = libjpeg-turbo + depends = libpng + depends = libseccomp + depends = lzo2 + depends = nss + depends = pixman + depends = pciutils + depends = python + depends = python2 + depends = sdl + depends = yajl + depends = spice + depends = usbredir + optdepends = xen-docs: Official Xen Documentation + optdepends = openvswitch: Optional Networking support + conflicts = xen-4.2 + conflicts = xen-4.2-testing-hg + conflicts = xen-gdbsx + conflicts = xen-hg-unstable + conflicts = xen-rc + conflicts = xen-git + conflicts = xen-4.3 + conflicts = xen-4.3-testing-hg + noextract = lwip-1.3.0.tar.gz + noextract = zlib-1.2.3.tar.gz + noextract = newlib-1.16.0.tar.gz + noextract = pciutils-2.2.9.tar.bz2 + noextract = polarssl-1.1.4-gpl.tgz + noextract = grub-0.97.tar.gz + noextract = tpm_emulator-0.7.4.tar.gz + noextract = gmp-4.3.2.tar.bz2 + noextract = ipxe-git-9a93db3f0947484e30e753bbd61a10b17336e20e.tar.gz + options = !buildflags + options = !strip + backup = etc/modules-load.d/xen.conf + backup = etc/xen/xl.conf + backup = etc/conf.d/xenstored + backup = etc/conf.d/xenconsoled + backup = etc/conf.d/xendomains + backup = etc/conf.d/xencommons + backup = etc/xen/grub.conf + source = http://bits.xensource.com/oss-xen/release/4.5.1/xen-4.5.1.tar.gz + source = http://xenbits.xen.org/xen-extfiles/ipxe-git-9a93db3f0947484e30e753bbd61a10b17336e20e.tar.gz + source = http://xenbits.xen.org/xen-extfiles/lwip-1.3.0.tar.gz + source = http://xenbits.xen.org/xen-extfiles/zlib-1.2.3.tar.gz + source = http://xenbits.xen.org/xen-extfiles/newlib-1.16.0.tar.gz + source = http://xenbits.xen.org/xen-extfiles/pciutils-2.2.9.tar.bz2 + source = http://xenbits.xen.org/xen-extfiles/polarssl-1.1.4-gpl.tgz + source = http://xenbits.xen.org/xen-extfiles/grub-0.97.tar.gz + source = http://xenbits.xen.org/xen-extfiles/tpm_emulator-0.7.4.tar.gz + source = http://xenbits.xen.org/xen-extfiles/gmp-4.3.2.tar.bz2 + source = xen.install + source = tmpfiles.d-xen.conf + source = 09_xen + source = ati-passthrough.patch + source = etherboot-gcc5.patch + source = gcc5.patch + source = gnutls-3.4.0.patch::http://git.alpinelinux.org/cgit/aports/plain/main/xen/gnutls-3.4.0.patch?id=628f27939412a7d6fb67734bd644119a1f49463a + source = ovmf.patch + source = ovmf-gcc4.9-basetools.patch + source = ovmf-gcc4.9-ovmfpkg.patch + source = seabios-gcc5.patch + source = efi-xen.cfg + source = grub.conf + source = xen.conf + sha256sums = 668c11d4fca67ac44329e369f810356eacd37b28d28fb96e66aac77f3c5e1371 + sha256sums = 632ce8c193ccacc3012bd354bdb733a4be126f7c098e111930aa41dad537405c + sha256sums = 772e4d550e07826665ed0528c071dd5404ef7dbe1825a38c8adbc2a00bca948f + sha256sums = 1795c7d067a43174113fdf03447532f373e1c6c57c08d61d9e4e9be5e244b05e + sha256sums = db426394965c48c1d29023e1cc6d965ea6b9a9035d8a849be2750ca4659a3d07 + sha256sums = f60ae61cfbd5da1d849d0beaa21f593c38dac9359f0b3ddc612f447408265b24 + sha256sums = 2d29fd04a0d0ba29dae6bd29fb418944c08d3916665dcca74afb297ef37584b6 + sha256sums = 4e1d15d12dbd3e9208111d6b806ad5a9857ca8850c47877d36575b904559260b + sha256sums = 4e48ea0d83dd9441cc1af04ab18cd6c961b9fa54d5cbf2c2feee038988dea459 + sha256sums = 936162c0312886c21581002b79932829aa048cfaf9937c6265aeaa14f1cd1775 + sha256sums = 5bc10f125bdc1ae5f9e3eeb58888970d02e7856e94e2435d66ddb717884db016 + sha256sums = 40e0760810a49f925f2ae9f986940b40eba477dc6d3e83a78baaae096513b3cf + sha256sums = 06c9f6140f7ef4ccfc4b1a7d9732a673313e269733180f53afcd9e43bf6c26bb + sha256sums = d93c2d5bcdf0c3e4c6e8efb357cb4b9d618209025361f5ccd9d03651a8acd7a3 + sha256sums = deeec880522c1374ad135dc8b4c14c7b301464a60fbac410efb3db70f670eed9 + sha256sums = 22b03d220aa6caa0bbe04868a1839a658a99d020bde95a31952a2a624490ef95 + sha256sums = e25d38376e22f6f935d2c0ce1b9d6e6b47ff261b5e6056bc3b47168739d7a992 + sha256sums = 1c44b9dc848bb6c3ef2ab76e4807a0b3ed360aea6b13b5b86d2bf5301d14247b + sha256sums = 45aae7a1d48357e5f981c12870b5bcac0dd0f630f84e398160d8c9adb42a6674 + sha256sums = 8e16638d0cc366d1eaae7ccbcf43215853b4444a625478ec8f6e0a2c655370d9 + sha256sums = 091f5eed7e33b45cabb232e9a03dd6c1abae1a820b804c888c20d4b7e673618f + sha256sums = ceaff798a92a7aef1465a0a0b27b1817aedd2c857332b456aaa6dd78dc72438f + sha256sums = 3f0af16958c3e057b9baa5afc47050d9adf7dd553274dd97ae4f35938fefb568 + sha256sums = 50a9b7fd19e8beb1dea09755f07318f36be0b7ec53d3c9e74f3266a63e682c0c + +pkgname = xen + diff --git a/09_xen b/09_xen new file mode 100644 index 000000000000..59ac88ac48fe --- /dev/null +++ b/09_xen @@ -0,0 +1,230 @@ +#!/usr/bin/env bash + +## +## grub-mkconfig helper script specific to Arch Linux +## Contributed by "Keshav Amburay" <the ddoott ridikulus ddoott rat aatt geemmayil ddoott ccoomm> +## Updated on 08 February 2014 +## +## Script based on do_grub_config() function in Arch Linux Archboot ISO Installer/Setup script +## Some parts taken from /etc/grub.d/10_linux script shipped by GRUB(2) upstream +## +## This script can be freely distributed and/or modified +## 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. +## +## This script 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. +## + +## Adapted for use with the xen AUR package, to ensure feature comparity +## Modified by "David Sutton" <kantras - gmail com> + +_FUNC_GRUB_FILE_PRESENT() { + + [[ -z "${GRUB_PLATFORM}" ]] && GRUB_PLATFORM="x86" + + if [[ "${GRUB_PLATFORM}" == "x86" ]]; then + check="--is-x86-linux32" + elif [[ "${GRUB_PLATFORM}" == "i386-xen-pae" ]]; then + check="--is-i386-xen-pae-domu" + elif [[ "${GRUB_PLATFORM}" == "x86_64-xen" ]]; then + check="--is-x86_64-xen-domu" + else + check="--is-${GRUB_PLATFORM}-linux" + fi + + case "${GRUB_PLATFORM}" in + x86) + list="$(for i in "${GRUB_ROOT}"/boot/vmlinuz-linux* ; do + if grub_file_is_not_garbage "${i}" && "${grub_file}" ${check} "${i}" ; then echo -n "${i} " ; fi + done)" ;; + *) + list="$(for i in "${GRUB_ROOT}"/boot/vmlinuz-linux* ; do + if grub_file_is_not_garbage "${i}" && "${grub_file}" ${check} "${i}" ; then echo -n "${i} " ; fi + done)" ;; + esac +} + +set -e + +prefix="/usr" +exec_prefix="${prefix}" +datarootdir="/usr/share" +datadir="${datarootdir}" +sysconfdir="/etc" + +. "${datarootdir}/grub/grub-mkconfig_lib" + +. "${sysconfdir}/default/grub" + +export XEN_HYPERVISOR_CMDLINE="xsave=1" +export XEN_LINUX_CMDLINE="console=tty0" + +[[ -r "${sysconfdir}/xen/grub.conf" ]] && . "${sysconfdir}/xen/grub.conf" + +[[ -z "${XEN_LINUX_CMDLINE_OVERRIDE}" ]] && XEN_LINUX_CMDLINE_OVERRIDE="0" + +export TEXTDOMAIN="grub" +export TEXTDOMAINDIR="${datarootdir}/locale" + +CLASS="--class xen --class arch-linux --class arch --class gnu-linux --class gnu --class os" + +[[ "${grub_file}" != "" ]] && _FUNC_GRUB_FILE_PRESENT + +BOOT_PART_FS_UUID="$(${grub_probe} --target="fs_uuid" "/boot" 2>/dev/null)" +BOOT_PART_HINTS_STRING="$(${grub_probe} --target="hints_string" "/boot" 2>/dev/null || true)" +BOOT_PART_FS="$(${grub_probe} --target="fs" "/boot" 2>/dev/null)" + +ROOT_PART_GRUB_DEVICE="$(${grub_probe} --target=device / || true)" +ROOT_PART_FS="$(${grub_probe} --device ${ROOT_PART_GRUB_DEVICE} --target=fs 2> /dev/null || echo "unknown")" + +if [[ "${GRUB_LINUX_ROOT_DEVICE}" == "" ]]; then + + case "${ROOT_PART_FS}" in + btrfs) + rootsubvol="$(make_system_path_relative_to_its_root /)" + rootsubvol="${rootsubvol#/}" + if [[ "${rootsubvol}" != "" ]]; then + GRUB_LINUX_ROOT_DEVICE="subvol=${rootsubvol}" + fi + ;; + zfs) + rpool="$(${grub_probe} --device ${GRUB_DEVICE} --target=fs_label 2>/dev/null || true)" + bootfs="$(make_system_path_relative_to_its_root / | sed -e "s,@$,,")" + GRUB_LINUX_ROOT_DEVICE="ZFS=${rpool}${bootfs}" + ;; + esac + + if [[ "${GRUB_DEVICE_UUID}" == "" ]] || \ + [[ "${GRUB_DISABLE_LINUX_UUID}" == "true" ]] || \ + [[ ! -e "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" ]] || \ + uses_abstraction "${GRUB_DEVICE}" lvm ; then + GRUB_LINUX_ROOT_DEVICE="${GRUB_DEVICE}" + else + GRUB_LINUX_ROOT_DEVICE="UUID=${GRUB_DEVICE_UUID}" + fi +fi + +[[ "${GRUB_LINUX_PARAMS}" == "" ]] && GRUB_LINUX_PARAMS="${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}" +if [[ "${XEN_LINUX_CMDLINE_OVERRIDE}" == "0" ]]; then + GRUB_LINUX_PARAMS="${GRUB_LINUX_PARAMS} ${XEN_LINUX_CMDLINE}" +else + GRUB_LINUX_PARAMS="${XEN_LINUX_CMDLINE}" +fi + +xen_list=`for i in /boot/xen-*.gz /xen-*.gz ; do + if grub_file_is_not_garbage "$i" ; then echo -n "$i "; fi +done` + +while [ "x$xen_list" != "x" ] ; do + xen=`version_find_latest $xen_list` + echo "Found Xen hypervisor image: $xen" >&2 + XEN_BASENAME=`basename $xen` + XEN_VERSION=`echo $XEN_BASENAME | sed -e "s,^[^0-9]*-,,g" | sed -e "s,.gz,,g"` + + for _KERNEL_ in ${list} ; do + + echo "Found linux image: ${_KERNEL_}" >&2 + + basename="$(basename "${_KERNEL_}")" + dirname="$(dirname "${_KERNEL_}")" + REAL_DIR="$(make_system_path_relative_to_its_root "${dirname}")" + + _KERNEL_FILE_="$(echo ${_KERNEL_} | sed 's,/boot/,,g')" + _KERNEL_PKG_="pkg-$(echo ${_KERNEL_FILE_} | sed 's,vmlinuz-,,g')" + + _INITRAMFS_="${_KERNEL_FILE_/vmlinuz-/initramfs-}.img" + + if [[ -e "/boot/${_INITRAMFS_}" ]]; then + + echo "Found initramfs image: /boot/${_INITRAMFS_}" >&2 + + cat << EOF + +menuentry "Xen ${XEN_VERSION} / Arch Linux ${_KERNEL_PKG_} kernel" ${CLASS} { + $(save_default_entry) + if [ x\$feature_all_video_module = xy ]; then + insmod all_video + fi + set gfxpayload=keep + insmod ${BOOT_PART_FS} + if [ x\$feature_platform_search_hint = xy ]; then + search --no-floppy --fs-uuid --set=root ${BOOT_PART_HINTS_STRING} ${BOOT_PART_FS_UUID} + else + search --no-floppy --fs-uuid --set=root ${BOOT_PART_FS_UUID} + fi + echo '$(printf "Loading Xen %s ..." ${XEN_VERSION})' + multiboot ${REAL_DIR}/${XEN_BASENAME} ${REAL_DIR}/${XEN_BASENAME} ${XEN_HYPERVISOR_CMDLINE} + echo 'Loading Arch Linux ${_KERNEL_PKG_} kernel ...' + module ${REAL_DIR}/${_KERNEL_FILE_} ${REAL_DIR}/${_KERNEL_FILE_} root=${GRUB_LINUX_ROOT_DEVICE} rw ${GRUB_LINUX_PARAMS} + echo 'Loading Arch Linux ${_KERNEL_PKG_} kernel initramfs ...' + module ${REAL_DIR}/${_INITRAMFS_} +} + +EOF + fi + + _INITRAMFS_FALLBACK_="${_KERNEL_FILE_/vmlinuz-/initramfs-}-fallback.img" + + if [[ -e "/boot/${_INITRAMFS_FALLBACK_}" ]]; then + + echo "Found fallback initramfs image: /boot/${_INITRAMFS_FALLBACK_}" >&2 + + cat << EOF + +menuentry "Xen ${XEN_VERSION} / Arch Linux ${_KERNEL_PKG_} kernel (fallback initramfs)" ${CLASS} { + $(save_default_entry) + if [ x\$feature_all_video_module = xy ]; then + insmod all_video + fi + set gfxpayload=keep + insmod ${BOOT_PART_FS} + if [ x\$feature_platform_search_hint = xy ]; then + search --no-floppy --fs-uuid --set=root ${BOOT_PART_HINTS_STRING} ${BOOT_PART_FS_UUID} + else + search --no-floppy --fs-uuid --set=root ${BOOT_PART_FS_UUID} + fi + echo '$(printf "Loading Xen %s ..." ${XEN_VERSION})' + multiboot ${REAL_DIR}/${XEN_BASENAME} ${REAL_DIR}/${XEN_BASENAME} ${XEN_HYPERVISOR_CMDLINE} + echo 'Loading Arch Linux ${_KERNEL_PKG_} kernel ...' + module ${REAL_DIR}/${_KERNEL_FILE_} ${REAL_DIR}/${_KERNEL_FILE_} root=${GRUB_LINUX_ROOT_DEVICE} rw ${GRUB_LINUX_PARAMS} + echo 'Loading Arch Linux ${_KERNEL_PKG_} kernel fallback initramfs ...' + module ${REAL_DIR}/${_INITRAMFS_FALLBACK_} +} + +EOF + fi + + if [[ ! -e "/boot/${_INITRAMFS_}" ]] && [[ ! -e "/boot/${_INITRAMFS_FALLBACK_}" ]]; then + cat << EOF + +menuentry "Xen ${XEN_VERSION} / Arch Linux ${_KERNEL_PKG_} kernel (no initramfs)" ${CLASS} { + $(save_default_entry) + if [ x\$feature_all_video_module = xy ]; then + insmod all_video + fi + set gfxpayload=keep + insmod ${BOOT_PART_FS} + if [ x\$feature_platform_search_hint = xy ]; then + search --no-floppy --fs-uuid --set=root ${BOOT_PART_HINTS_STRING} ${BOOT_PART_FS_UUID} + else + search --no-floppy --fs-uuid --set=root ${BOOT_PART_FS_UUID} + fi + echo '$(printf "Loading Xen %s ..." ${XEN_VERSION})' + multiboot ${REAL_DIR}/${XEN_BASENAME} ${REAL_DIR}/${XEN_BASENAME} ${XEN_HYPERVISOR_CMDLINE} + echo 'Loading Arch Linux ${_KERNEL_PKG_} kernel ...' + module ${REAL_DIR}/${_KERNEL_FILE_} ${REAL_DIR}/${_KERNEL_FILE_} root=${GRUB_LINUX_ROOT_DEVICE} rw ${GRUB_LINUX_PARAMS} +} + +EOF + fi + + done + + xen_list=`echo $xen_list | tr ' ' '\n' | grep -vx $xen | tr '\n' ' '` +done + + diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 000000000000..7dcee938b5bd --- /dev/null +++ b/ChangeLog @@ -0,0 +1,128 @@ +2015-07-04 David Sutton <kantras - gmail.com> + * 4.5.1-1 + New major release from upstream + Added -fno-caller-saves CFLAG to PKGBUILD to work around GCC5 issues + Added in some compile fixes for GCC 5 + Disabled OVMF for now until patched for GCC 5 + +2015-05-13 David Sutton <kantras - gmail.com> + * 4.5.0-3 + Added Security patches + +2015-04-08 David Sutton <kantras - gmail.com> + * 4.5.0-2 + Updated PKGBUILD to use absolute instead of relative paths for install + Updated efi-xen.cfg with syntax fix + Added gnuttls-3.4.0 patch + Added security patches + +2015-03-01 David Sutton <kantras - gmail.com> + * 4.5.0-1 + New major release from upstream + Cleaned up old XSA patches + Removed old systemd support patches and realigned with the new upstream methods + +2014-10-26 David Sutton <kantras - gmail.com> + * 4.4.1-3 + Enabled OVMF support and added patches to fix compile + Enabled spice support and added patch to enable qemu support in qemu-xen + Added figlet as an make dependancy for the ascii art version number + Including an example xen.cfg package for people who will be using EFI + Additional cleanup (explictly disabling some unnecessary libraries) + +2014-10-12 David Sutton <kantras - gmail.com> + * 4.4.1-2: + Added XSA 104, 105, 106, 107 and 108 security patches + Added .config to resolve compile issues where /etc/sysconfig exists + +2014-09-04 David Sutton <kantras - gmail.com> + * 4.4.1-1: + New Upstream release + Cleared out unnecessary patches (security, gcc compile and pit) + +2014-06-22 David Sutton <kantras - gmail.com> + * 4.4.0-6: + Added additional patch to support XSA 100 on AMD platform + +2014-06-17 David Sutton <kantras - gmail.com> + * 4.4.0-5: + Added XSA 96 and 100 security patches + Added patch to explictly disable searching for bluez libs + Cleaned up PKGBUILD + +2014-05-17 David Sutton <kantras - gmail.com> + * 4.4.0-4: + Added patch to fix shutdown issues with pvh domains + +2014-05-01 David Sutton <kantras - gmail.com> + * 4.4.0-3: + Added XSA 92 Security patch + Added fix for compiling under GCC 4.9.0 (From Fedora Rawhide SRPM) + Added updates to 09_xen to closer match system 10_linux + +2014-03-11 David Sutton <kantras - gmail.com> + * 4.4.0-2: + Moved xen-syms file so 09_xen won't pick it up as a potential kernel. + Added XSA 89 Security patch + Minor PKGBUILD cleanup/changes + +2014-03-10 David Sutton <kantras - gmail.com> + * 4.4.0-1: + New upstream release + Cleaned up old unnecessary patches + +2014-02-19 David Sutton <kantras - gmail.com> + * 4.3.2-1: + New upstream release + Removed unnecessary security patches (since now integrated into source) + Attempts to pull down additional required source file to ensure not corrupted + Added missing dependancy libseccomp + +2013-11-25 David Sutton <kantras - gmail.com> + * 4.3.1-2: + Changed bluez dependancy from bluez4 to bluez + Added recent security patches + +2013-10-31 David Sutton <kantras - gmail.com> + * 4.3.1-1: + New upstream release + Removed unnecessary security patches (already merged) + Fixed BIOS Workaround patch to apply to the new source files + Fixed ATI Passthrough patch to apply to the new source files + Updated paths in all patches + +2013-09-29 David Sutton <kantras - gmail.com> + * 4.3.0-7: + Fixed optdepends in PKGBUILD + Added in a pre_remove function in xen.install to disable services + Minor text formating changes in xen.install + Added XSA 62,63,64 and 66 patches (Xen Security Advisories) + +2013-09-29 David Sutton <kantras - gmail.com> + * 4.3.0-6: + Fixed 09_xen so it can detect lts kernels + +2013-09-28 David Sutton <kantras - gmail.com> + * 4.3.0-5: + Fixed mount option in 09_xen from ro to rw + Added in dummy /etc/xen/grub.conf to control settings in 09_xen + Fix library sanitize so that it returns to the base directory + Move the syms file to /usr/share/xen so that it is out of the way of boot but still accessible + Added optional dependancy for openvswitch + +2013-08-13 David Sutton <kantras - gmail.com> + * 4.3.0-4 : + Added patch for qemu-xen to add a TOM register for PCI Hole mapping + Protected /etc/conf.d/xendomains from being overwritten + Included ATI Passthrough patch (not enabled by default, compile tested only) + +2013-07-23 David Sutton <kantras - gmail.com> + + * 4.3.0-3 : + added ChangeLog. + Cleaned up PKGBUILD to match Arch Package Standards + Fixed some path references - /var/run to /run + Removed some unnecessary empty directories + Updated xenconsoled and xenstored so they use /run for pid file + Updated auto-created /run directories to include xenstored + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..7823f7323093 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,194 @@ +# Maintainer: David Sutton <kantras - gmail.com> +# Contributor: Shanmu Thiagaraja <sthiagaraja+AUR@prshanmu.com> +# Contributor: Limao Luo +# Contributor: Luceo +# Contributor: Revellion + +pkgname=xen +pkgver=4.5.1 +pkgrel=1 +pkgdesc="Virtual Machine Hypervisor & Tools" +arch=(i686 x86_64) +url="http://www.xenproject.org/" +license=(GPL2) +depends=(bridge-utils curl gnutls iproute2 libaio libcap-ng libiscsi libjpeg-turbo libpng libseccomp lzo2 nss pixman pciutils python python2 sdl yajl spice usbredir) +[[ "$CARCH" == "x86_64" ]] && depends+=(lib32-glibc) +makedepends=(bin86 cmake dev86 git iasl markdown ocaml-findlib figlet wget spice-protocol) +optdepends=('xen-docs: Official Xen Documentation' 'openvswitch: Optional Networking support') +conflicts=(xen-4.2{,-testing-hg} xen-{gdbsx,hg-unstable,rc,git} xen-4.3{,-testing-hg}) +backup=(etc/modules-load.d/$pkgname.conf etc/$pkgname/xl.conf etc/conf.d/xen{stored,consoled,domains,commons} etc/$pkgname/grub.conf) +options=(!buildflags !strip) +install=$pkgname.install +changelog=ChangeLog +source=(http://bits.xensource.com/oss-xen/release/$pkgver/$pkgname-$pkgver.tar.gz + http://xenbits.xen.org/xen-extfiles/ipxe-git-9a93db3f0947484e30e753bbd61a10b17336e20e.tar.gz + http://xenbits.xen.org/xen-extfiles/lwip-1.3.0.tar.gz + http://xenbits.xen.org/xen-extfiles/zlib-1.2.3.tar.gz + http://xenbits.xen.org/xen-extfiles/newlib-1.16.0.tar.gz + http://xenbits.xen.org/xen-extfiles/pciutils-2.2.9.tar.bz2 + http://xenbits.xen.org/xen-extfiles/polarssl-1.1.4-gpl.tgz + 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 + xen.install + tmpfiles.d-$pkgname.conf + 09_xen + ati-passthrough.patch + etherboot-gcc5.patch + gcc5.patch + gnutls-3.4.0.patch::http://git.alpinelinux.org/cgit/aports/plain/main/xen/gnutls-3.4.0.patch?id=628f27939412a7d6fb67734bd644119a1f49463a + ovmf.patch + ovmf-gcc4.9-basetools.patch + ovmf-gcc4.9-ovmfpkg.patch + seabios-gcc5.patch + efi-xen.cfg + grub.conf + $pkgname.conf) +noextract=(lwip-1.3.0.tar.gz + zlib-1.2.3.tar.gz + newlib-1.16.0.tar.gz + pciutils-2.2.9.tar.bz2 + polarssl-1.1.4-gpl.tgz + grub-0.97.tar.gz + tpm_emulator-0.7.4.tar.gz + gmp-4.3.2.tar.bz2 + ipxe-git-9a93db3f0947484e30e753bbd61a10b17336e20e.tar.gz) + +sha256sums=('668c11d4fca67ac44329e369f810356eacd37b28d28fb96e66aac77f3c5e1371' + '632ce8c193ccacc3012bd354bdb733a4be126f7c098e111930aa41dad537405c' + '772e4d550e07826665ed0528c071dd5404ef7dbe1825a38c8adbc2a00bca948f' + '1795c7d067a43174113fdf03447532f373e1c6c57c08d61d9e4e9be5e244b05e' + 'db426394965c48c1d29023e1cc6d965ea6b9a9035d8a849be2750ca4659a3d07' + 'f60ae61cfbd5da1d849d0beaa21f593c38dac9359f0b3ddc612f447408265b24' + '2d29fd04a0d0ba29dae6bd29fb418944c08d3916665dcca74afb297ef37584b6' + '4e1d15d12dbd3e9208111d6b806ad5a9857ca8850c47877d36575b904559260b' + '4e48ea0d83dd9441cc1af04ab18cd6c961b9fa54d5cbf2c2feee038988dea459' + '936162c0312886c21581002b79932829aa048cfaf9937c6265aeaa14f1cd1775' + '5bc10f125bdc1ae5f9e3eeb58888970d02e7856e94e2435d66ddb717884db016' + '40e0760810a49f925f2ae9f986940b40eba477dc6d3e83a78baaae096513b3cf' + '06c9f6140f7ef4ccfc4b1a7d9732a673313e269733180f53afcd9e43bf6c26bb' + 'd93c2d5bcdf0c3e4c6e8efb357cb4b9d618209025361f5ccd9d03651a8acd7a3' + 'deeec880522c1374ad135dc8b4c14c7b301464a60fbac410efb3db70f670eed9' + '22b03d220aa6caa0bbe04868a1839a658a99d020bde95a31952a2a624490ef95' + 'e25d38376e22f6f935d2c0ce1b9d6e6b47ff261b5e6056bc3b47168739d7a992' + '1c44b9dc848bb6c3ef2ab76e4807a0b3ed360aea6b13b5b86d2bf5301d14247b' + '45aae7a1d48357e5f981c12870b5bcac0dd0f630f84e398160d8c9adb42a6674' + '8e16638d0cc366d1eaae7ccbcf43215853b4444a625478ec8f6e0a2c655370d9' + '091f5eed7e33b45cabb232e9a03dd6c1abae1a820b804c888c20d4b7e673618f' + 'ceaff798a92a7aef1465a0a0b27b1817aedd2c857332b456aaa6dd78dc72438f' + '3f0af16958c3e057b9baa5afc47050d9adf7dd553274dd97ae4f35938fefb568' + '50a9b7fd19e8beb1dea09755f07318f36be0b7ec53d3c9e74f3266a63e682c0c') + +prepare() { + cd "$pkgname-$pkgver/" + + ### Patching + + # Security Patches - Base + + # Security Patches - qemu-xen + + # Security Patches - qemu-upstream + + # Compile Patches + patch -p1 -i "$srcdir/gnutls-3.4.0.patch" + patch -p1 -i "$srcdir/gcc5.patch" + echo "etherboot-gcc5.patch" >> tools/firmware/etherboot/patches/series + cp "$srcdir/seabios-gcc5.patch" tools/firmware/ + cp "$srcdir/etherboot-gcc5.patch" tools/firmware/etherboot/patches/ + + # OVMF Compile support (Pulls from GIT repo, so patching to patch after pull request) + echo "Patching OVMF..." + patch -Np1 -i "$srcdir/ovmf.patch" + cp "$srcdir/ovmf-gcc4.9-basetools.patch" tools/firmware/ + cp "$srcdir/ovmf-gcc4.9-ovmfpkg.patch" tools/firmware/ + + # 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" + + ## 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 + + # 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/ipxe-git-9a93db3f0947484e30e753bbd61a10b17336e20e.tar.gz" tools/firmware/etherboot/ipxe.tar.gz + +} + +build() { + cd "$pkgname-$pkgver/" + export CFLAGS=-fno-caller-saves + ./autogen.sh + ./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-stubdom --enable-qemu-traditional --enable-rombios \ + --with-extra-qemuu-configure-args="--disable-bluez --disable-gtk --enable-spice --enable-usb-redir" # --enable-ovmf + make LANG=C PYTHON=python2 +} + +package() { + cd "$pkgname-$pkgver/" + + make DESTDIR="$pkgdir" LANG=C PYTHON=python2 install + + cd "$pkgdir" + + # Install files from AUR 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/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 + + # Sanitize library path (if lib64 exists) + if [[ -d usr/lib64 ]]; then + cd usr/ + cp -r lib64/* lib/ + rm -rf lib64 + cd ../ + fi + + # If EFI binaries build, 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 + fi + + # Compress syms file and move to a share location + gzip boot/$pkgname-syms-* + mv boot/$pkgname-syms-*.gz usr/share/xen + + ##### Kill unwanted stuff ##### + # hypervisor symlinks + rm -f boot/xen{,-4,-4.5,-4.5-rc}.gz + + # 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-* + + # adhere to Static Library Packaging Guidelines + rm -rf usr/lib/*.a + +} diff --git a/ati-passthrough.patch b/ati-passthrough.patch new file mode 100644 index 000000000000..7c20b1ecd61a --- /dev/null +++ b/ati-passthrough.patch @@ -0,0 +1,415 @@ +--- xen-4.3.1/tools/qemu-xen-traditional/hw/pass-through.c Thu Sep 6 11:05:30 2012 ++++ xen-4.3.1-new/tools/qemu-xen-traditional/hw/pass-through.c Sat Nov 24 08:27:07 2012 +@@ -1438,9 +1438,17 @@ static void pt_ioport_map(PCIDevice *d, + if (e_phys != -1) + { + /* Create new mapping */ +- ret = xc_domain_ioport_mapping(xc_handle, domid, e_phys, +- assigned_device->bases[i].access.pio_base, e_size, +- DPCI_ADD_MAPPING); ++ if ( vga_skip_ioport_map(d) ) ++ { ++ assigned_device->bases[i].e_physbase = -1; ++ } ++ else ++ { ++ ret = xc_domain_ioport_mapping(xc_handle, domid, e_phys, ++ assigned_device->bases[i].access.pio_base, e_size, ++ DPCI_ADD_MAPPING); ++ } ++ + if ( ret != 0 ) + { + PT_LOG("Error: create new mapping failed!\n"); +--- xen-4.3.1/tools/qemu-xen-traditional/hw/pass-through.h Thu Sep 6 11:05:30 2012 ++++ xen-4.3.1-new/tools/qemu-xen-traditional/hw/pass-through.h Sat Nov 24 08:27:07 2012 +@@ -419,6 +419,11 @@ int pt_pci_host_write(struct pci_dev *pc + void intel_pch_init(PCIBus *bus); + int register_vga_regions(struct pt_dev *real_device); + int unregister_vga_regions(struct pt_dev *real_device); ++int vga_skip_ioport_map(PCIDevice *d); ++int igd_register_vga_regions(struct pt_dev *real_device); ++int igd_unregister_vga_regions(struct pt_dev *real_device); ++int ati_register_vga_regions(struct pt_dev *real_device); ++int ati_unregister_vga_regions(struct pt_dev *real_device); + int setup_vga_pt(struct pt_dev *real_device); + PCIBus *intel_pci_bridge_init(PCIBus *bus, int devfn, uint16_t vid, + uint16_t did, const char *name, uint16_t revision); +--- xen-4.3.1/tools/qemu-xen-traditional/hw/pci.h Thu Sep 6 11:05:30 2012 ++++ xen-4.3.1-new/tools/qemu-xen-traditional/hw/pci.h Sat Nov 24 08:27:07 2012 +@@ -54,6 +54,8 @@ extern target_phys_addr_t pci_mem_base; + + #define PCI_VENDOR_ID_CIRRUS 0x1013 + ++#define PCI_VENDOR_ID_ATI 0x1002 ++ + #define PCI_VENDOR_ID_IBM 0x1014 + #define PCI_DEVICE_ID_IBM_OPENPIC2 0xffff + +--- xen-4.3.1/tools/qemu-xen-traditional/hw/pt-graphics.c Thu Sep 6 11:05:30 2012 ++++ xen-4.3.1-new/tools/qemu-xen-traditional/hw/pt-graphics.c Sat Nov 24 08:28:10 2012 +@@ -13,6 +13,207 @@ + + extern int gfx_passthru; + extern int igd_passthru; ++/*********************************/ ++/* Code for ATI GFX Passthru */ ++/*********************************/ ++/* ATI VBIOS Working Mechanism ++ * ++ * Generally there are three memory resources (two MMIO and one PIO) ++ * associated with modern ATI gfx. VBIOS uses special tricks to figure out ++ * BARs, instead of using regular PCI config space read. ++ * ++ * (1) VBIOS relies on I/O port 0x3C3 to retrieve PIO BAR ++ * (2) VBIOS maintains a shadow copy of PCI configure space. It retries the ++ * MMIO BARs from this shadow copy via sending I/O requests to first two ++ * registers of PIO (MMINDEX and MMDATA). The workflow is like this: ++ * MMINDEX (register 0) is written with an index value, specifying the ++ * register VBIOS wanting to access. Then the shadowed data can be ++ * read/written from MMDATA (register 1). For two MMIO BARs, the index ++ * values are 0x4010 and 0x4014 respectively. ++ * ++ */ ++ ++#define ATI_BAR1_INDEX 0 //MMIO BAR1 ++#define ATI_BAR2_INDEX 1 //MMIO BAR2 ++#define ATI_BAR5_INDEX 4 //PIO BAR == BAR5 ++ ++#define ATI_BAR1_MMINDEX 0x4010 //data written to MMINDEX for MMIO BAR1 ++#define ATI_BAR2_MMINDEX 0x4014 //data written to MMINDEX FOR MMIO BAR2 ++ ++struct ati_gfx_info { ++ int initialized; /* initialized already? */ ++ ++ /* PIO */ ++ uint32_t host_pio_base; /* host base addr of PIO */ ++ uint32_t guest_pio_base; /* guest base addr of PIO */ ++ uint32_t pio_size; /* PIO size */ ++ ++ /* MMIO */ ++ uint32_t guest_mmio_base1; /* guest base addr of MMIO 1 */ ++ uint32_t guest_mmio_base2; /* guest base addr of MMIO 2 */ ++ ++ /* PIO MMINDEX access recording */ ++ uint32_t pre_mmindex_data; /* previous data written to MMINDEX */ ++}; ++ ++static struct ati_gfx_info gfx_info; ++ ++/* Convert guest PIO port to host PIO port */ ++static uint16_t gport_to_hport(uint16_t gport) ++{ ++ return (gport - gfx_info.guest_pio_base) + gfx_info.host_pio_base; ++} ++ ++/* Read host PIO port */ ++static uint32_t ati_hw_in(uint16_t hport) ++{ ++ unsigned val; ++ ++ //iopl(3); ++ asm volatile ("in %1,%0":"=a"(val):"Nd"(hport)); ++ //iopl(0); ++ ++ return val; ++} ++ ++/* Write data to host PIO */ ++static void ati_hw_out(uint16_t hport, uint32_t data) ++{ ++ //iopl(3); ++ asm volatile ("out %1, %0"::"Nd"(hport),"a"(data)); ++ //iopl(0); ++} ++ ++static uint32_t ati_io_regs_read(void *opaque, uint32_t addr) ++{ ++ uint32_t val; ++ ++ val = ati_hw_in(gport_to_hport(addr)); ++ ++ /* tweak the value if VBIOS is reading MMIO BAR1 and BAR2 */ ++ if ( addr == (gfx_info.guest_pio_base + 4) ) ++ { ++ switch ( gfx_info.pre_mmindex_data ) ++ { ++ case ATI_BAR1_MMINDEX: ++ val = gfx_info.guest_mmio_base1 | (val & 0x0000000f); ++ break; ++ case ATI_BAR2_MMINDEX: ++ val = gfx_info.guest_mmio_base2 | (val & 0x0000000f); ++ break; ++ default: ++ break; ++ } ++ } ++ ++ return val; ++} ++ ++static void ati_io_regs_write(void *opaque, uint32_t addr, uint32_t val) ++{ ++ ati_hw_out(gport_to_hport(addr), val); ++ ++ /* book keeping */ ++ if ( addr == gfx_info.guest_pio_base ) ++ gfx_info.pre_mmindex_data = val; ++} ++ ++static void ati_gfx_init(struct pt_dev *assigned) ++{ ++ PCIDevice *dev = (PCIDevice *)&assigned->dev; ++ ++ register_ioport_read(dev->io_regions[ATI_BAR5_INDEX].addr, ++ dev->io_regions[ATI_BAR5_INDEX].size, 4, ati_io_regs_read, assigned); ++ ++ register_ioport_write(dev->io_regions[ATI_BAR5_INDEX].addr, ++ dev->io_regions[ATI_BAR5_INDEX].size, 4, ati_io_regs_write, assigned); ++ ++ /* initialize IO registers */ ++ gfx_info.guest_pio_base = dev->io_regions[ATI_BAR5_INDEX].addr; ++ gfx_info.pio_size = dev->io_regions[ATI_BAR5_INDEX].size; ++ gfx_info.host_pio_base = assigned->bases[ATI_BAR5_INDEX].access.pio_base; ++ ++ gfx_info.guest_mmio_base1 = dev->io_regions[ATI_BAR1_INDEX].addr; ++ gfx_info.guest_mmio_base2 = dev->io_regions[ATI_BAR2_INDEX].addr; ++ gfx_info.initialized = 1; ++ ++ PT_LOG("guest_pio_bar = 0x%x, host_pio_bar = 0x%x, pio_size=0x%x " ++ "guest_mmio_bar1=0x%x, guest_mmio_bar2=0x%x\n", ++ gfx_info.guest_pio_base, gfx_info.host_pio_base, gfx_info.pio_size, ++ gfx_info.guest_mmio_base1, gfx_info.guest_mmio_base2); ++} ++ ++static uint32_t ati_legacy_io_read(void *opaque, uint32_t addr) ++{ ++ struct pt_dev *assigned_device = opaque; ++ PCIDevice *dev = (PCIDevice *)&assigned_device->dev; ++ uint32_t val = 0xFF; ++ ++ switch( addr ) ++ { ++ case 0x3c3: ++ val = dev->io_regions[ATI_BAR5_INDEX].addr >> 8; ++ /* Intercept GFX IO registers. This supposes to happen in ++ * ati_register_vga_regions(). But we cannot get guest phys IO BAR ++ * over there. */ ++ if ( !gfx_info.initialized ) ++ ati_gfx_init(assigned_device); ++ break; ++ default: ++ PT_LOG("ERROR: port 0x%x I/O read not handled\n", addr); ++ break; ++ } ++ ++ return val; ++} ++ ++static void ati_legacy_io_write(void *opaque, uint32_t addr, uint32_t val) ++{ ++ PT_LOG("ERROR: port 0x%x I/O write not handled\n", addr); ++} ++ ++int ati_register_vga_regions(struct pt_dev *real_device) ++{ ++ PCIDevice *dev = (PCIDevice *)&real_device->dev; ++ int ret = 0; ++ ++ /* We need to intercept VBIOS accesses to port 0x3C3, which returns ++ * device port I/O BAR. For the rest of legacy I/O ports, we allow direct ++ * accesses. ++ */ ++ ret |= xc_domain_ioport_mapping(xc_handle, domid, 0x3C0, ++ 0x3C0, 0x3, DPCI_ADD_MAPPING); ++ ++ ret |= xc_domain_ioport_mapping(xc_handle, domid, 0x3C4, ++ 0x3C4, 0x1C, DPCI_ADD_MAPPING); ++ ++ register_ioport_read(0x3c3, 1, 1, ati_legacy_io_read, real_device); ++ register_ioport_write(0x3c3, 1, 1, ati_legacy_io_write, real_device); ++ ++ /* initialized on the first port 0x3C3 access in ati_gfx_init */ ++ gfx_info.initialized = 0; ++ ++ return ret; ++} ++ ++int ati_unregister_vga_regions(struct pt_dev *real_device) ++{ ++ int ret = 0; ++ ++ ret |= xc_domain_ioport_mapping(xc_handle, domid, 0x3C0, ++ 0x3C0, 0x3, DPCI_REMOVE_MAPPING); ++ ++ ret |= xc_domain_ioport_mapping(xc_handle, domid, 0x3C4, ++ 0x3C4, 0x1C, DPCI_REMOVE_MAPPING); ++ ++ gfx_info.initialized = 0; ++ ++ return ret; ++} ++ ++/*********************************/ ++/* Code for Intel IGD Passthru */ ++/*********************************/ + + static uint32_t igd_guest_opregion = 0; + +@@ -176,6 +377,77 @@ read_default: + return pci_default_read_config(pci_dev, config_addr, len); + } + ++int igd_register_vga_regions(struct pt_dev *real_device) ++{ ++ u32 vendor_id, igd_opregion; ++ int ret = 0; ++ ++ /* legacy I/O ports 0x3C0 -- 0x3E0 */ ++ ret |= xc_domain_ioport_mapping(xc_handle, domid, 0x3C0, ++ 0x3C0, 0x20, DPCI_ADD_MAPPING); ++ ++ /* 1:1 map ASL Storage register value */ ++ vendor_id = pt_pci_host_read(real_device->pci_dev, PCI_VENDOR_ID, 2); ++ igd_opregion = pt_pci_host_read(real_device->pci_dev, PCI_INTEL_OPREGION, 4); ++ if ( (vendor_id == PCI_VENDOR_ID_INTEL) && igd_opregion ) ++ { ++ ret |= xc_domain_memory_mapping(xc_handle, domid, ++ igd_opregion >> XC_PAGE_SHIFT, ++ igd_opregion >> XC_PAGE_SHIFT, ++ 2, ++ DPCI_ADD_MAPPING); ++ PT_LOG("register_vga: igd_opregion = %x\n", igd_opregion); ++ } ++ ++ return ret; ++} ++ ++int igd_unregister_vga_regions(struct pt_dev *real_device) ++{ ++ u32 vendor_id, igd_opregion; ++ int ret = 0; ++ ++ ret |= xc_domain_ioport_mapping(xc_handle, domid, 0x3C0, ++ 0x3C0, 0x20, DPCI_REMOVE_MAPPING); ++ ++ vendor_id = pt_pci_host_read(real_device->pci_dev, PCI_VENDOR_ID, 2); ++ igd_opregion = pt_pci_host_read(real_device->pci_dev, PCI_INTEL_OPREGION, 4); ++ if ( (vendor_id == PCI_VENDOR_ID_INTEL) && igd_opregion ) ++ { ++ ret |= xc_domain_memory_mapping(xc_handle, domid, ++ igd_opregion >> XC_PAGE_SHIFT, ++ igd_opregion >> XC_PAGE_SHIFT, ++ 2, ++ DPCI_REMOVE_MAPPING); ++ } ++ ++ return ret; ++} ++/*********************************/ ++/* Generic Code for GFX Passthru */ ++/*********************************/ ++/* This function decides whether I/O port map should be skipped */ ++int vga_skip_ioport_map(PCIDevice *d) ++{ ++ struct pt_dev *dev = (struct pt_dev *)d; ++ int skip = 0; ++ ++ if ( !gfx_passthru || dev->pci_dev->device_class != 0x0300 ) ++ return 0; ++ ++ switch( dev->pci_dev->vendor_id ) ++ { ++ case PCI_VENDOR_ID_ATI: ++ case PCI_VENDOR_ID_AMD: ++ skip = 1; ++ break; ++ default: ++ skip = 0; ++ break; ++ } ++ ++ return skip; ++} + /* + * register VGA resources for the domain with assigned gfx + */ +@@ -187,18 +459,33 @@ int register_vga_regions(struct pt_dev * + if ( !gfx_passthru || real_device->pci_dev->device_class != 0x0300 ) + return ret; + ++ /* legacy I/O ports 0x3B0 - 0x3BC */ + ret |= xc_domain_ioport_mapping(xc_handle, domid, 0x3B0, + 0x3B0, 0xC, DPCI_ADD_MAPPING); + +- ret |= xc_domain_ioport_mapping(xc_handle, domid, 0x3C0, +- 0x3C0, 0x20, DPCI_ADD_MAPPING); +- ++ /* legacy video MMIO range 0xA0000 - 0xBFFFF */ + ret |= xc_domain_memory_mapping(xc_handle, domid, + 0xa0000 >> XC_PAGE_SHIFT, + 0xa0000 >> XC_PAGE_SHIFT, + 0x20, + DPCI_ADD_MAPPING); + ++ /* Other VGA regions are vendor specific */ ++ switch( real_device->pci_dev->vendor_id ) ++ { ++ case PCI_VENDOR_ID_INTEL: ++ ret = igd_register_vga_regions(real_device); ++ break; ++ case PCI_VENDOR_ID_ATI: ++ case PCI_VENDOR_ID_AMD: ++ ret = ati_register_vga_regions(real_device); ++ break; ++ default: ++ PT_LOG("gfx card wasn't supported by Xen passthru!\n"); ++ ret = 1; ++ break; ++ } ++ + if ( ret != 0 ) + PT_LOG("VGA region mapping failed\n"); + +@@ -216,26 +503,31 @@ int unregister_vga_regions(struct pt_dev + if ( !gfx_passthru || real_device->pci_dev->device_class != 0x0300 ) + return ret; + ++ /* legacy I/O ports 0x3B0 - 0x3BC */ + ret |= xc_domain_ioport_mapping(xc_handle, domid, 0x3B0, + 0x3B0, 0xC, DPCI_REMOVE_MAPPING); + +- ret |= xc_domain_ioport_mapping(xc_handle, domid, 0x3C0, +- 0x3C0, 0x20, DPCI_REMOVE_MAPPING); +- ++ /* legacy video MMIO range 0xA0000 - 0xBFFFF */ + ret |= xc_domain_memory_mapping(xc_handle, domid, + 0xa0000 >> XC_PAGE_SHIFT, + 0xa0000 >> XC_PAGE_SHIFT, + 20, + DPCI_REMOVE_MAPPING); + +- vendor_id = pt_pci_host_read(real_device->pci_dev, PCI_VENDOR_ID, 2); +- if ( (vendor_id == PCI_VENDOR_ID_INTEL) && igd_guest_opregion ) ++ /* Other VGA regions are vendor specific */ ++ switch( real_device->pci_dev->vendor_id ) + { +- ret |= xc_domain_memory_mapping(xc_handle, domid, +- igd_guest_opregion >> XC_PAGE_SHIFT, +- igd_guest_opregion >> XC_PAGE_SHIFT, +- 2, +- DPCI_REMOVE_MAPPING); ++ case PCI_VENDOR_ID_INTEL: ++ ret = igd_unregister_vga_regions(real_device); ++ break; ++ case PCI_VENDOR_ID_ATI: ++ case PCI_VENDOR_ID_AMD: ++ ret = ati_unregister_vga_regions(real_device); ++ break; ++ default: ++ PT_LOG("gfx card wasn't supported by Xen passthru!\n"); ++ ret = 1; ++ break; + } + + if ( ret != 0 ) diff --git a/efi-xen.cfg b/efi-xen.cfg new file mode 100644 index 000000000000..359dbfa582a2 --- /dev/null +++ b/efi-xen.cfg @@ -0,0 +1,7 @@ +[global] +default=xen + +[xen] +options=console=vga dom0_mem=1024M,max:1024M dom0_max_vcpus=4 loglvl=all noreboot +kernel=vmlinuz-linux root=<Root Device> rw +ramdisk=initramfs-linux.img diff --git a/etherboot-gcc5.patch b/etherboot-gcc5.patch new file mode 100644 index 000000000000..38838ce9b834 --- /dev/null +++ b/etherboot-gcc5.patch @@ -0,0 +1,40 @@ +--- a/src/drivers/net/ath/ath9k/ath9k_ar5008_phy.c 2011-12-11 03:28:04.000000000 +0100 ++++ b/src/drivers/net/ath/ath9k/ath9k_ar5008_phy.c 2015-05-25 11:14:30.732759966 +0200 +@@ -1141,7 +1141,7 @@ + REG_CLR_BIT(ah, AR_PHY_SFCORR_LOW, + AR_PHY_SFCORR_LOW_USE_SELF_CORR_LOW); + +- if (!on != aniState->ofdmWeakSigDetectOff) { ++ if ((!on) != aniState->ofdmWeakSigDetectOff) { + if (on) + ah->stats.ast_ani_ofdmon++; + else +@@ -1307,7 +1307,7 @@ + REG_CLR_BIT(ah, AR_PHY_SFCORR_LOW, + AR_PHY_SFCORR_LOW_USE_SELF_CORR_LOW); + +- if (!on != aniState->ofdmWeakSigDetectOff) { ++ if ((!on) != aniState->ofdmWeakSigDetectOff) { + DBG2("ath9k: " + "** ch %d: ofdm weak signal: %s=>%s\n", + chan->channel, +--- a/src/drivers/net/ath/ath9k/ath9k_ar9003_phy.c 2011-12-11 03:28:04.000000000 +0100 ++++ b/src/drivers/net/ath/ath9k/ath9k_ar9003_phy.c 2015-05-25 10:33:05.576229086 +0200 +@@ -859,7 +859,7 @@ + REG_CLR_BIT(ah, AR_PHY_SFCORR_LOW, + AR_PHY_SFCORR_LOW_USE_SELF_CORR_LOW); + +- if (!on != aniState->ofdmWeakSigDetectOff) { ++ if ((!on) != aniState->ofdmWeakSigDetectOff) { + DBG2("ath9k: " + "** ch %d: ofdm weak signal: %s=>%s\n", + chan->channel, +@@ -1013,7 +1013,7 @@ + AR_PHY_MRC_CCK_ENABLE, is_on); + REG_RMW_FIELD(ah, AR_PHY_MRC_CCK_CTRL, + AR_PHY_MRC_CCK_MUX_REG, is_on); +- if (!is_on != aniState->mrcCCKOff) { ++ if ((!is_on) != aniState->mrcCCKOff) { + DBG2("ath9k: " + "** ch %d: MRC CCK: %s=>%s\n", + chan->channel, diff --git a/gcc5.patch b/gcc5.patch new file mode 100644 index 000000000000..e73e8a49799d --- /dev/null +++ b/gcc5.patch @@ -0,0 +1,10 @@ +--- a/tools/firmware/Makefile 2015-07-04 16:20:40.986748538 -0500 ++++ a/tools/firmware/Makefile 2015-07-04 16:21:59.058388280 -0500 +@@ -29,6 +29,7 @@ + + seabios-dir: + GIT=$(GIT) $(XEN_ROOT)/scripts/git-checkout.sh $(SEABIOS_UPSTREAM_URL) $(SEABIOS_UPSTREAM_REVISION) seabios-dir ++ patch -Np1 -i seabios-gcc5.patch + $(MAKE) -C seabios-dir defconfig + + .PHONY: all diff --git a/grub.conf b/grub.conf new file mode 100644 index 000000000000..e456973db062 --- /dev/null +++ b/grub.conf @@ -0,0 +1,3 @@ +#XEN_HYPERVISOR_CMDLINE="xsave=1" +#XEN_LINUX_CMDLINE="console=tty0" +#XEN_LINUX_CMDLINE_OVERRIDE=0 diff --git a/ovmf-gcc4.9-basetools.patch b/ovmf-gcc4.9-basetools.patch new file mode 100644 index 000000000000..7af48e8ac27c --- /dev/null +++ b/ovmf-gcc4.9-basetools.patch @@ -0,0 +1,231 @@ +diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template +index f99ddf6..f9e1e6c 100644 +--- a/ovmf-dir/BaseTools/Conf/tools_def.template ++++ b/ovmf-dir/BaseTools/Conf/tools_def.template +@@ -159,6 +159,12 @@ + DEFINE GCC47_IA32_PREFIX = /usr/bin/
+ DEFINE GCC47_X64_PREFIX = /usr/bin/
+
++DEFINE GCC48_IA32_PREFIX = /usr/bin/
++DEFINE GCC48_X64_PREFIX = /usr/bin/
++
++DEFINE GCC49_IA32_PREFIX = /usr/bin/
++DEFINE GCC49_X64_PREFIX = /usr/bin/
++
+ DEFINE UNIX_IASL_BIN = /usr/bin/iasl
+ #DEFINE UNIX_IASL_BIN = $(HOME)/programs/iasl
+ DEFINE WIN_ASL_BIN_DIR = C:\ASL
+@@ -307,6 +310,12 @@ DEFINE SOURCERY_CYGWIN_TOOLS = /cygdrive/c/Program Files/CodeSourcery/Sourcery G + # Required to build platforms or ACPI tables:
+ # Intel(r) ACPI Compiler v20101013 from
+ # http://www.acpica.org/downloads/previous_releases.php
++# GCC49 -Linux- Requires:
++# GCC 4.9
++# Optional:
++# Required to build platforms or ACPI tables:
++# Intel(r) ACPI Compiler v20101013 from
++# http://www.acpica.org/downloads/previous_releases.php
+ # ELFGCC -Linux- Requires:
+ # GCC(this tool chain uses whatever version of gcc and binutils that is installed in /usr/bin)
+ # Optional:
+@@ -3216,6 +3225,23 @@ DEFINE GCC48_AARCH64_DLINK_FLAGS = DEF(GCC_ARM_AARCH64_DLINK_COMMON) + DEFINE GCC48_ARM_ASLDLINK_FLAGS = DEF(GCC47_ARM_ASLDLINK_FLAGS)
+ DEFINE GCC48_AARCH64_ASLDLINK_FLAGS = DEF(GCC_ARM_AARCH64_ASLDLINK_FLAGS)
+
++DEFINE GCC_ARM_AARCH64_ASLDLINK_FLAGS = DEF(GCC_ARM_AARCH64_DLINK_COMMON) --entry ReferenceAcpiTable -u $(IMAGE_ENTRY_POINT) ++DEFINE GCC49_IA32_CC_FLAGS = DEF(GCC47_IA32_CC_FLAGS)
++DEFINE GCC49_X64_CC_FLAGS = DEF(GCC47_X64_CC_FLAGS)
++DEFINE GCC49_IA32_X64_DLINK_COMMON = -nostdlib -n -q --gc-sections --script=$(EDK_TOOLS_PATH)/Scripts/gcc4.9-ld-script
++DEFINE GCC49_IA32_X64_ASLDLINK_FLAGS = DEF(GCC49_IA32_X64_DLINK_COMMON) --entry ReferenceAcpiTable -u ReferenceAcpiTable
++DEFINE GCC49_IA32_X64_DLINK_FLAGS = DEF(GCC49_IA32_X64_DLINK_COMMON) --entry $(IMAGE_ENTRY_POINT) -u $(IMAGE_ENTRY_POINT) -Map $(DEST_DIR_DEBUG)/$(BASE_NAME).map
++DEFINE GCC49_X64_DLINK_FLAGS = DEF(GCC49_IA32_X64_DLINK_FLAGS) -melf_x86_64 --oformat=elf64-x86-64
++DEFINE GCC49_ASM_FLAGS = DEF(GCC47_ASM_FLAGS)
++DEFINE GCC49_ARM_ASM_FLAGS = DEF(GCC47_ARM_ASM_FLAGS)
++DEFINE GCC49_AARCH64_ASM_FLAGS = DEF(GCC47_AARCH64_ASM_FLAGS)
++DEFINE GCC49_ARM_CC_FLAGS = DEF(GCC47_ARM_CC_FLAGS)
++DEFINE GCC49_AARCH64_CC_FLAGS = DEF(GCC47_AARCH64_CC_FLAGS)
++DEFINE GCC49_ARM_DLINK_FLAGS = DEF(GCC47_ARM_DLINK_FLAGS)
++DEFINE GCC49_AARCH64_DLINK_FLAGS = DEF(GCC_ARM_AARCH64_DLINK_COMMON)
++DEFINE GCC49_ARM_ASLDLINK_FLAGS = DEF(GCC_ARM_AARCH64_ASLDLINK_FLAGS) --oformat=elf32-littlearm
++DEFINE GCC49_AARCH64_ASLDLINK_FLAGS = DEF(GCC_ARM_AARCH64_ASLDLINK_FLAGS)
++
+ ####################################################################################
+ #
+ # Unix GCC And Intel Linux ACPI Compiler
+@@ -3769,6 +3794,126 @@ RELEASE_GCC48_AARCH64_CC_FLAGS = DEF(GCC48_AARCH64_CC_FLAGS) -Wno-unused-but-s +
+ ####################################################################################
+ #
++# GCC 4.9 - This configuration is used to compile under Linux to produce
++# PE/COFF binaries using GCC 4.9.
++#
++####################################################################################
++*_GCC49_*_*_FAMILY = GCC
++
++*_GCC49_*_MAKE_PATH = make
++*_GCC49_*_ASL_PATH = DEF(UNIX_IASL_BIN)
++
++*_GCC49_*_PP_FLAGS = DEF(GCC_PP_FLAGS)
++*_GCC49_*_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS)
++*_GCC49_*_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS)
++*_GCC49_*_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS)
++*_GCC49_*_APP_FLAGS =
++*_GCC49_*_ASL_FLAGS = DEF(IASL_FLAGS)
++*_GCC49_*_ASL_OUTFLAGS = DEF(IASL_OUTFLAGS)
++
++##################
++# GCC49 IA32 definitions
++##################
++*_GCC49_IA32_OBJCOPY_PATH = DEF(GCC49_IA32_PREFIX)objcopy
++*_GCC49_IA32_CC_PATH = DEF(GCC49_IA32_PREFIX)gcc
++*_GCC49_IA32_SLINK_PATH = DEF(GCC49_IA32_PREFIX)ar
++*_GCC49_IA32_DLINK_PATH = DEF(GCC49_IA32_PREFIX)ld
++*_GCC49_IA32_ASLDLINK_PATH = DEF(GCC49_IA32_PREFIX)ld
++*_GCC49_IA32_ASM_PATH = DEF(GCC49_IA32_PREFIX)gcc
++*_GCC49_IA32_PP_PATH = DEF(GCC49_IA32_PREFIX)gcc
++*_GCC49_IA32_VFRPP_PATH = DEF(GCC49_IA32_PREFIX)gcc
++*_GCC49_IA32_ASLCC_PATH = DEF(GCC49_IA32_PREFIX)gcc
++*_GCC49_IA32_ASLPP_PATH = DEF(GCC49_IA32_PREFIX)gcc
++*_GCC49_IA32_RC_PATH = DEF(GCC49_IA32_PREFIX)objcopy
++
++*_GCC49_IA32_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS) -m32
++*_GCC49_IA32_ASLDLINK_FLAGS = DEF(GCC49_IA32_X64_ASLDLINK_FLAGS) -m elf_i386
++*_GCC49_IA32_ASM_FLAGS = DEF(GCC49_ASM_FLAGS) -m32 -march=i386
++*_GCC49_IA32_CC_FLAGS = DEF(GCC49_IA32_CC_FLAGS) -Os
++*_GCC49_IA32_DLINK_FLAGS = DEF(GCC49_IA32_X64_DLINK_FLAGS) -m elf_i386 --oformat=elf32-i386
++*_GCC49_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
++*_GCC49_IA32_OBJCOPY_FLAGS =
++
++##################
++# GCC49 X64 definitions
++##################
++*_GCC49_X64_OBJCOPY_PATH = DEF(GCC49_X64_PREFIX)objcopy
++*_GCC49_X64_CC_PATH = DEF(GCC49_X64_PREFIX)gcc
++*_GCC49_X64_SLINK_PATH = DEF(GCC49_X64_PREFIX)ar
++*_GCC49_X64_DLINK_PATH = DEF(GCC49_X64_PREFIX)ld
++*_GCC49_X64_ASLDLINK_PATH = DEF(GCC49_X64_PREFIX)ld
++*_GCC49_X64_ASM_PATH = DEF(GCC49_X64_PREFIX)gcc
++*_GCC49_X64_PP_PATH = DEF(GCC49_X64_PREFIX)gcc
++*_GCC49_X64_VFRPP_PATH = DEF(GCC49_X64_PREFIX)gcc
++*_GCC49_X64_ASLCC_PATH = DEF(GCC49_X64_PREFIX)gcc
++*_GCC49_X64_ASLPP_PATH = DEF(GCC49_X64_PREFIX)gcc
++*_GCC49_X64_RC_PATH = DEF(GCC49_X64_PREFIX)objcopy
++
++*_GCC49_X64_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS) -m64
++*_GCC49_X64_ASLDLINK_FLAGS = DEF(GCC49_IA32_X64_ASLDLINK_FLAGS) -m elf_x86_64
++*_GCC49_X64_ASM_FLAGS = DEF(GCC49_ASM_FLAGS) -m64
++*_GCC49_X64_CC_FLAGS = DEF(GCC49_X64_CC_FLAGS)
++*_GCC49_X64_DLINK_FLAGS = DEF(GCC49_X64_DLINK_FLAGS)
++*_GCC49_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
++*_GCC49_X64_OBJCOPY_FLAGS =
++
++##################
++# GCC49 ARM definitions
++##################
++*_GCC49_ARM_CC_PATH = ENV(GCC49_ARM_PREFIX)gcc
++*_GCC49_ARM_SLINK_PATH = ENV(GCC49_ARM_PREFIX)ar
++*_GCC49_ARM_DLINK_PATH = ENV(GCC49_ARM_PREFIX)ld
++*_GCC49_ARM_ASLDLINK_PATH = ENV(GCC49_ARM_PREFIX)ld
++*_GCC49_ARM_ASM_PATH = ENV(GCC49_ARM_PREFIX)gcc
++*_GCC49_ARM_PP_PATH = ENV(GCC49_ARM_PREFIX)gcc
++*_GCC49_ARM_VFRPP_PATH = ENV(GCC49_ARM_PREFIX)gcc
++*_GCC49_ARM_ASLCC_PATH = ENV(GCC49_ARM_PREFIX)gcc
++*_GCC49_ARM_ASLPP_PATH = ENV(GCC49_ARM_PREFIX)gcc
++*_GCC49_ARM_RC_PATH = ENV(GCC49_ARM_PREFIX)objcopy
++
++*_GCC49_ARM_ARCHCC_FLAGS = -mthumb
++*_GCC49_ARM_PLATFORM_FLAGS = -march=armv7-a
++
++*_GCC49_ARM_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS)
++*_GCC49_ARM_ASLDLINK_FLAGS = DEF(GCC49_ARM_ASLDLINK_FLAGS)
++*_GCC49_ARM_ASM_FLAGS = DEF(GCC49_ARM_ASM_FLAGS)
++*_GCC49_ARM_DLINK_FLAGS = DEF(GCC49_ARM_DLINK_FLAGS)
++*_GCC49_ARM_PLATFORM_FLAGS = -march=armv7-a
++*_GCC49_ARM_PP_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_PP_FLAGS)
++*_GCC49_ARM_RC_FLAGS = DEF(GCC_ARM_RC_FLAGS)
++*_GCC49_ARM_VFRPP_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_VFRPP_FLAGS)
++
++ DEBUG_GCC49_ARM_CC_FLAGS = DEF(GCC49_ARM_CC_FLAGS) -O0
++RELEASE_GCC49_ARM_CC_FLAGS = DEF(GCC49_ARM_CC_FLAGS) -Wno-unused-but-set-variable
++
++##################
++# GCC49 AARCH64 definitions
++##################
++*_GCC49_AARCH64_CC_PATH = ENV(GCC49_AARCH64_PREFIX)gcc
++*_GCC49_AARCH64_SLINK_PATH = ENV(GCC49_AARCH64_PREFIX)ar
++*_GCC49_AARCH64_DLINK_PATH = ENV(GCC49_AARCH64_PREFIX)ld
++*_GCC49_AARCH64_ASLDLINK_PATH = ENV(GCC49_AARCH64_PREFIX)ld
++*_GCC49_AARCH64_ASM_PATH = ENV(GCC49_AARCH64_PREFIX)gcc
++*_GCC49_AARCH64_PP_PATH = ENV(GCC49_AARCH64_PREFIX)gcc
++*_GCC49_AARCH64_VFRPP_PATH = ENV(GCC49_AARCH64_PREFIX)gcc
++*_GCC49_AARCH64_ASLCC_PATH = ENV(GCC49_AARCH64_PREFIX)gcc
++*_GCC49_AARCH64_ASLPP_PATH = ENV(GCC49_AARCH64_PREFIX)gcc
++*_GCC49_AARCH64_RC_PATH = ENV(GCC49_AARCH64_PREFIX)objcopy
++
++*_GCC49_AARCH64_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS)
++*_GCC49_AARCH64_ASLDLINK_FLAGS = DEF(GCC49_AARCH64_ASLDLINK_FLAGS)
++*_GCC49_AARCH64_ASM_FLAGS = DEF(GCC49_AARCH64_ASM_FLAGS)
++*_GCC49_AARCH64_DLINK_FLAGS = DEF(GCC49_AARCH64_DLINK_FLAGS)
++*_GCC49_AARCH64_PLATFORM_FLAGS =
++*_GCC49_AARCH64_PP_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_PP_FLAGS)
++*_GCC49_AARCH64_RC_FLAGS = DEF(GCC_AARCH64_RC_FLAGS)
++*_GCC49_AARCH64_VFRPP_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_VFRPP_FLAGS)
++
++ DEBUG_GCC49_AARCH64_CC_FLAGS = DEF(GCC49_AARCH64_CC_FLAGS) -O0
++RELEASE_GCC49_AARCH64_CC_FLAGS = DEF(GCC49_AARCH64_CC_FLAGS) -Wno-unused-but-set-variable
++
++####################################################################################
++#
+ # Cygwin GCC And Intel ACPI Compiler
+ #
+ ####################################################################################
+diff --git a/BaseTools/Scripts/gcc4.9-ld-script b/BaseTools/Scripts/gcc4.9-ld-script +new file mode 100644 +index 0000000..b692328 +--- /dev/null ++++ b/ovmf-dir/BaseTools/Scripts/gcc4.9-ld-script +@@ -0,0 +1,44 @@ ++/* OUTPUT_FORMAT(efi-bsdrv-x86_64) */
++SECTIONS
++{
++ /* . = 0 + SIZEOF_HEADERS; */
++ . = 0x280;
++ .text ALIGN(0x20) :
++ {
++ *(.text .stub .text.* .gnu.linkonce.t.*)
++ . = ALIGN(0x20);
++ } =0x90909090
++ .data ALIGN(0x40) :
++ {
++ *(
++ .rodata .rodata.* .gnu.linkonce.r.*
++ .data .data.* .gnu.linkonce.d.*
++ .bss .bss.*
++ *COM*
++ )
++ . = ALIGN(0x20);
++ }
++ .eh_frame ALIGN(0x20) :
++ {
++ KEEP (*(.eh_frame))
++ }
++ .got ALIGN(0x20) :
++ {
++ *(.got .got.*)
++ . = ALIGN(0x20);
++ }
++ .rela ALIGN(0x20) :
++ {
++ *(.rela .rela.*)
++ }
++ /DISCARD/ : {
++ *(.note.GNU-stack) *(.gnu_debuglink)
++ *(.interp)
++ *(.dynsym)
++ *(.dynstr)
++ *(.dynamic)
++ *(.hash)
++ *(.comment)
++ }
++}
++
diff --git a/ovmf-gcc4.9-ovmfpkg.patch b/ovmf-gcc4.9-ovmfpkg.patch new file mode 100644 index 000000000000..b060d3e48d2e --- /dev/null +++ b/ovmf-gcc4.9-ovmfpkg.patch @@ -0,0 +1,19 @@ +--- a/ovmf-dir/OvmfPkg/build.sh ++++ b/ovmf-dir/OvmfPkg/build.sh +@@ -82,9 +82,15 @@ + 4.6.*) + TARGET_TOOLS=GCC46 + ;; +- 4.[789].*) ++ 4.7.*) + TARGET_TOOLS=GCC47 + ;; ++ 4.8.*) ++ TARGET_TOOLS=GCC48 ++ ;; ++ 4.9.*|4.1[0-9].*) ++ TARGET_TOOLS=GCC49 ++ ;; + *) + TARGET_TOOLS=GCC44 + ;; diff --git a/ovmf.patch b/ovmf.patch new file mode 100644 index 000000000000..a31b89608c7e --- /dev/null +++ b/ovmf.patch @@ -0,0 +1,13 @@ +--- a/tools/firmware/Makefile 2014-10-26 23:26:08.002103548 -0500 ++++ b/tools/firmware/Makefile 2014-10-26 23:25:50.112361448 -0500 +@@ -19,6 +19,10 @@ + + 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" ++ patch -Np1 -i ovmf-gcc4.9-basetools.patch ++ patch -Np1 -i ovmf-gcc4.9-ovmfpkg.patch + cp ovmf-makefile ovmf-dir/Makefile; + + seabios-dir: diff --git a/seabios-gcc5.patch b/seabios-gcc5.patch new file mode 100644 index 000000000000..9f7676ba3872 --- /dev/null +++ b/seabios-gcc5.patch @@ -0,0 +1,48 @@ +--- a/seabios-dir-remote/src/kbd.c ++++ b/seabios-dir-remote/src/kbd.c +@@ -11,7 +11,7 @@ + #include "hw/ps2port.h" // ps2_kbd_command + #include "hw/usb-hid.h" // usb_kbd_command + #include "output.h" // debug_enter +-#include "stacks.h" // stack_hop ++#include "stacks.h" // yield + #include "string.h" // memset + #include "util.h" // kbd_init + +@@ -117,8 +117,8 @@ static int + kbd_command(int command, u8 *param) + { + if (usb_kbd_active()) +- return stack_hop(command, (u32)param, usb_kbd_command); +- return stack_hop(command, (u32)param, ps2_kbd_command); ++ return usb_kbd_command(command, param); ++ return ps2_kbd_command(command, param); + } + + // read keyboard input +diff --git a/src/mouse.c b/src/mouse.c +index 83e499d..6d1f5b7 100644 +--- a/seabios-dir-remote/src/mouse.c ++++ b/seabios-dir-remote/src/mouse.c +@@ -10,7 +10,7 @@ + #include "hw/ps2port.h" // ps2_mouse_command + #include "hw/usb-hid.h" // usb_mouse_command + #include "output.h" // dprintf +-#include "stacks.h" // stack_hop ++#include "stacks.h" // stack_hop_back + #include "util.h" // mouse_init + + void +@@ -27,8 +27,8 @@ static int + mouse_command(int command, u8 *param) + { + if (usb_mouse_active()) +- return stack_hop(command, (u32)param, usb_mouse_command); +- return stack_hop(command, (u32)param, ps2_mouse_command); ++ return usb_mouse_command(command, param); ++ return ps2_mouse_command(command, param); + } + + #define RET_SUCCESS 0x00 + +-- diff --git a/tmpfiles.d-xen.conf b/tmpfiles.d-xen.conf new file mode 100644 index 000000000000..a55258b0feae --- /dev/null +++ b/tmpfiles.d-xen.conf @@ -0,0 +1,2 @@ +d /run/xen 0755 root root - +d /run/xenstored 0755 root root - diff --git a/xen.conf b/xen.conf new file mode 100644 index 000000000000..37a5b59f790a --- /dev/null +++ b/xen.conf @@ -0,0 +1,19 @@ +xen-evtchn +xen-gntdev +xen-gntalloc +xen-blkback +xen-netback +xen-pciback +xen-acpi-processor +## xen-acpi-processor: This module may not work on all machines; try removing this first if it causes issues. + +## The following were included in xencommons, but were not inserted by systemd: +# evtchn +# gntdev +# netbk +# blkbk +# xen-scsibk +# usbbk +# pciback +# blktap2 +# blktap diff --git a/xen.install b/xen.install new file mode 100644 index 000000000000..3914a2f15abe --- /dev/null +++ b/xen.install @@ -0,0 +1,88 @@ +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.archlinux.org/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: + + systemctl enable xen-qemu-dom0-disk-backend.service + systemctl enable xen-init-dom0.service + systemctl enable xenconsoled.service + + Other optional services are: + systemctl enable xen-watchdog.service + +4. 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.archlinux.org/index.php/Xen + +__EOF__ + +} + +upgrade_msg() { + cat << __EOF__ + +Note: If you are upgrading from one of the previous 4.2 xen builds, and are having issues + with graphics card passthrough, the default device model used has changed and the + newer model can sometimes have issues. To work around these issue, support for the + old style qemu-xen-traditional device model has been enabled. To use, add (or change) + the following line into the configuration file for the domain you want to use + passthrough with: + device_model_version = "qemu-xen-traditional" + + Also remember to rebuild your grub configuration if upgrading from a non-xen 4.5.0 + install. + + The xend daemon and the xm toolset have now been removed with the xen 4.5 release. + + This install is now using a new version of the 09_xen file, used when generating + a new grub.cfg file. The new version inherits the default linux kernel command + line settings; to use the old method, uncomment the 'XEN_LINUX_CMDLINE_OVERRIDE' + option in /etc/xen/grub.conf and change the '0' to '1' +__EOF__ + +} + +post_install() { + install_msg + upgrade_msg +} + +post_upgrade() { + upgrade_msg +} + +pre_remove() { + systemctl stop xendomains.service + systemctl stop xen-watchdog.service + systemctl stop xenconsoled.service + systemctl stop xen-init-dom0.service + systemctl stop xen-qemu-dom0-disk-backend.service + + systemctl disable xendomains.service + systemctl disable xen-watchdog.service + systemctl disable xenconsoled.service + systemctl disable xen-init-dom0.service + systemctl disable xen-qemu-dom0-disk-backend.service +} + +post_remove() { + cat << __EOF__ +===> IMPORTANT NOTICE: + +In order to finish removing Xen, you will need to modify +your bootloader configuration files to load your Linux +kernel instead of Xen kernel. +__EOF__ +} |