From: Logarithmus <Logarithmus@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] New packages: {edk2,ovmf-*}-202102
Date: Fri, 26 Mar 2021 23:46:48 +0100 [thread overview]
Message-ID: <20210326224648.etIPzT3riLUs7P3y_ni4fn8nw0Y_XnQHXr6fReRx1Ac@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: 1255 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-*}-202102
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?
- [x] 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
#### Does it build and run successfully?
- [ ] I built this PR locally for my native architecture, (x86_64-musl)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
- [ ] x86_64
- [x] 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: 11742 bytes --]
From 93287abe2fdbba27a9f192884f1f7832863188b3 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-*}-202102
---
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 000000000000..df80f1ed5ecc
--- /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 000000000000..99345cac2aa5
--- /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 000000000000..d804b2ec7a51
--- /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 000000000000..355691bb5b5e
--- /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 000000000000..9ad4647074d3
--- /dev/null
+++ b/srcpkgs/edk2/template
@@ -0,0 +1,176 @@
+# Template file for 'edk2'
+pkgname=edk2
+version=202102
+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="268591f0db8fd1f8c977509e8ac37bd6090c8373bf63a9657c88bb27bb43a279
+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 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 000000000000..551f406857f5
--- /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 000000000000..06c0198cb809
--- /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 000000000000..06c0198cb809
--- /dev/null
+++ b/srcpkgs/ovmf-x64
@@ -0,0 +1 @@
+edk2
\ No newline at end of file
next prev parent reply other threads:[~2021-03-26 22:46 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Logarithmus [this message]
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
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=20210326224648.etIPzT3riLUs7P3y_ni4fn8nw0Y_XnQHXr6fReRx1Ac@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).