1 |
commit: 3bb54ffa0e7e41b2bfba21d8b7dc77db2c30a1fe |
2 |
Author: John Helmert III <ajak <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Aug 7 01:04:51 2022 +0000 |
4 |
Commit: John Helmert III <ajak <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Sep 6 22:38:54 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3bb54ffa |
7 |
|
8 |
sys-firmware/edk2-ovmf-bin: new package, add 202202 |
9 |
|
10 |
The source package only supports building on amd64, so add the keywords |
11 |
from the last edk2-ovmf with USE=binary to this package. |
12 |
|
13 |
Signed-off-by: John Helmert III <ajak <AT> gentoo.org> |
14 |
|
15 |
sys-firmware/edk2-ovmf-bin/Manifest | 1 + |
16 |
.../edk2-ovmf-bin/edk2-ovmf-bin-202202.ebuild | 69 ++++++++++++++++++++++ |
17 |
sys-firmware/edk2-ovmf-bin/metadata.xml | 8 +++ |
18 |
3 files changed, 78 insertions(+) |
19 |
|
20 |
diff --git a/sys-firmware/edk2-ovmf-bin/Manifest b/sys-firmware/edk2-ovmf-bin/Manifest |
21 |
new file mode 100644 |
22 |
index 000000000000..3acdd51ad6e6 |
23 |
--- /dev/null |
24 |
+++ b/sys-firmware/edk2-ovmf-bin/Manifest |
25 |
@@ -0,0 +1 @@ |
26 |
+DIST edk2-ovmf-202202-1.xpak 2672386 BLAKE2B 75c15d4379610ab2af85b78166e350d52f4f1bc1fff5b2eb693ad0d7b1f6648e65d8ae3e2c5467f93f1557ad3b4fa664ab2d76ff10794667de22c2ea8cca6b2d SHA512 06783b89c96bada0fd025ff39eaee501a027abcb03c0bdcf3ff497d52be22927ab03013d90f145ee94a8662cfffe4f8c154dcd06db1bb1acef8a85ae43de14a3 |
27 |
|
28 |
diff --git a/sys-firmware/edk2-ovmf-bin/edk2-ovmf-bin-202202.ebuild b/sys-firmware/edk2-ovmf-bin/edk2-ovmf-bin-202202.ebuild |
29 |
new file mode 100644 |
30 |
index 000000000000..7b35ffe6dc9e |
31 |
--- /dev/null |
32 |
+++ b/sys-firmware/edk2-ovmf-bin/edk2-ovmf-bin-202202.ebuild |
33 |
@@ -0,0 +1,69 @@ |
34 |
+# Copyright 1999-2022 Gentoo Authors |
35 |
+# Distributed under the terms of the GNU General Public License v2 |
36 |
+ |
37 |
+EAPI=8 |
38 |
+ |
39 |
+inherit readme.gentoo-r1 |
40 |
+ |
41 |
+BINPKG="${P/-bin/}-1" |
42 |
+ |
43 |
+DESCRIPTION="UEFI firmware for 64-bit x86 virtual machines" |
44 |
+HOMEPAGE="https://github.com/tianocore/edk2" |
45 |
+SRC_URI="https://dev.gentoo.org/~ajak/distfiles/${BINPKG}.xpak" |
46 |
+S="${WORKDIR}" |
47 |
+ |
48 |
+# TODO: the binary 202105 package currently lacks the preseeded |
49 |
+# OVMF_VARS.secboot.fd file (that we typically get from fedora) |
50 |
+ |
51 |
+LICENSE="BSD-2 MIT" |
52 |
+SLOT="0" |
53 |
+#KEYWORDS="~amd64 ~arm64 ~loong ~ppc ~ppc64 ~riscv ~x86" |
54 |
+ |
55 |
+RDEPEND="!sys-firmware/edk2-ovmf" |
56 |
+ |
57 |
+DISABLE_AUTOFORMATTING=true |
58 |
+DOC_CONTENTS="This package contains the tianocore edk2 UEFI firmware for 64-bit x86 |
59 |
+virtual machines. The firmware is located under |
60 |
+ /usr/share/edk2-ovmf/OVMF_CODE.fd |
61 |
+ /usr/share/edk2-ovmf/OVMF_VARS.fd |
62 |
+ /usr/share/edk2-ovmf/OVMF_CODE.secboot.fd |
63 |
+ |
64 |
+If USE=binary is enabled, we also install an OVMF variables file (coming from |
65 |
+fedora) that contains secureboot default keys |
66 |
+ |
67 |
+ /usr/share/edk2-ovmf/OVMF_VARS.secboot.fd |
68 |
+ |
69 |
+If you have compiled this package by hand, you need to either populate all |
70 |
+necessary EFI variables by hand by booting |
71 |
+ /usr/share/edk2-ovmf/UefiShell.(iso|img) |
72 |
+or creating OVMF_VARS.secboot.fd by hand: |
73 |
+ https://github.com/puiterwijk/qemu-ovmf-secureboot |
74 |
+ |
75 |
+The firmware does not support csm (due to no free csm implementation |
76 |
+available). If you need a firmware with csm support you have to download |
77 |
+one for yourself. Firmware blobs are commonly labeled |
78 |
+ OVMF{,_CODE,_VARS}-with-csm.fd |
79 |
+ |
80 |
+In order to use the firmware you can run qemu the following way |
81 |
+ |
82 |
+ $ qemu-system-x86_64 \ |
83 |
+ -drive file=/usr/share/edk2-ovmf/OVMF.fd,if=pflash,format=raw,unit=0,readonly=on \ |
84 |
+ ..." |
85 |
+ |
86 |
+src_unpack() { |
87 |
+ tar -x < <(xz -c -d --single-stream "${DISTDIR}/${BINPKG}.xpak") || die "unpacking binpkg failed" |
88 |
+} |
89 |
+ |
90 |
+src_install() { |
91 |
+ mv "usr/share/doc/${P/-bin/}" "usr/share/doc/${PF}" || die |
92 |
+ |
93 |
+ # Don't want to try to install the readme from the source package |
94 |
+ rm "usr/share/doc/${PF}/README.gentoo.bz2" |
95 |
+ mv usr "${ED}" || die |
96 |
+ |
97 |
+ readme.gentoo_create_doc |
98 |
+} |
99 |
+ |
100 |
+pkg_postinst() { |
101 |
+ readme.gentoo_print_elog |
102 |
+} |
103 |
|
104 |
diff --git a/sys-firmware/edk2-ovmf-bin/metadata.xml b/sys-firmware/edk2-ovmf-bin/metadata.xml |
105 |
new file mode 100644 |
106 |
index 000000000000..cfac6f8ac4ff |
107 |
--- /dev/null |
108 |
+++ b/sys-firmware/edk2-ovmf-bin/metadata.xml |
109 |
@@ -0,0 +1,8 @@ |
110 |
+<?xml version="1.0" encoding="UTF-8"?> |
111 |
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> |
112 |
+<pkgmetadata> |
113 |
+ <maintainer type="project"> |
114 |
+ <email>virtualization@g.o</email> |
115 |
+ <name>Gentoo Virtualization Project</name> |
116 |
+ </maintainer> |
117 |
+</pkgmetadata> |