git: 0e7554170abd - main - sysutils/edk2: fix network boot on bhyve
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 16 Sep 2026 19:46:46 UTC
The branch main has been updated by olivier:
URL: https://cgit.FreeBSD.org/ports/commit/?id=0e7554170abd6ba58371278c860bf68aa388b5a7
commit 0e7554170abd6ba58371278c860bf68aa388b5a7
Author: Olivier Cochard <olivier@FreeBSD.org>
AuthorDate: 2026-09-16 19:27:28 +0000
Commit: Olivier Cochard <olivier@FreeBSD.org>
CommitDate: 2026-09-16 19:42:55 +0000
sysutils/edk2: fix network boot on bhyve
NetworkPkg's DxeNetLib needs EFI_RNG_PROTOCOL, and the Bhyve build's
only producer is VirtioRngDxe, which never binds since bhyve has no
virtio-rng device. RngDxe uses RDRAND instead and needs no device.
TcpDxe depexes gEfiHash2ServiceBindingProtocolGuid, so add
Hash2DxeCrypto too; without TcpDxe there is no HttpServiceBinding.
Also enable HTTP boot.
This recommits 3fcead9dc69a ("sysutils/edk2: fix network boot on bhyve"),
which also contained three unrelated patch files.
PR: 298499
Approved by: manu
Sponsored by: Netflix
---
sysutils/edk2/Makefile | 2 +-
.../edk2/files/patch-OvmfPkg_Bhyve_BhyveX64.dsc | 34 ++++++++++++++++++++++
.../edk2/files/patch-OvmfPkg_Bhyve_BhyveX64.fdf | 21 +++++++++++++
3 files changed, 56 insertions(+), 1 deletion(-)
diff --git a/sysutils/edk2/Makefile b/sysutils/edk2/Makefile
index 55e051f2f218..05bec1f35924 100644
--- a/sysutils/edk2/Makefile
+++ b/sysutils/edk2/Makefile
@@ -1,6 +1,6 @@
PORTNAME= edk2
PORTVERSION= g202508
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= sysutils
PATCH_SITES= https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/
diff --git a/sysutils/edk2/files/patch-OvmfPkg_Bhyve_BhyveX64.dsc b/sysutils/edk2/files/patch-OvmfPkg_Bhyve_BhyveX64.dsc
new file mode 100644
index 000000000000..f1b2994f0111
--- /dev/null
+++ b/sysutils/edk2/files/patch-OvmfPkg_Bhyve_BhyveX64.dsc
@@ -0,0 +1,34 @@
+--- OvmfPkg/Bhyve/BhyveX64.dsc.orig 2025-08-12 17:42:44 UTC
++++ OvmfPkg/Bhyve/BhyveX64.dsc
+@@ -43,8 +43,8 @@
+ # Network definition
+ #
+ DEFINE NETWORK_TLS_ENABLE = FALSE
+- DEFINE NETWORK_IP6_ENABLE = FALSE
+- DEFINE NETWORK_HTTP_BOOT_ENABLE = FALSE
++ DEFINE NETWORK_IP6_ENABLE = TRUE
++ DEFINE NETWORK_HTTP_BOOT_ENABLE = TRUE
+ DEFINE NETWORK_ALLOW_HTTP_CONNECTIONS = TRUE
+ DEFINE NETWORK_ISCSI_ENABLE = TRUE
+
+@@ -745,6 +745,20 @@
+ MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveStateDxe.inf
+ MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/BootScriptExecutorDxe.inf
+ MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf
++
++ #
++ # EFI_RNG_PROTOCOL producer: the NetworkPkg drivers all carry a
++ # gEfiRngProtocolGuid depex, and bhyve has no virtio-rng device for
++ # VirtioRngDxe to bind to, so without this they never dispatch.
++ #
++ SecurityPkg/RandomNumberGenerator/RngDxe/RngDxe.inf
++
++ #
++ # EFI_HASH2_SERVICE_BINDING_PROTOCOL producer: TcpDxe depends on it,
++ # and without TcpDxe there is no HttpServiceBinding, so HttpBootDxe
++ # never binds. OvmfPkgX64.dsc includes this; the Bhyve DSC omitted it.
++ #
++ SecurityPkg/Hash2DxeCrypto/Hash2DxeCrypto.inf
+
+ #
+ # Network Support
diff --git a/sysutils/edk2/files/patch-OvmfPkg_Bhyve_BhyveX64.fdf b/sysutils/edk2/files/patch-OvmfPkg_Bhyve_BhyveX64.fdf
new file mode 100644
index 000000000000..315f105e7542
--- /dev/null
+++ b/sysutils/edk2/files/patch-OvmfPkg_Bhyve_BhyveX64.fdf
@@ -0,0 +1,21 @@
+--- OvmfPkg/Bhyve/BhyveX64.fdf.orig 2025-08-12 17:42:44 UTC
++++ OvmfPkg/Bhyve/BhyveX64.fdf
+@@ -274,6 +274,18 @@ INF MdeModulePkg/Logo/LogoDxe.inf
+ INF MdeModulePkg/Logo/LogoDxe.inf
+
+ #
++# Protocol producers the NetworkPkg drivers depend on, both absent from
++# the stock Bhyve build:
++# - RngDxe: every NetworkPkg depex requires gEfiRngProtocolGuid, and
++# bhyve has no virtio-rng device for VirtioRngDxe to bind to.
++# - Hash2DxeCrypto: TcpDxe requires gEfiHash2ServiceBindingProtocolGuid;
++# without TcpDxe there is no HttpServiceBinding and HttpBootDxe never
++# binds. OvmfPkgX64 ships both; the Bhyve platform omitted them.
++#
++INF SecurityPkg/RandomNumberGenerator/RngDxe/RngDxe.inf
++INF SecurityPkg/Hash2DxeCrypto/Hash2DxeCrypto.inf
++
++#
+ # Network modules
+ #
+ !if $(E1000_ENABLE)