From d933ec115bdf9be1d8dfe6a818414a14973cc0d3 Mon Sep 17 00:00:00 2001 From: Ard Biesheuvel Date: Tue, 6 Sep 2022 13:26:35 +0200 Subject: [PATCH] OvmfPkg: gather common NetworkComponents overrides in .dsc.inc file All QEMU based OVMF platforms override the same set of network components, to specify NULL library class resolutions that modify the behavior of those components in a QEMU specific way. Before adding more occurrences of that, let's drop those definitions in a common include file. Signed-off-by: Ard Biesheuvel Acked-by: Gerd Hoffmann --- OvmfPkg/CloudHv/CloudHvX64.dsc | 12 +----------- OvmfPkg/Microvm/MicrovmX64.dsc | 12 +----------- OvmfPkg/NetworkComponents.dsc.inc | 17 +++++++++++++++++ OvmfPkg/OvmfPkgIa32.dsc | 12 +----------- OvmfPkg/OvmfPkgIa32X64.dsc | 12 +----------- OvmfPkg/OvmfPkgX64.dsc | 12 +----------- 6 files changed, 22 insertions(+), 55 deletions(-) create mode 100644 OvmfPkg/NetworkComponents.dsc.inc diff --git a/OvmfPkg/CloudHv/CloudHvX64.dsc b/OvmfPkg/CloudHv/CloudHvX64.dsc index 0f0fc9a1de..10b16104ac 100644 --- a/OvmfPkg/CloudHv/CloudHvX64.dsc +++ b/OvmfPkg/CloudHv/CloudHvX64.dsc @@ -827,18 +827,8 @@ # Network Support # !include NetworkPkg/NetworkComponents.dsc.inc +!include OvmfPkg/NetworkComponents.dsc.inc - NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf { - - NULL|OvmfPkg/Library/PxeBcPcdProducerLib/PxeBcPcdProducerLib.inf - } - -!if $(NETWORK_TLS_ENABLE) == TRUE - NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf { - - NULL|OvmfPkg/Library/TlsAuthConfigLib/TlsAuthConfigLib.inf - } -!endif OvmfPkg/VirtioNetDxe/VirtioNet.inf !if $(TOOL_CHAIN_TAG) != "XCODE5" diff --git a/OvmfPkg/Microvm/MicrovmX64.dsc b/OvmfPkg/Microvm/MicrovmX64.dsc index 52498bbe90..33d68a5493 100644 --- a/OvmfPkg/Microvm/MicrovmX64.dsc +++ b/OvmfPkg/Microvm/MicrovmX64.dsc @@ -793,18 +793,8 @@ # Network Support # !include NetworkPkg/NetworkComponents.dsc.inc +!include OvmfPkg/NetworkComponents.dsc.inc - NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf { - - NULL|OvmfPkg/Library/PxeBcPcdProducerLib/PxeBcPcdProducerLib.inf - } - -!if $(NETWORK_TLS_ENABLE) == TRUE - NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf { - - NULL|OvmfPkg/Library/TlsAuthConfigLib/TlsAuthConfigLib.inf - } -!endif OvmfPkg/VirtioNetDxe/VirtioNet.inf # diff --git a/OvmfPkg/NetworkComponents.dsc.inc b/OvmfPkg/NetworkComponents.dsc.inc new file mode 100644 index 0000000000..85a1653916 --- /dev/null +++ b/OvmfPkg/NetworkComponents.dsc.inc @@ -0,0 +1,17 @@ +## +# SPDX-License-Identifier: BSD-2-Clause-Patent +## + +!if $(NETWORK_ENABLE) == TRUE + NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf { + + NULL|OvmfPkg/Library/PxeBcPcdProducerLib/PxeBcPcdProducerLib.inf + } + + !if $(NETWORK_TLS_ENABLE) == TRUE + NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf { + + NULL|OvmfPkg/Library/TlsAuthConfigLib/TlsAuthConfigLib.inf + } + !endif +!endif diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc index 985e34b2ca..e9ba491237 100644 --- a/OvmfPkg/OvmfPkgIa32.dsc +++ b/OvmfPkg/OvmfPkgIa32.dsc @@ -879,18 +879,8 @@ # Network Support # !include NetworkPkg/NetworkComponents.dsc.inc +!include OvmfPkg/NetworkComponents.dsc.inc - NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf { - - NULL|OvmfPkg/Library/PxeBcPcdProducerLib/PxeBcPcdProducerLib.inf - } - -!if $(NETWORK_TLS_ENABLE) == TRUE - NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf { - - NULL|OvmfPkg/Library/TlsAuthConfigLib/TlsAuthConfigLib.inf - } -!endif OvmfPkg/VirtioNetDxe/VirtioNet.inf # diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc index aa7eb4d79d..af566b953f 100644 --- a/OvmfPkg/OvmfPkgIa32X64.dsc +++ b/OvmfPkg/OvmfPkgIa32X64.dsc @@ -893,18 +893,8 @@ # Network Support # !include NetworkPkg/NetworkComponents.dsc.inc +!include OvmfPkg/NetworkComponents.dsc.inc - NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf { - - NULL|OvmfPkg/Library/PxeBcPcdProducerLib/PxeBcPcdProducerLib.inf - } - -!if $(NETWORK_TLS_ENABLE) == TRUE - NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf { - - NULL|OvmfPkg/Library/TlsAuthConfigLib/TlsAuthConfigLib.inf - } -!endif OvmfPkg/VirtioNetDxe/VirtioNet.inf # diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc index 493db7be11..f39d9cd117 100644 --- a/OvmfPkg/OvmfPkgX64.dsc +++ b/OvmfPkg/OvmfPkgX64.dsc @@ -961,18 +961,8 @@ # Network Support # !include NetworkPkg/NetworkComponents.dsc.inc +!include OvmfPkg/NetworkComponents.dsc.inc - NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf { - - NULL|OvmfPkg/Library/PxeBcPcdProducerLib/PxeBcPcdProducerLib.inf - } - -!if $(NETWORK_TLS_ENABLE) == TRUE - NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf { - - NULL|OvmfPkg/Library/TlsAuthConfigLib/TlsAuthConfigLib.inf - } -!endif OvmfPkg/VirtioNetDxe/VirtioNet.inf #