From af60615f0ef5f5d5ab3f9cea3215e07b8c73b600 Mon Sep 17 00:00:00 2001 From: Mike Beaton Date: Sat, 24 Aug 2024 09:13:37 +0100 Subject: NetworkPkg: 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'] This commit conditionally removes the undefined Pcd reference in NetworkPkg which is part of this issue. Similar changes are needed in separate commits for OvmfPkg (and for ArmVirtPkg, since the issue also exists there, although masked by another issue). Signed-off-by: Mike Beaton --- NetworkPkg/NetworkPcds.dsc.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'NetworkPkg') diff --git a/NetworkPkg/NetworkPcds.dsc.inc b/NetworkPkg/NetworkPcds.dsc.inc index f874b382ef..c6299ad6ed 100644 --- a/NetworkPkg/NetworkPcds.dsc.inc +++ b/NetworkPkg/NetworkPcds.dsc.inc @@ -11,6 +11,6 @@ # ## -!if $(NETWORK_ALLOW_HTTP_CONNECTIONS) == TRUE +!if ($(NETWORK_ENABLE) == TRUE) AND ($(NETWORK_ALLOW_HTTP_CONNECTIONS) == TRUE) gEfiNetworkPkgTokenSpaceGuid.PcdAllowHttpConnections|TRUE !endif -- cgit v1.2.3