diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 21:03:06 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 21:03:06 +0100 |
commit | 8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch) | |
tree | 7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /app-emulation/grub-xen-host | |
parent | 30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff) |
gentoo resync : 14.07.2018
Diffstat (limited to 'app-emulation/grub-xen-host')
-rw-r--r-- | app-emulation/grub-xen-host/Manifest | 2 | ||||
-rw-r--r-- | app-emulation/grub-xen-host/grub-xen-host-1.0.ebuild | 83 | ||||
-rw-r--r-- | app-emulation/grub-xen-host/metadata.xml | 15 |
3 files changed, 100 insertions, 0 deletions
diff --git a/app-emulation/grub-xen-host/Manifest b/app-emulation/grub-xen-host/Manifest new file mode 100644 index 000000000000..cfd429dd09f8 --- /dev/null +++ b/app-emulation/grub-xen-host/Manifest @@ -0,0 +1,2 @@ +EBUILD grub-xen-host-1.0.ebuild 1873 BLAKE2B 01a46bb4dadc28e6680153bd7cb24b4ea328c65a86179358bd90dc27702873c86adc3859aa4df994585ecf21feace5b628e6110c568a81b815a7168d15f776a7 SHA512 4c9f2d4b28d9d2cfcb3eed3a22a3e8c25581892b0bdb7f08c950670ea636b2d3f48520f3a323c1dba910131a31e3532585edef95d087db1831a5a1fe72fb8160 +MISC metadata.xml 514 BLAKE2B 851dced55bcc8b7188be4b3b0758af207a0cbac7c5bd59138592fcd0ea185e701abbf08e36faae46dc41cce794c8fe95143c7393f0ce428f9aca9c7b27fee380 SHA512 356a5343e7133e6778d3b1e3715c76c2c873bd74049c13b4b9689ea0a69bedae6ef5fd9529b944540f6c22d4f66d02aa098f0c15dfada9cbe16ea74337b6f3aa diff --git a/app-emulation/grub-xen-host/grub-xen-host-1.0.ebuild b/app-emulation/grub-xen-host/grub-xen-host-1.0.ebuild new file mode 100644 index 000000000000..8fe09f145e0f --- /dev/null +++ b/app-emulation/grub-xen-host/grub-xen-host-1.0.ebuild @@ -0,0 +1,83 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +DESCRIPTION="Grub2 built as a PV grub per the Xen PV Boot Protocol" +HOMEPAGE="https://blog.xenproject.org/2015/01/07/using-grub-2-as-a-bootloader-for-xen-pv-guests/" +SRC_URI="" + +LICENSE="BSD-2" +SLOT="0" +KEYWORDS="amd64" +IUSE="" + +DEPEND="sys-boot/grub:2=[grub_platforms_xen] + app-emulation/xen-tools:=" +RDEPEND="${DEPEND}" + +S="${WORKDIR}" + +STRIP_MASK="usr/libexec/xen/bin/grub-x86_64-xen.bin" +QA_EXECSTACK="usr/libexec/xen/bin/grub-x86_64-xen.bin" +QA_WX_LOAD="usr/libexec/xen/bin/grub-x86_64-xen.bin" +QA_PRESTRIPPED="usr/libexec/xen/bin/grub-x86_64-xen.bin" +RESTRICT="test" + +src_configure() { + : +} + +src_compile() { + cat > "${S}/grub-bootstrap.cfg" <<- EOF + normal (memdisk)/grub.cfg + EOF + + cat > "${S}/grub.cfg" <<- EOF + if search -s -f /boot/xen/pvboot-x86_64.elf ; then + echo "Chainloading (${root})/boot/xen/pvboot-x86_64.elf" + multiboot "/boot/xen/pvboot-x86_64.elf" + boot + fi + + if search -s -f /xen/pvboot-x86_64.elf ; then + echo "Chainloading (${root})/xen/pvboot-x86_64.elf" + multiboot "/xen/pvboot-x86_64.elf" + boot + fi + + if search -s -f /boot/grub/grub.cfg ; then + echo "Reading (${root})/boot/grub/grub.cfg" + configfile /boot/grub/grub.cfg + fi + + if search -s -f /grub/grub.cfg ; then + echo "Reading (${root})/grub/grub.cfg" + configfile /grub/grub.cfg + fi + EOF + + tar cf memdisk.tar grub.cfg || die "failed to tar" + + local grub_mkimage=grub-mkimage + if type grub2-mkimage &> /dev/null; then + grub_mkimage=grub2-mkimage + fi + + local args=( + "${grub_mkimage}" + -O x86_64-xen + -c grub-bootstrap.cfg + -m memdisk.tar + -o grub-x86_64-xen.bin + /usr/lib/grub/x86_64-xen/*.mod + ) + + echo "${args[@]}" + "${args[@]}" || die "failed to grub-mkimage" +} + +src_install() { + exeinto /usr/libexec/xen/bin + doexe grub-x86_64-xen.bin +} diff --git a/app-emulation/grub-xen-host/metadata.xml b/app-emulation/grub-xen-host/metadata.xml new file mode 100644 index 000000000000..bddad784d7fd --- /dev/null +++ b/app-emulation/grub-xen-host/metadata.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type='project'> + <email>xen@gentoo.org</email> + </maintainer> + <maintainer type='person'> + <email>cardoe@gentoo.org</email> + </maintainer> + <longdescription lang="en"> + A grub 2 built to run in dom0 which is a PV grub that can chain load + a guest installed PV grub (grub legacy or grub 2) or handle a guest + supplied grub 2 config file. + </longdescription> +</pkgmetadata> |