Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] New packages: {edk2,ovmf-*}-202011
@ 2021-02-26 17:59 Logarithmus
  2021-02-26 18:01 ` [PR PATCH] [Updated] " Logarithmus
                   ` (36 more replies)
  0 siblings, 37 replies; 38+ messages in thread
From: Logarithmus @ 2021-02-26 17:59 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1614 bytes --]

There is a new pull request by Logarithmus against master on the void-packages repository

https://github.com/Logarithmus/void-packages ovmf
https://github.com/void-linux/void-packages/pull/29074

New packages: {edk2,ovmf-*}-202011
[ci-skip]

<!-- Mark items with [x] where applicable -->

#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/29074.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ovmf-29074.patch --]
[-- Type: text/x-diff, Size: 18600 bytes --]

From 77d9e88b14b2a6ac40923f77c1bf50184633f928 Mon Sep 17 00:00:00 2001
From: "Franc[e]sco" <lolisamurai@tfwno.gf>
Date: Sun, 8 Dec 2019 20:47:47 +0100
Subject: [PATCH] New package: {edk2,ovmf-*}-202011

ci-skip
---
 srcpkgs/edk2/files/50-edk2-ovmf-ia32-sb.json |  34 ++++
 srcpkgs/edk2/files/50-edk2-ovmf-x64-sb.json  |  35 ++++
 srcpkgs/edk2/files/60-edk2-ovmf-ia32.json    |  33 ++++
 srcpkgs/edk2/files/60-edk2-ovmf-x64.json     |  34 ++++
 srcpkgs/edk2/template                        | 175 +++++++++++++++++++
 srcpkgs/edk2/template.orig                   | 175 +++++++++++++++++++
 srcpkgs/edk2/template.rej                    |  11 ++
 srcpkgs/edk2/update                          |   2 +
 srcpkgs/ovmf-ia32                            |   1 +
 srcpkgs/ovmf-x64                             |   1 +
 10 files changed, 501 insertions(+)
 create mode 100644 srcpkgs/edk2/files/50-edk2-ovmf-ia32-sb.json
 create mode 100644 srcpkgs/edk2/files/50-edk2-ovmf-x64-sb.json
 create mode 100644 srcpkgs/edk2/files/60-edk2-ovmf-ia32.json
 create mode 100644 srcpkgs/edk2/files/60-edk2-ovmf-x64.json
 create mode 100644 srcpkgs/edk2/template
 create mode 100644 srcpkgs/edk2/template.orig
 create mode 100644 srcpkgs/edk2/template.rej
 create mode 100644 srcpkgs/edk2/update
 create mode 120000 srcpkgs/ovmf-ia32
 create mode 120000 srcpkgs/ovmf-x64

diff --git a/srcpkgs/edk2/files/50-edk2-ovmf-ia32-sb.json b/srcpkgs/edk2/files/50-edk2-ovmf-ia32-sb.json
new file mode 100644
index 00000000000..df80f1ed5ec
--- /dev/null
+++ b/srcpkgs/edk2/files/50-edk2-ovmf-ia32-sb.json
@@ -0,0 +1,34 @@
+{
+    "description": "OVMF for i386, with SB+SMM, empty varstore",
+    "interface-types": [
+        "uefi"
+    ],
+    "mapping": {
+        "device": "flash",
+        "executable": {
+            "filename": "/usr/share/edk2/ovmf-ia32/OVMF_CODE.secboot.fd",
+            "format": "raw"
+        },
+        "nvram-template": {
+            "filename": "/usr/share/edk2/ovmf-ia32/OVMF_VARS.fd",
+            "format": "raw"
+        }
+    },
+    "targets": [
+        {
+            "architecture": "i386",
+            "machines": [
+                "pc-q35-*"
+            ]
+        }
+    ],
+    "features": [
+        "acpi-s3",
+        "requires-smm",
+        "secure-boot",
+        "verbose-dynamic"
+    ],
+    "tags": [
+
+    ]
+}
diff --git a/srcpkgs/edk2/files/50-edk2-ovmf-x64-sb.json b/srcpkgs/edk2/files/50-edk2-ovmf-x64-sb.json
new file mode 100644
index 00000000000..99345cac2aa
--- /dev/null
+++ b/srcpkgs/edk2/files/50-edk2-ovmf-x64-sb.json
@@ -0,0 +1,35 @@
+{
+    "description": "OVMF for x86_64, with SB+SMM, empty varstore",
+    "interface-types": [
+        "uefi"
+    ],
+    "mapping": {
+        "device": "flash",
+        "executable": {
+            "filename": "/usr/share/edk2/ovmf/OVMF_CODE.secboot.fd",
+            "format": "raw"
+        },
+        "nvram-template": {
+            "filename": "/usr/share/edk2/ovmf/OVMF_VARS.fd",
+            "format": "raw"
+        }
+    },
+    "targets": [
+        {
+            "architecture": "x86_64",
+            "machines": [
+                "pc-q35-*"
+            ]
+        }
+    ],
+    "features": [
+        "acpi-s3",
+        "amd-sev",
+        "requires-smm",
+        "secure-boot",
+        "verbose-dynamic"
+    ],
+    "tags": [
+
+    ]
+}
diff --git a/srcpkgs/edk2/files/60-edk2-ovmf-ia32.json b/srcpkgs/edk2/files/60-edk2-ovmf-ia32.json
new file mode 100644
index 00000000000..d804b2ec7a5
--- /dev/null
+++ b/srcpkgs/edk2/files/60-edk2-ovmf-ia32.json
@@ -0,0 +1,33 @@
+{
+    "description": "OVMF for i386, without SB, without SMM, with empty varstore",
+    "interface-types": [
+        "uefi"
+    ],
+    "mapping": {
+        "device": "flash",
+        "executable": {
+            "filename": "/usr/share/edk2/ovmf-ia32/OVMF_CODE.fd",
+            "format": "raw"
+        },
+        "nvram-template": {
+            "filename": "/usr/share/edk2/ovmf-ia32/OVMF_VARS.fd",
+            "format": "raw"
+        }
+    },
+    "targets": [
+        {
+            "architecture": "i386",
+            "machines": [
+                "pc-i440fx-*",
+                "pc-q35-*"
+            ]
+        }
+    ],
+    "features": [
+        "acpi-s3",
+        "verbose-dynamic"
+    ],
+    "tags": [
+
+    ]
+}
diff --git a/srcpkgs/edk2/files/60-edk2-ovmf-x64.json b/srcpkgs/edk2/files/60-edk2-ovmf-x64.json
new file mode 100644
index 00000000000..355691bb5b5
--- /dev/null
+++ b/srcpkgs/edk2/files/60-edk2-ovmf-x64.json
@@ -0,0 +1,34 @@
+{
+    "description": "OVMF for x86_64, without SB, without SMM, with empty varstore",
+    "interface-types": [
+        "uefi"
+    ],
+    "mapping": {
+        "device": "flash",
+        "executable": {
+            "filename": "/usr/share/edk2/ovmf/OVMF_CODE.fd",
+            "format": "raw"
+        },
+        "nvram-template": {
+            "filename": "/usr/share/edk2/ovmf/OVMF_VARS.fd",
+            "format": "raw"
+        }
+    },
+    "targets": [
+        {
+            "architecture": "x86_64",
+            "machines": [
+                "pc-i440fx-*",
+                "pc-q35-*"
+            ]
+        }
+    ],
+    "features": [
+        "acpi-s3",
+        "amd-sev",
+        "verbose-dynamic"
+    ],
+    "tags": [
+
+    ]
+}
diff --git a/srcpkgs/edk2/template b/srcpkgs/edk2/template
new file mode 100644
index 00000000000..d8571bd38be
--- /dev/null
+++ b/srcpkgs/edk2/template
@@ -0,0 +1,175 @@
+# Template file for 'edk2'
+pkgname=edk2
+version=202011
+revision=1
+archs="x86_64* i686*"
+create_wrksrc=yes
+hostmakedepends="make python3 acpica-utils nasm libuuid-devel"
+short_desc="EFI Development Kit II"
+maintainer="Franc[e]sco <lolisamurai@tfwno.gf>"
+license="BSD-2-Clause-Patent, MIT, Apache-2.0"
+homepage="https://github.com/tianocore/edk2/tree/master/OvmfPkg"
+_openssl_ver=1.1.1g
+_brotli_commit=666c3280cc11dc433c303d79a83d4ffbdd12cc8d
+distfiles="https://github.com/tianocore/edk2/archive/${pkgname}-stable${version}.tar.gz
+ https://www.openssl.org/source/openssl-${_openssl_ver}.tar.gz
+ https://github.com/google/brotli/archive/${_brotli_commit}.tar.gz"
+checksum="53e877c714426c2c1957d1e875d99c7eb6602a858d7ec8ba4eac42c37e3ce064
+ddb04774f1e32f0c49751e21b67216ac87852ceb056b75209af2443400636d46
+cd82ce69defa40e9e36443e59d90aa5f8c6013024fae6a2de8c31afc2c707065"
+_toolchain_opt=GCC5
+
+case ${XBPS_MACHINE} in
+	i686)
+		# edk2 doesn't find the correct host
+		# also, x64 can't be built on i686
+		_ovmf_host_arch=IA32
+		;;
+	*)
+		_ovmf_build_x64=yes
+esac
+
+post_extract() {
+	cd "${wrksrc}/${pkgname}-${pkgname}-stable${version}"
+	ssldir=CryptoPkg/Library/OpensslLib/openssl
+	rm -rf "${ssldir}"
+	ln -sf "${wrksrc}/openssl-${_openssl_ver}" ${ssldir}
+	# openssl 1.1.1d has a typo that causes a compile error
+	sed -i 's/return return/return/g' ${ssldir}/crypto/threads_none.c
+
+	for brotlidir in BaseTools/Source/C/BrotliCompress/brotli \
+		MdeModulePkg/Library/BrotliCustomDecompressLib/brotli
+	do
+		rm -rf "${brotlidir}"
+		ln -sf "${wrksrc}/brotli-${_brotli_commit}" ${brotlidir}
+	done
+}
+
+do_build() {
+	cd "${wrksrc}/${pkgname}-${pkgname}-stable${version}"
+	_ovmf_common_flags="
+	 -n ${XBPS_MAKEJOBS}
+	 -b RELEASE
+	 -D NETWORK_IP6_ENABLE
+	 -D TPM2_ENABLE
+	"
+	_ovmf_x86_flags="
+	 ${_ovmf_common_flags}
+	 -D HTTP_BOOT_ENABLE
+	 -D TLS_ENABLE
+	 -D FD_SIZE_2MB
+	"
+	_ovmf_x86_sb_flags="
+	 ${_ovmf_x86_flags}
+	 -D SECURE_BOOT_ENABLE
+	 -D SMM_REQUIRE
+	 -D EXCLUDE_SHELL_FROM_FD
+	"
+	export HOST_ARCH=${_ovmf_host_arch}
+	export PATH="$(pwd)/BaseTools/BinWrappers/PosixLike/:$PATH"
+	export EDK_TOOLS_PATH="$(pwd)"/BaseTools
+	export PYTHON_COMMAND=python3
+	export WORKSPACE="$(pwd)"
+	export PACKAGES_PATH="$(pwd)"
+	bash -c ". ./edksetup.sh"
+	make -C BaseTools
+	if [ ${_ovmf_build_x64} ]; then
+		# x86_64, no secure boot, no smm
+		command build -t ${_toolchain_opt} \
+			-a X64 -p OvmfPkg/OvmfPkgX64.dsc ${_ovmf_x86_flags}
+		mv Build/OvmfX64{,NoSb}
+		# x86_64, secure boot, smm
+		command build -t ${_toolchain_opt} \
+			-a X64 -p OvmfPkg/OvmfPkgX64.dsc ${_ovmf_x86_sb_flags}
+	fi
+	# ia32, no secure boot, no smm
+	command build -t ${_toolchain_opt} \
+		-a IA32 -p OvmfPkg/OvmfPkgIa32.dsc ${_ovmf_x86_flags}
+	mv Build/OvmfIa32{,NoSb}
+	# ia32, secure boot, smm
+	command build -t ${_toolchain_opt} \
+		-a IA32 -p OvmfPkg/OvmfPkgIa32.dsc ${_ovmf_x86_sb_flags}
+}
+
+do_install() {
+	# development tools
+	cd "${wrksrc}/${pkgname}-${pkgname}-stable${version}"
+	for d in Conf Scripts Python; do
+		vmkdir /usr/share/${pkgname}/${d}
+	done
+	vmkdir /usr/lib/${pkgname}/bin
+	bins="BrotliCompress DevicePath EfiRom GenCrc32 GenFfs GenFv GenFw GenSec
+	 LzmaCompress Split TianoCompress VfrCompile VolInfo"
+	for bin in $bins; do
+		vinstall BaseTools/Source/C/bin/${bin} 755 /usr/lib/${pkgname}/bin
+	done
+	vinstall BaseTools/BinWrappers/PosixLike/LzmaF86Compress 755 \
+		/usr/lib/${pkgname}/bin
+	vinstall BaseTools/BuildEnv 755 /usr/share/${pkgname}
+	for f in build_rule tools_def target; do
+		vinstall BaseTools/Conf/${f}.template 644 /usr/share/${pkgname}/Conf
+	done
+	vinstall BaseTools/Scripts/GccBase.lds 644 /usr/share/${pkgname}/Scripts
+	mkdir PythonBins
+	python_dirs="BPDG CommonDataClass PatchPcdValue Rsa2048Sha256Sign
+	 Pkcs7Sign GenPatchPcdTable AutoGen GenFds Workspace Table Ecc Trim
+	 TargetTool build Capsule Eot Common UPT"
+	for d in ${python_dirs}; do
+		fulldir=BaseTools/Source/Python/${d}
+		vcopy ${fulldir} /usr/share/edk2/Python/
+		[ -f "${fulldir}/${d}.py" ] || continue
+		cat > PythonBins/${d}.py <<- EOF
+		#!/bin/sh
+		export PYTHONPATH=/usr/share/${pkgname}/Python
+		exec python /usr/share/${pkgname}/Python/${d}/${d}.py "\$@"
+		EOF
+		vinstall PythonBins/${d}.py 755 /usr/lib/${pkgname}/bin
+	done
+
+	# ovmf uefi firmware
+	x=OVMF_CODE
+	if [ ${_ovmf_build_x64} ]; then
+		for f in OVMF_{CODE,VARS}; do
+			vinstall Build/OvmfX64NoSb/RELEASE_${_toolchain_opt}/FV/${f}.fd \
+				644 /usr/share/edk2/ovmf/
+		done
+		vinstall Build/OvmfX64/RELEASE_${_toolchain_opt}/FV/${x}.fd \
+			644 /usr/share/edk2/ovmf ${x}.secboot.fd
+		# libvirt hardcodes this directory name if no json manifests are present.
+		# also provides backwards compatibility with VMs created before the
+		# json manifests system
+		vmkdir /usr/share/OVMF
+		for f in OVMF_{CODE{,.secboot},VARS}.fd; do
+			ln -sf ../edk2/ovmf/${f} "${DESTDIR}/usr/share/OVMF/"
+		done
+	fi
+	vinstall Build/OvmfIa32NoSb/RELEASE_${_toolchain_opt}/FV/${x}.fd \
+		644 /usr/share/edk2/ovmf-ia32/
+	vinstall Build/OvmfIa32/RELEASE_${_toolchain_opt}/FV/${x}.fd \
+		644 /usr/share/edk2/ovmf-ia32 ${x}.secboot.fd
+	for x in 50-edk2-ovmf-{ia32,x64}-sb.json 60-edk2-ovmf-{ia32,x64}.json; do
+		vinstall ${FILESDIR}/$x 644 /usr/share/qemu/firmware
+	done
+	vlicense OvmfPkg/License.txt
+}
+
+_ovmf_basedesc="Tianocore UEFI firmware for qemu"
+
+ovmf-ia32_package() {
+	short_desc="${_ovmf_basedesc} ia32"
+	pkg_install() {
+		vmove usr/share/edk2/ovmf-ia32
+		vmove usr/share/qemu/firmware/*edk2-ovmf-ia32*.json
+	}
+}
+
+if [ ${_ovmf_build_x64} ]; then
+	ovmf-x64_package() {
+		short_desc="${_ovmf_basedesc} x64"
+		pkg_install() {
+			vmove usr/share/edk2/ovmf
+			vmove usr/share/OVMF
+			vmove usr/share/qemu/firmware/*edk2-ovmf-x64*.json
+		}
+	}
+fi
diff --git a/srcpkgs/edk2/template.orig b/srcpkgs/edk2/template.orig
new file mode 100644
index 00000000000..0487bb7d340
--- /dev/null
+++ b/srcpkgs/edk2/template.orig
@@ -0,0 +1,175 @@
+# Template file for 'edk2'
+pkgname=edk2
+version=202005
+revision=1
+archs="x86_64* i686*"
+create_wrksrc=yes
+hostmakedepends="make python3 acpica-utils nasm libuuid-devel"
+short_desc="EFI Development Kit II"
+maintainer="Franc[e]sco <lolisamurai@tfwno.gf>"
+license="BSD-2-Clause-Patent, MIT, Apache-2.0"
+homepage="https://github.com/tianocore/edk2/tree/master/OvmfPkg"
+_openssl_ver=1.1.1d
+_brotli_commit=666c3280cc11dc433c303d79a83d4ffbdd12cc8d
+distfiles="https://github.com/tianocore/edk2/archive/${pkgname}-stable${version}.tar.gz
+ https://www.openssl.org/source/openssl-${_openssl_ver}.tar.gz
+ https://github.com/google/brotli/archive/${_brotli_commit}.tar.gz"
+checksum="373c3eff3497316a48fcf4be8dcee227431cbce86dcd80a004950e992f0297e2
+1e3a91bc1f9dfce01af26026f856e064eab4c8ee0a8f457b5ae30b40b8b711f2
+cd82ce69defa40e9e36443e59d90aa5f8c6013024fae6a2de8c31afc2c707065"
+_toolchain_opt=GCC5
+
+case ${XBPS_MACHINE} in
+	i686)
+		# edk2 doesn't find the correct host
+		# also, x64 can't be built on i686
+		_ovmf_host_arch=IA32
+		;;
+	*)
+		_ovmf_build_x64=yes
+esac
+
+post_extract() {
+	cd "${wrksrc}/${pkgname}-${pkgname}-stable${version}"
+	ssldir=CryptoPkg/Library/OpensslLib/openssl
+	rm -rf "${ssldir}"
+	ln -sf "${wrksrc}/openssl-${_openssl_ver}" ${ssldir}
+	# openssl 1.1.1d has a typo that causes a compile error
+	sed -i 's/return return/return/g' ${ssldir}/crypto/threads_none.c
+
+	for brotlidir in BaseTools/Source/C/BrotliCompress/brotli \
+		MdeModulePkg/Library/BrotliCustomDecompressLib/brotli
+	do
+		rm -rf "${brotlidir}"
+		ln -sf "${wrksrc}/brotli-${_brotli_commit}" ${brotlidir}
+	done
+}
+
+do_build() {
+	cd "${wrksrc}/${pkgname}-${pkgname}-stable${version}"
+	_ovmf_common_flags="
+	 -n ${XBPS_MAKEJOBS}
+	 -b RELEASE
+	 -D NETWORK_IP6_ENABLE
+	 -D TPM2_ENABLE
+	"
+	_ovmf_x86_flags="
+	 ${_ovmf_common_flags}
+	 -D HTTP_BOOT_ENABLE
+	 -D TLS_ENABLE
+	 -D FD_SIZE_2MB
+	"
+	_ovmf_x86_sb_flags="
+	 ${_ovmf_x86_flags}
+	 -D SECURE_BOOT_ENABLE
+	 -D SMM_REQUIRE
+	 -D EXCLUDE_SHELL_FROM_FD
+	"
+	export HOST_ARCH=${_ovmf_host_arch}
+	export PATH="$(pwd)/BaseTools/BinWrappers/PosixLike/:$PATH"
+	export EDK_TOOLS_PATH="$(pwd)"/BaseTools
+	export PYTHON_COMMAND=python3
+	export WORKSPACE="$(pwd)"
+	export PACKAGES_PATH="$(pwd)"
+	bash -c ". ./edksetup.sh"
+	make -C BaseTools
+	if [ ${_ovmf_build_x64} ]; then
+		# x86_64, no secure boot, no smm
+		command build -t ${_toolchain_opt} \
+			-a X64 -p OvmfPkg/OvmfPkgX64.dsc ${_ovmf_x86_flags}
+		mv Build/OvmfX64{,NoSb}
+		# x86_64, secure boot, smm
+		command build -t ${_toolchain_opt} \
+			-a X64 -p OvmfPkg/OvmfPkgX64.dsc ${_ovmf_x86_sb_flags}
+	fi
+	# ia32, no secure boot, no smm
+	command build -t ${_toolchain_opt} \
+		-a IA32 -p OvmfPkg/OvmfPkgIa32.dsc ${_ovmf_x86_flags}
+	mv Build/OvmfIa32{,NoSb}
+	# ia32, secure boot, smm
+	command build -t ${_toolchain_opt} \
+		-a IA32 -p OvmfPkg/OvmfPkgIa32.dsc ${_ovmf_x86_sb_flags}
+}
+
+do_install() {
+	# development tools
+	cd "${wrksrc}/${pkgname}-${pkgname}-stable${version}"
+	for d in Conf Scripts Python; do
+		vmkdir /usr/share/${pkgname}/${d}
+	done
+	vmkdir /usr/lib/${pkgname}/bin
+	bins="Brotli DevicePath EfiRom GenCrc32 GenFfs GenFv GenFw GenSec
+	 LzmaCompress Split TianoCompress VfrCompile VolInfo"
+	for bin in $bins; do
+		vinstall BaseTools/Source/C/bin/${bin} 755 /usr/lib/${pkgname}/bin
+	done
+	vinstall BaseTools/BinWrappers/PosixLike/LzmaF86Compress 755 \
+		/usr/lib/${pkgname}/bin
+	vinstall BaseTools/BuildEnv 755 /usr/share/${pkgname}
+	for f in build_rule tools_def target; do
+		vinstall BaseTools/Conf/${f}.template 644 /usr/share/${pkgname}/Conf
+	done
+	vinstall BaseTools/Scripts/GccBase.lds 644 /usr/share/${pkgname}/Scripts
+	mkdir PythonBins
+	python_dirs="BPDG CommonDataClass PatchPcdValue Rsa2048Sha256Sign
+	 Pkcs7Sign GenPatchPcdTable AutoGen GenFds Workspace Table Ecc Trim
+	 TargetTool build Capsule Eot Common UPT"
+	for d in ${python_dirs}; do
+		fulldir=BaseTools/Source/Python/${d}
+		vcopy ${fulldir} /usr/share/edk2/Python/
+		[ -f "${fulldir}/${d}.py" ] || continue
+		cat > PythonBins/${d}.py <<- EOF
+		#!/bin/sh
+		export PYTHONPATH=/usr/share/${pkgname}/Python
+		exec python /usr/share/${pkgname}/Python/${d}/${d}.py "\$@"
+		EOF
+		vinstall PythonBins/${d}.py 755 /usr/lib/${pkgname}/bin
+	done
+
+	# ovmf uefi firmware
+	x=OVMF_CODE
+	if [ ${_ovmf_build_x64} ]; then
+		for f in OVMF_{CODE,VARS}; do
+			vinstall Build/OvmfX64NoSb/RELEASE_${_toolchain_opt}/FV/${f}.fd \
+				644 /usr/share/edk2/ovmf/
+		done
+		vinstall Build/OvmfX64/RELEASE_${_toolchain_opt}/FV/${x}.fd \
+			644 /usr/share/edk2/ovmf ${x}.secboot.fd
+		# libvirt hardcodes this directory name if no json manifests are present.
+		# also provides backwards compatibility with VMs created before the
+		# json manifests system
+		vmkdir /usr/share/OVMF
+		for f in OVMF_{CODE{,.secboot},VARS}.fd; do
+			ln -sf ../edk2/ovmf/${f} "${DESTDIR}/usr/share/OVMF/"
+		done
+	fi
+	vinstall Build/OvmfIa32NoSb/RELEASE_${_toolchain_opt}/FV/${x}.fd \
+		644 /usr/share/edk2/ovmf-ia32/
+	vinstall Build/OvmfIa32/RELEASE_${_toolchain_opt}/FV/${x}.fd \
+		644 /usr/share/edk2/ovmf-ia32 ${x}.secboot.fd
+	for x in 50-edk2-ovmf-{ia32,x64}-sb.json 60-edk2-ovmf-{ia32,x64}.json; do
+		vinstall ${FILESDIR}/$x 644 /usr/share/qemu/firmware
+	done
+	vlicense OvmfPkg/License.txt
+}
+
+_ovmf_basedesc="Tianocore UEFI firmware for qemu"
+
+ovmf-ia32_package() {
+	short_desc="${_ovmf_basedesc} ia32"
+	pkg_install() {
+		vmove usr/share/edk2/ovmf-ia32
+		vmove usr/share/qemu/firmware/*edk2-ovmf-ia32*.json
+	}
+}
+
+if [ ${_ovmf_build_x64} ]; then
+	ovmf-x64_package() {
+		short_desc="${_ovmf_basedesc} x64"
+		pkg_install() {
+			vmove usr/share/edk2/ovmf
+			vmove usr/share/OVMF
+			vmove usr/share/qemu/firmware/*edk2-ovmf-x64*.json
+		}
+	}
+fi
diff --git a/srcpkgs/edk2/template.rej b/srcpkgs/edk2/template.rej
new file mode 100644
index 00000000000..f6baaa271dd
--- /dev/null
+++ b/srcpkgs/edk2/template.rej
@@ -0,0 +1,11 @@
+--- srcpkgs/edk2/template
++++ srcpkgs/edk2/template
+@@ -98,7 +98,7 @@ do_install() {
+                vmkdir /usr/share/${pkgname}/${d}
+        done
+        vmkdir /usr/lib/${pkgname}/bin
+-       bins="Brotli DevicePath EfiRom GenCrc32 GenFfs GenFv GenFw GenSec
++       bins="BrotliCompress DevicePath EfiRom GenCrc32 GenFfs GenFv GenFw GenSec
+         LzmaCompress Split TianoCompress VfrCompile VolInfo"
+        for bin in $bins; do
+                vinstall BaseTools/Source/C/bin/${bin} 755 /usr/lib/${pkgname}/bin``
diff --git a/srcpkgs/edk2/update b/srcpkgs/edk2/update
new file mode 100644
index 00000000000..551f406857f
--- /dev/null
+++ b/srcpkgs/edk2/update
@@ -0,0 +1,2 @@
+site="https://github.com/tianocore/edk2/tags"
+version="stable${version}"
diff --git a/srcpkgs/ovmf-ia32 b/srcpkgs/ovmf-ia32
new file mode 120000
index 00000000000..06c0198cb80
--- /dev/null
+++ b/srcpkgs/ovmf-ia32
@@ -0,0 +1 @@
+edk2
\ No newline at end of file
diff --git a/srcpkgs/ovmf-x64 b/srcpkgs/ovmf-x64
new file mode 120000
index 00000000000..06c0198cb80
--- /dev/null
+++ b/srcpkgs/ovmf-x64
@@ -0,0 +1 @@
+edk2
\ No newline at end of file

^ permalink raw reply	[flat|nested] 38+ messages in thread

end of thread, other threads:[~2023-06-14  9:44 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-26 17:59 [PR PATCH] New packages: {edk2,ovmf-*}-202011 Logarithmus
2021-02-26 18:01 ` [PR PATCH] [Updated] " Logarithmus
2021-02-26 18:12 ` ericonr
2021-02-26 18:13 ` [PR PATCH] [Updated] " Logarithmus
2021-03-24 21:43 ` Xlaits
2021-03-26 21:44 ` [PR PATCH] [Updated] " Logarithmus
2021-03-26 22:41 ` [PR PATCH] [Updated] New packages: {edk2,ovmf-*}-202102 Logarithmus
2021-03-26 22:44 ` Logarithmus
2021-03-26 22:46 ` [PR PATCH] [Updated] " Logarithmus
2021-03-27 13:09 ` Logarithmus
2021-03-29  4:38 ` Xlaits
2021-03-29  6:25 ` Logarithmus
2021-03-29  6:25 ` Logarithmus
2021-03-29 12:50 ` Xlaits
2021-04-10  1:44 ` noarchwastaken
2021-04-10  1:57 ` noarchwastaken
2021-05-10  7:27 ` eoli3n
2021-05-18 19:26 ` eoli3n
2021-05-31 21:12 ` NeonOverflow
2021-05-31 22:21 ` eoli3n
2021-06-03  0:37 ` NeonOverflow
2021-06-03  0:50 ` ericonr
2021-06-03  1:29 ` ahesford
2021-06-03  2:16 ` ericonr
2021-06-04  0:28 ` NeonOverflow
2021-06-04  0:37 ` ahesford
2021-06-04  1:03 ` NeonOverflow
2021-06-04  6:17 ` eoli3n
2021-06-04  6:17 ` eoli3n
2021-07-26 17:56 ` Matthew-Tate-Scarbrough
2021-08-26 19:52 ` RononDex
2022-01-10 15:14 ` wael444
2022-01-10 20:19 ` HadetTheUndying
2022-01-11 12:50 ` wael444
2022-01-11 13:15 ` ahesford
2022-01-11 13:15 ` [PR PATCH] [Closed]: " ahesford
2022-02-03  9:57 ` eoli3n
2023-06-14  9:44 ` junkminerman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).