diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /app-emulation/grub-xen-host |
reinit the tree, so we can have metadata
Diffstat (limited to 'app-emulation/grub-xen-host')
-rw-r--r-- | app-emulation/grub-xen-host/Manifest | 3 | ||||
-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, 101 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..6727cf8012d4 --- /dev/null +++ b/app-emulation/grub-xen-host/Manifest @@ -0,0 +1,3 @@ +EBUILD grub-xen-host-1.0.ebuild 1873 SHA256 d209d2d3363fe0fbbf346b282371b609d1660fd756f020e660b42bab01c3c438 SHA512 4c9f2d4b28d9d2cfcb3eed3a22a3e8c25581892b0bdb7f08c950670ea636b2d3f48520f3a323c1dba910131a31e3532585edef95d087db1831a5a1fe72fb8160 WHIRLPOOL a210fccbf23ff0aae9d45aa7fdf8d5756c35e69f67bdcdb32be505ddede6387dcffb16188a0e80151ba009686eb7a1009eae9616fab4e3e43334b2e160ae75d9 +MISC ChangeLog 776 SHA256 d8f23d08d1af086860f63468af1441244f33d7004b910a80c4909c7d128d8281 SHA512 9734b56c5bc84730bb0ccd8aa249e870a1f79dd3b9a625a4fcacfc93f69a3690c91c860a10a4f2f653d2be394e9360e89780716aff815808d9f8203f35a60983 WHIRLPOOL 0eede192f729fc73785b2ebaf3c3663ab6e8d63cff5d8d05e35f1fadd44035aaf5c3607a384a30d4e782438437ee159b8126b659acc118a1683d65278d98d34e +MISC metadata.xml 514 SHA256 b97fdcede4ec8e77cb41b8db9d1405f65f557d82b1c23a6ebfb56c34a1b5fa38 SHA512 356a5343e7133e6778d3b1e3715c76c2c873bd74049c13b4b9689ea0a69bedae6ef5fd9529b944540f6c22d4f66d02aa098f0c15dfada9cbe16ea74337b6f3aa WHIRLPOOL a1c18f08060795ffb00867ac4ded91d8b3c09db9362e02504569d8561e88ab4d8c4dc10c0a58f499f6b5ae122aa7d15f872049337bbca29cab52b336872e65de 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> |