]> xenbits.xensource.com Git - people/aperard/ovmf.git/commitdiff
ArmVirtPkg: Fix unable to build with -D NETWORK_ENABLE=0
authorMike Beaton <mjsbeaton@gmail.com>
Sat, 24 Aug 2024 08:25:09 +0000 (09:25 +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 problem also applies in the ArmVirtPkg
platforms which are modified here, but is currently
masked by another issue, namely that these platforms
incorrectly still include some network packages when
most are disabled. (A fix for this was previously applied,
for OvmfPkg Intel platforms only, by
d933ec1 followed by
7f17a15 .)

This commit was created at the same time as the
commits resolving this issue in NetworkPkg and
OvmfPkg. It makes conditional the Pcd references
in ArmVirtPkg platforms which will become references to
undefined Pcds as and when the other issue mentioned
above is fixed.

Signed-off-by: Mike Beaton <mjsbeaton@gmail.com>
ArmVirtPkg/ArmVirtQemu.dsc
ArmVirtPkg/ArmVirtQemuKernel.dsc

index 56512594ad5987e23306184a0047294f7ae28883..6826edab93a3555bc09583794ffd0da55a3c8fa4 100644 (file)
   gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosDocRev|0x0\r
   gUefiOvmfPkgTokenSpaceGuid.PcdQemuSmbiosValidated|FALSE\r
 \r
+!if $(NETWORK_ENABLE) == TRUE\r
   #\r
   # IPv4 and IPv6 PXE Boot support.\r
   #\r
   gEfiNetworkPkgTokenSpaceGuid.PcdIPv4PXESupport|0x01\r
   gEfiNetworkPkgTokenSpaceGuid.PcdIPv6PXESupport|0x01\r
+!endif\r
 \r
   #\r
   # TPM2 support\r
index f4fb8ee69ee76e5cb2f93e5165734ba81bdf07f1..c5fdcfd9c72abab0026117efdc6c73bc48003569 100644 (file)
   gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosDocRev|0x0\r
   gUefiOvmfPkgTokenSpaceGuid.PcdQemuSmbiosValidated|FALSE\r
 \r
+!if $(NETWORK_ENABLE) == TRUE\r
   #\r
   # IPv4 and IPv6 PXE Boot support.\r
   #\r
   gEfiNetworkPkgTokenSpaceGuid.PcdIPv4PXESupport|0x01\r
   gEfiNetworkPkgTokenSpaceGuid.PcdIPv6PXESupport|0x01\r
+!endif\r
 \r
 ################################################################################\r
 #\r