Github messages for voidlinux
 help / color / mirror / Atom feed
From: Logarithmus <Logarithmus@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] New packages: {edk2,ovmf-*}-202011
Date: Fri, 26 Feb 2021 19:13:53 +0100	[thread overview]
Message-ID: <20210226181353.YpLoMZj8cM0qBFWFlCAvwrvOFzLnLizeLEof2mIUNAw@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-29074@inbox.vuxu.org>

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

There is an updated 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]

Continues https://github.com/void-linux/void-packages/pull/17225
Closes https://github.com/void-linux/void-packages/issues/11243, https://github.com/void-linux/void-packages/issues/27229

<!-- 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):
  - [ ] x86_64
  - [ ] x86_64-musl
  - [ ] i686


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: 11738 bytes --]

From 6e61a06e5c36e3113967feae2bf3f2bd1e8a952d 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                        | 176 +++++++++++++++++++
 srcpkgs/edk2/update                          |   2 +
 srcpkgs/ovmf-ia32                            |   1 +
 srcpkgs/ovmf-x64                             |   1 +
 8 files changed, 316 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/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..5027680a0f0
--- /dev/null
+++ b/srcpkgs/edk2/template
@@ -0,0 +1,176 @@
+# 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"
+changelog="https://github.com/tianocore/edk2/releases"
+_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/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

  parent reply	other threads:[~2021-02-26 18:13 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-26 17:59 [PR PATCH] " Logarithmus
2021-02-26 18:01 ` [PR PATCH] [Updated] " Logarithmus
2021-02-26 18:12 ` ericonr
2021-02-26 18:13 ` Logarithmus [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210226181353.YpLoMZj8cM0qBFWFlCAvwrvOFzLnLizeLEof2mIUNAw@z \
    --to=logarithmus@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).