summaryrefslogtreecommitdiffstats
path: root/OvmfPkg
diff options
context:
space:
mode:
authorMike Beaton <mjsbeaton@gmail.com>2024-08-24 09:18:10 +0100
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2024-09-12 21:34:33 +0000
commit14d7ae94bc1d3367703a674b862748cb117b71c8 (patch)
treeec127125853b6cb5ee95f256e22e062a7f39b236 /OvmfPkg
parentaf60615f0ef5f5d5ab3f9cea3215e07b8c73b600 (diff)
downloadedk2-14d7ae94bc1d3367703a674b862748cb117b71c8.tar.gz
edk2-14d7ae94bc1d3367703a674b862748cb117b71c8.tar.bz2
edk2-14d7ae94bc1d3367703a674b862748cb117b71c8.zip
OvmfPkg: Fix unable to build OVMF with -D NETWORK_ENABLE=0
https://bugzilla.tianocore.org/show_bug.cgi?id=4829 7f17a15 (2024/02/22) "OvmfPkg: Shell*.inc: allow building without network support" breaks building OVMF with `-D NETWORK_ENABLE=0`. Before this commit we could build OVMF e.g. with the following command in the OvmfPkg directory: ./build.sh -D NETWORK_ENABLE=0 After the commit the same command fails early with: /home/user/OpenSource/edk2/OvmfPkg/OvmfPkgX64.dsc(15): error F001: Pcd (gEfiNetworkPkgTokenSpaceGuid.PcdAllowHttpConnections) defined in DSC is not declared in DEC files referenced in INF files in FDF. Arch: ['X64'] The problem applies in Intel OvmfPkg platforms. Additionally, it applies in various other OvmfPkg platforms, but is masked buy another issue; namely that these platforms incorrectly still include some network packages when most are disabled. (A fix for that issue has previously been made, in OvmfPkg Intel platforms only, by d933ec1 followed by 7f17a15 .) This commit conditionally removes the undefined Pcd references in all OvmfPkg platforms which are now affected by this issue, and in all those which would be affected as and when the other issue mentioned above is fixed. Signed-off-by: Mike Beaton <mjsbeaton@gmail.com>
Diffstat (limited to 'OvmfPkg')
-rw-r--r--OvmfPkg/CloudHv/CloudHvX64.dsc2
-rw-r--r--OvmfPkg/LoongArchVirt/LoongArchVirtQemu.dsc2
-rw-r--r--OvmfPkg/Microvm/MicrovmX64.dsc2
-rw-r--r--OvmfPkg/OvmfPkgIa32.dsc2
-rw-r--r--OvmfPkg/OvmfPkgIa32X64.dsc2
-rw-r--r--OvmfPkg/OvmfPkgX64.dsc2
-rw-r--r--OvmfPkg/RiscVVirt/RiscVVirtQemu.dsc2
7 files changed, 14 insertions, 0 deletions
diff --git a/OvmfPkg/CloudHv/CloudHvX64.dsc b/OvmfPkg/CloudHv/CloudHvX64.dsc
index 0ad495545c..3dcefb1896 100644
--- a/OvmfPkg/CloudHv/CloudHvX64.dsc
+++ b/OvmfPkg/CloudHv/CloudHvX64.dsc
@@ -632,9 +632,11 @@
!include OvmfPkg/Include/Dsc/OvmfTpmPcds.dsc.inc
+!if $(NETWORK_ENABLE) == TRUE
# IPv4 and IPv6 PXE Boot support.
gEfiNetworkPkgTokenSpaceGuid.PcdIPv4PXESupport|0x01
gEfiNetworkPkgTokenSpaceGuid.PcdIPv6PXESupport|0x01
+!endif
# Set ConfidentialComputing defaults
gEfiMdePkgTokenSpaceGuid.PcdConfidentialComputingGuestAttr|0
diff --git a/OvmfPkg/LoongArchVirt/LoongArchVirtQemu.dsc b/OvmfPkg/LoongArchVirt/LoongArchVirtQemu.dsc
index 29c945b0ee..9064058bc5 100644
--- a/OvmfPkg/LoongArchVirt/LoongArchVirtQemu.dsc
+++ b/OvmfPkg/LoongArchVirt/LoongArchVirtQemu.dsc
@@ -417,8 +417,10 @@
#
# IPv4 and IPv6 PXE Boot support.
#
+!if $(NETWORK_ENABLE) == TRUE
gEfiNetworkPkgTokenSpaceGuid.PcdIPv4PXESupport | 0x01
gEfiNetworkPkgTokenSpaceGuid.PcdIPv6PXESupport | 0x01
+!endif
#
# SMBIOS entry point version
diff --git a/OvmfPkg/Microvm/MicrovmX64.dsc b/OvmfPkg/Microvm/MicrovmX64.dsc
index 3b2312ddbc..1196ba98c9 100644
--- a/OvmfPkg/Microvm/MicrovmX64.dsc
+++ b/OvmfPkg/Microvm/MicrovmX64.dsc
@@ -647,9 +647,11 @@
gEfiSecurityPkgTokenSpaceGuid.PcdOptionRomImageVerificationPolicy|0x00
+!if $(NETWORK_ENABLE) == TRUE
# IPv4 and IPv6 PXE Boot support.
gEfiNetworkPkgTokenSpaceGuid.PcdIPv4PXESupport|0x01
gEfiNetworkPkgTokenSpaceGuid.PcdIPv6PXESupport|0x01
+!endif
# Set ConfidentialComputing defaults
gEfiMdePkgTokenSpaceGuid.PcdConfidentialComputingGuestAttr|0
diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc
index 974ab62362..3f68d4d63b 100644
--- a/OvmfPkg/OvmfPkgIa32.dsc
+++ b/OvmfPkg/OvmfPkgIa32.dsc
@@ -658,9 +658,11 @@
!include OvmfPkg/Include/Dsc/OvmfTpmPcds.dsc.inc
+!if $(NETWORK_ENABLE) == TRUE
# IPv4 and IPv6 PXE Boot support.
gEfiNetworkPkgTokenSpaceGuid.PcdIPv4PXESupport|0x01
gEfiNetworkPkgTokenSpaceGuid.PcdIPv6PXESupport|0x01
+!endif
# Set ConfidentialComputing defaults
gEfiMdePkgTokenSpaceGuid.PcdConfidentialComputingGuestAttr|0
diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc
index c0e3210a83..67730b0f90 100644
--- a/OvmfPkg/OvmfPkgIa32X64.dsc
+++ b/OvmfPkg/OvmfPkgIa32X64.dsc
@@ -676,9 +676,11 @@
gEfiMdePkgTokenSpaceGuid.PcdFSBClock|1000000000
[PcdsDynamicDefault.X64]
+!if $(NETWORK_ENABLE) == TRUE
# IPv4 and IPv6 PXE Boot support.
gEfiNetworkPkgTokenSpaceGuid.PcdIPv4PXESupport|0x01
gEfiNetworkPkgTokenSpaceGuid.PcdIPv6PXESupport|0x01
+!endif
[PcdsDynamicHii]
!include OvmfPkg/Include/Dsc/OvmfTpmPcdsHii.dsc.inc
diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc
index efb0eedb04..f4ff2e321a 100644
--- a/OvmfPkg/OvmfPkgX64.dsc
+++ b/OvmfPkg/OvmfPkgX64.dsc
@@ -690,9 +690,11 @@
!include OvmfPkg/Include/Dsc/OvmfTpmPcds.dsc.inc
+!if $(NETWORK_ENABLE) == TRUE
# IPv4 and IPv6 PXE Boot support.
gEfiNetworkPkgTokenSpaceGuid.PcdIPv4PXESupport|0x01
gEfiNetworkPkgTokenSpaceGuid.PcdIPv6PXESupport|0x01
+!endif
# Set ConfidentialComputing defaults
gEfiMdePkgTokenSpaceGuid.PcdConfidentialComputingGuestAttr|0
diff --git a/OvmfPkg/RiscVVirt/RiscVVirtQemu.dsc b/OvmfPkg/RiscVVirt/RiscVVirtQemu.dsc
index e0ed6fb9bc..63d896587b 100644
--- a/OvmfPkg/RiscVVirt/RiscVVirtQemu.dsc
+++ b/OvmfPkg/RiscVVirt/RiscVVirtQemu.dsc
@@ -217,11 +217,13 @@
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase|0
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase|0
+!if $(NETWORK_ENABLE) == TRUE
#
# IPv4 and IPv6 PXE Boot support.
#
gEfiNetworkPkgTokenSpaceGuid.PcdIPv4PXESupport|0x01
gEfiNetworkPkgTokenSpaceGuid.PcdIPv6PXESupport|0x01
+!endif
#
# TPM2 support