]> xenbits.xensource.com Git - people/aperard/ovmf.git/commitdiff
NetworkPkg: Fix unable to build OVMF with -D NETWORK_ENABLE=0
authorMike Beaton <mjsbeaton@gmail.com>
Sat, 24 Aug 2024 08:13:37 +0000 (09:13 +0100)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Thu, 12 Sep 2024 21:34:33 +0000 (21:34 +0000)
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 <mjsbeaton@gmail.com>
NetworkPkg/NetworkPcds.dsc.inc

index f874b382efc37238e26283c1c508a93e1c8055f1..c6299ad6ed0fcdc06a04a521499f328bd381b44c 100644 (file)
@@ -11,6 +11,6 @@
 #\r
 ##\r
 \r
-!if $(NETWORK_ALLOW_HTTP_CONNECTIONS) == TRUE\r
+!if ($(NETWORK_ENABLE) == TRUE) AND ($(NETWORK_ALLOW_HTTP_CONNECTIONS) == TRUE)\r
   gEfiNetworkPkgTokenSpaceGuid.PcdAllowHttpConnections|TRUE\r
 !endif\r