From e50f65628e69c08bdeaad71d5f129b7fa0801669 Mon Sep 17 00:00:00 2001 From: Alexander Goncharov Date: Wed, 7 Aug 2024 22:13:27 +0300 Subject: [PATCH] OvmfPkg: fix building without network support for X64 QEMU When NETWORK_ENABLE is set to FALSE, the compiler blames PCDs from gEfiNetworkPkgTokenSpaceGuid. To overcome this error, we need to add an extra conditional. NETWORK_IP4_ENABLE and NETWORK_IP6_ENABLE are not used because PXEv4 / PXEv6 boot support can be controlled from the QEMU command line. Tested on QEMU 9.0.2 with NETWORK_ENABLE=FALSE and NETWORK_ENABLE=TRUE builds. Cc: Ard Biesheuvel Cc: Jiewen Yao Cc: Gerd Hoffmann Cc: Saloni Kasbekar Cc: Zachary Clark-williams Signed-off-by: Alexander Goncharov --- OvmfPkg/OvmfPkgX64.dsc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc index efb0eedb04595..399c777adee03 100644 --- a/OvmfPkg/OvmfPkgX64.dsc +++ b/OvmfPkg/OvmfPkgX64.dsc @@ -691,8 +691,10 @@ !include OvmfPkg/Include/Dsc/OvmfTpmPcds.dsc.inc # IPv4 and IPv6 PXE Boot support. +!if $(NETWORK_ENABLE) == TRUE gEfiNetworkPkgTokenSpaceGuid.PcdIPv4PXESupport|0x01 gEfiNetworkPkgTokenSpaceGuid.PcdIPv6PXESupport|0x01 +!endif # Set ConfidentialComputing defaults gEfiMdePkgTokenSpaceGuid.PcdConfidentialComputingGuestAttr|0