diff options
Diffstat (limited to 'sys-firmware/edk2-bin')
-rw-r--r-- | sys-firmware/edk2-bin/Manifest | 6 | ||||
-rw-r--r-- | sys-firmware/edk2-bin/edk2-bin-202202.ebuild | 71 | ||||
-rw-r--r-- | sys-firmware/edk2-bin/edk2-bin-202408.ebuild | 69 | ||||
-rw-r--r-- | sys-firmware/edk2-bin/metadata.xml | 11 |
4 files changed, 157 insertions, 0 deletions
diff --git a/sys-firmware/edk2-bin/Manifest b/sys-firmware/edk2-bin/Manifest new file mode 100644 index 000000000000..75cc08df22ce --- /dev/null +++ b/sys-firmware/edk2-bin/Manifest @@ -0,0 +1,6 @@ +DIST edk2-202408-1-amd64.xpak 6406269 BLAKE2B 4989c77321b01165253a8a3bf9955f5b75598cc49371ed74b342786b8158c232f088f1f8a34b8afae0e72f8aabe6cb2a437f5d1f495d3e09d939ef5b4ddfecc6 SHA512 9ead4ac94c634b740ea2a19dcad968e31bc90662b8caf6a9bb96f7517358af23bc1bc996317ca4e7bf2a7b685b2c80fae4757eb1d10fd8d3550388580a0b6ff2 +DIST edk2-202408-1-arm64.xpak 2710314 BLAKE2B e21ee00e178c59cd89cc297f22a044459446f394000e6e959a2cea59c120e9778682ba3e040b02e155d05d5196aebe45c8fc50ae6923a51fd2be2308132b23f9 SHA512 9f2c99755e3ca482ef240f58711d571a57c2e29fc29b696d0345a1c02d185b325f840cd747d139724bde7dfeaced99fd6eecc5e95ec3b45a6651c797d7989576 +DIST edk2-ovmf-202202-1.xpak 2672386 BLAKE2B 75c15d4379610ab2af85b78166e350d52f4f1bc1fff5b2eb693ad0d7b1f6648e65d8ae3e2c5467f93f1557ad3b4fa664ab2d76ff10794667de22c2ea8cca6b2d SHA512 06783b89c96bada0fd025ff39eaee501a027abcb03c0bdcf3ff497d52be22927ab03013d90f145ee94a8662cfffe4f8c154dcd06db1bb1acef8a85ae43de14a3 +EBUILD edk2-bin-202202.ebuild 2166 BLAKE2B f20fc57618542d7a95fb40cba6de904cec6841b68606ce170a8bf360cfea45f7201e83d4b21559f4379302397fd14cc8fa90b30f8977967eb2b67b26d0ebd9ee SHA512 2173dfe2d3948786e85fa4ee3ea49be64a29f21e188b71d2e10ace8626bb5d3cf12534184c548104ab1e68f875c4933279209a04ca3f734af2bc801321789ea8 +EBUILD edk2-bin-202408.ebuild 1823 BLAKE2B 034e616d71eeae08382396affb28892d6e846d8dc3064c83170f1ff918133d766cfa509b83dea1e09fc4dc014db2b4a66c2dd8ceb997f6e6767c13dd657e2ba7 SHA512 1bf93ba16681a0b303c63d0ce1db29b6073c80d985718b629426c58542bbae39c18d06b7c6ee6bdf39345df94b78ad4ff62f3fd124f7fb6ae95932d940847a80 +MISC metadata.xml 355 BLAKE2B e88a696d5268856289ed36d6ac864d8b13e2460dc76b7593934a114fd8ca913d92eda660ba116f9d8b3f75e3ab4a8790a421def1a3fb62a3cbf9448f7328ef8d SHA512 c93298fe9106bab617a35dfca405d5307b8588becd7d0b487a0acce60fd3e2f6fd006b38c227378baa6ee751f75c531bce41be92d27642edb41e6c33473810e2 diff --git a/sys-firmware/edk2-bin/edk2-bin-202202.ebuild b/sys-firmware/edk2-bin/edk2-bin-202202.ebuild new file mode 100644 index 000000000000..75ae882382d6 --- /dev/null +++ b/sys-firmware/edk2-bin/edk2-bin-202202.ebuild @@ -0,0 +1,71 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit readme.gentoo-r1 secureboot + +BINPKG="edk2-ovmf-${PV}-1" + +DESCRIPTION="UEFI firmware for 64-bit x86 virtual machines" +HOMEPAGE="https://github.com/tianocore/edk2" +SRC_URI="https://dev.gentoo.org/~ajak/distfiles/${BINPKG}.xpak" +S="${WORKDIR}" + +# TODO: the binary 202105 package currently lacks the preseeded +# OVMF_VARS.secboot.fd file (that we typically get from fedora) + +LICENSE="BSD-2 MIT" +SLOT="0" +KEYWORDS="amd64 arm64 ~loong ~ppc ppc64 ~riscv x86" + +RDEPEND="!sys-firmware/edk2" + +DISABLE_AUTOFORMATTING=true +DOC_CONTENTS="This package contains the tianocore edk2 UEFI firmware for 64-bit x86 +virtual machines. The firmware is located under + /usr/share/edk2-ovmf/OVMF_CODE.fd + /usr/share/edk2-ovmf/OVMF_VARS.fd + /usr/share/edk2-ovmf/OVMF_CODE.secboot.fd + +If USE=binary is enabled, we also install an OVMF variables file (coming from +fedora) that contains secureboot default keys + + /usr/share/edk2-ovmf/OVMF_VARS.secboot.fd + +If you have compiled this package by hand, you need to either populate all +necessary EFI variables by hand by booting + /usr/share/edk2-ovmf/UefiShell.(iso|img) +or creating OVMF_VARS.secboot.fd by hand: + https://github.com/puiterwijk/qemu-ovmf-secureboot + +The firmware does not support csm (due to no free csm implementation +available). If you need a firmware with csm support you have to download +one for yourself. Firmware blobs are commonly labeled + OVMF{,_CODE,_VARS}-with-csm.fd + +In order to use the firmware you can run qemu the following way + + $ qemu-system-x86_64 \\ + -drive file=/usr/share/edk2-ovmf/OVMF.fd,if=pflash,format=raw,unit=0,readonly=on \\ + ..." + +src_unpack() { + tar -xf - < <(xz -c -d --single-stream "${DISTDIR}/${BINPKG}.xpak") || die "unpacking binpkg failed" +} + +src_install() { + mv "usr/share/doc/edk2-ovmf-${PV}" "usr/share/doc/${PF}" || die + + # Don't want to try to install the readme from the source package + rm "usr/share/doc/${PF}/README.gentoo.bz2" + mv usr "${ED}" || die + + secureboot_auto_sign --in-place + + readme.gentoo_create_doc +} + +pkg_postinst() { + readme.gentoo_print_elog +} diff --git a/sys-firmware/edk2-bin/edk2-bin-202408.ebuild b/sys-firmware/edk2-bin/edk2-bin-202408.ebuild new file mode 100644 index 000000000000..75bd9bda8186 --- /dev/null +++ b/sys-firmware/edk2-bin/edk2-bin-202408.ebuild @@ -0,0 +1,69 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit readme.gentoo-r1 secureboot + +BINPKG="${P/-bin/}-1" +ARCHES="amd64 arm64" + +DESCRIPTION="TianoCore EDK II UEFI firmware for virtual machines" +HOMEPAGE="https://github.com/tianocore/edk2" +SRC_URI=$(printf "https://dev.gentoo.org/~chewi/distfiles/${BINPKG}-%s.xpak\n" ${ARCHES}) +S="${WORKDIR}" +LICENSE="BSD-2 MIT" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~loong ~ppc ~ppc64 ~riscv ~x86" + +RDEPEND="!sys-firmware/edk2" + +DOC_CONTENTS="This package includes the TianoCore EDK II UEFI firmware for virtual \ +machines of these architectures: ${ARCHES}. See each architecture's README for \ +usage details." + +src_unpack() { + local a + for a in ${ARCHES}; do + mkdir "${a}" || die + tar -C "${a}" -xf - < <(xz -c -d --single-stream "${DISTDIR}/${BINPKG}-${a}.xpak") || + die "unpacking ${a} binpkg failed" + done +} + +src_prepare() { + bunzip2 */usr/share/doc/*/README.gentoo.bz2 || die + default +} + +src_install() { + insinto /usr/share + doins -r */usr/share/{edk2,qemu}/ + + # Compatibility with older package versions. + dosym edk2/OvmfX64 /usr/share/edk2-ovmf + + secureboot_auto_sign --in-place + readme.gentoo_create_doc + + local a + for a in ${ARCHES}; do + newdoc "${a}"/usr/share/doc/*/README.gentoo README-"${a}".gentoo + done +} + +pkg_preinst() { + local OLD=${EROOT}/usr/share/edk2-ovmf NEW=${EROOT}/usr/share/edk2/OvmfX64 + if [[ -d ${OLD} && ! -L ${OLD} ]]; then + { + rm -vf "${OLD}"/{OVMF_{CODE,CODE.secboot,VARS}.fd,EnrollDefaultKeys.efi,Shell.efi,UefiShell.img} && + mkdir -p "${NEW}" && + find "${OLD}" -mindepth 1 -maxdepth 1 -execdir mv --update=none-fail -vt "${NEW}"/ {} + && + rmdir "${OLD}" + } || die "unable to replace old directory with compatibility symlink" + fi +} + +pkg_postinst() { + readme.gentoo_print_elog +} diff --git a/sys-firmware/edk2-bin/metadata.xml b/sys-firmware/edk2-bin/metadata.xml new file mode 100644 index 000000000000..674a9e5d13d6 --- /dev/null +++ b/sys-firmware/edk2-bin/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>virtualization@gentoo.org</email> + <name>Gentoo Virtualization Project</name> + </maintainer> + <upstream> + <remote-id type="cpe">cpe:/a:tianocore:edk2</remote-id> + </upstream> +</pkgmetadata> |