summaryrefslogtreecommitdiff
path: root/pcr-testing
diff options
context:
space:
mode:
authorIsaac David <isacdaavid@isacdaavid.info>2017-07-17 21:24:49 -0500
committerIsaac David <isacdaavid@isacdaavid.info>2017-07-17 21:24:49 -0500
commit31c9e41ccd612d3692df16e034350eaa14ef713f (patch)
treedeb94802d6f169abbb209449e21bc1f74f50648d /pcr-testing
parentce8c63cf2f9671da259d6e49c3fe39717f23f3cf (diff)
downloadabslibre-31c9e41ccd612d3692df16e034350eaa14ef713f.tar.gz
abslibre-31c9e41ccd612d3692df16e034350eaa14ef713f.tar.bz2
abslibre-31c9e41ccd612d3692df16e034350eaa14ef713f.zip
pcr-testing/xen: working rombios
Diffstat (limited to 'pcr-testing')
-rw-r--r--pcr-testing/xen/09_xen231
-rw-r--r--pcr-testing/xen/PKGBUILD8
-rw-r--r--pcr-testing/xen/xen.conf19
3 files changed, 5 insertions, 253 deletions
diff --git a/pcr-testing/xen/09_xen b/pcr-testing/xen/09_xen
deleted file mode 100644
index 47d357d99..000000000
--- a/pcr-testing/xen/09_xen
+++ /dev/null
@@ -1,231 +0,0 @@
-#!/usr/bin/env bash
-
-##
-## grub-mkconfig helper script specific to Parabola GNU/Linux-libre
-## Contributed by "Keshav Amburay" <the ddoott ridikulus ddoott rat aatt geemmayil ddoott ccoomm>
-## Rebranded for Parabola by "André Silva" <emulatorman@parabola.nu>
-## Updated on 08 February 2014
-##
-## Script based on do_grub_config() function in Arch (the GNU/Linux distribution) 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 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 parabola --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} / Parabola GNU/Linux-libre ${_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 Parabola GNU/Linux-libre ${_KERNEL_PKG_} kernel ...'
- module ${REAL_DIR}/${_KERNEL_FILE_} ${REAL_DIR}/${_KERNEL_FILE_} root=${GRUB_LINUX_ROOT_DEVICE} rw ${GRUB_LINUX_PARAMS}
- echo 'Loading Parabola GNU/Linux-libre ${_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} / Parabola GNU/Linux-libre ${_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 Parabola GNU/Linux-libre ${_KERNEL_PKG_} kernel ...'
- module ${REAL_DIR}/${_KERNEL_FILE_} ${REAL_DIR}/${_KERNEL_FILE_} root=${GRUB_LINUX_ROOT_DEVICE} rw ${GRUB_LINUX_PARAMS}
- echo 'Loading Parabola GNU/Linux-libre ${_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} / Parabola GNU/Linux-libre ${_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 Parabola GNU/Linux-libre ${_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/pcr-testing/xen/PKGBUILD b/pcr-testing/xen/PKGBUILD
index 89d5ea346..802639c96 100644
--- a/pcr-testing/xen/PKGBUILD
+++ b/pcr-testing/xen/PKGBUILD
@@ -1,4 +1,4 @@
-# current version adapted from https://gitlab.com/johnth/aur-xen/blob/717dc1c8e32c3c615652f2b40838d1cb12441073/PKGBUILD
+# current version adapted from https://gitlab.com/johnth/aur-xen/blob/ea6a7a5938eb8bb4fbcd5de11220b2a7bbe12121/PKGBUILD
# Maintainer (AUR): John Thomson <aur.xen at j0aur.mm.st>
# Contributor (Arch): David Sutton <kantras - gmail.com>
@@ -36,7 +36,7 @@ pkgname=(xen{,-docs,-syms})
_pkgname=xen
pkgver=4.9.0
_pkgver=${pkgver/rc/-rc}
-pkgrel=1.parabola1
+pkgrel=1.parabola2
pkgdesc="Virtual Machine Hypervisor & Tools (Parabola rebranded)"
arch=(x86_64 armv7h)
depends=(
@@ -146,6 +146,7 @@ source=(
patch-gcc7-vtpm-implicit-fallthrough.patch
patch-gcc7-vtpmmgr-make-inline-static.patch
patch-gcc7-minios-udivmod.patch
+ patch-gcc7-rombios.patch::'https://xenbits.xen.org/gitweb/?p=xen.git;a=commitdiff_plain;h=672949d6c61d9cba01c5b414eed9d522082f04d3'
## Files
xen.install
@@ -214,12 +215,12 @@ sha256sums=(
'0ce9de822712e2b538dc144ba23b584970ac73b327277917b4afaa321c5b4b0c'
'5727d42575dfac1870d235fab23b8a230857cfdf44372bc1d98bb6384b752367'
'b6fa5bff89242719b20747d7eb197d0aeb59f8a89e841137f0b0cab17de20686'
+ '70b41197cde89d71e37d0c0d2af7087f4ec0a85db3f3e01f22cd2f91bf68b3c8'
#pkgbuild files
'330bcc5ab22e982d37495b57176d306353c220fec7c2b6c4a78a9133382a623e'
'9b2e6880d6345d1029317d7d65c85e07039b795c988b6852159d2ad673b13930'
'95f09bccc104d98c14559000823cb50f0d076f6a65b9f3b4e7725762b84ab5c7'
- '50a9b7fd19e8beb1dea09755f07318f36be0b7ec53d3c9e74f3266a63e682c0c'
'40e0760810a49f925f2ae9f986940b40eba477dc6d3e83a78baaae096513b3cf'
## XSA patches
@@ -284,6 +285,7 @@ prepare() {
# Compile Patches
echo 'Compile patches'
+ patch -Np1 -i "$srcdir/patch-gcc7-rombios.patch"
# Build EFI binary with mingw
if [[ "$_binutils_efi" != true ]]; then
diff --git a/pcr-testing/xen/xen.conf b/pcr-testing/xen/xen.conf
deleted file mode 100644
index 37a5b59f7..000000000
--- a/pcr-testing/xen/xen.conf
+++ /dev/null
@@ -1,19 +0,0 @@
-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