Platform DSC can include Network.dsc.inc to enable network features.
Signed-off-by: Liming Gao <liming.gao@intel.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
---
NetworkPkg/Network.dsc.inc | 40 ++++++++++++++++++++++++++++++++++++++++
NetworkPkg/NetworkPkg.dsc | 22 +---------------------
2 files changed, 41 insertions(+), 21 deletions(-)
create mode 100644 NetworkPkg/Network.dsc.inc
diff --git a/NetworkPkg/Network.dsc.inc b/NetworkPkg/Network.dsc.inc
new file mode 100644
index 0000000000..c7f43282e4
--- /dev/null
+++ b/NetworkPkg/Network.dsc.inc
@@ -0,0 +1,40 @@
+## @file
+# Network DSC include file for Platform DSC
+#
+# This file includes all required information to enable Network features.
+# It can be included to a platform DSC file by using "!include NetworkPkg/Network.dsc.inc".
+#
+# This file defines one build flag PLATFORMX64_ENABLE to support
+# IA32 PEI and X64 DXE platform. Its default value is FALSE.
+#
+# Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
+#
+# SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+##
+
+[Defines]
+!include NetworkPkg/NetworkDefines.dsc.inc
+
+!ifndef PLATFORMX64_ENABLE
+ #
+ # PLATFORMX64_ENABLE is set to TRUE when PEI is IA32 and DXE is X64 platform
+ #
+ DEFINE PLATFORMX64_ENABLE = FALSE
+!endif
+
+[PcdsFixedAtBuild]
+!include NetworkPkg/NetworkPcds.dsc.inc
+
+[LibraryClasses]
+!include NetworkPkg/NetworkLibs.dsc.inc
+
+!if $(PLATFORMX64_ENABLE) == TRUE
+[Components.X64]
+!include NetworkPkg/NetworkComponents.dsc.inc
+
+!else
+[Components.IA32, Components.X64, Components.ARM, Components.AARCH64]
+!include NetworkPkg/NetworkComponents.dsc.inc
+
+!endif
diff --git a/NetworkPkg/NetworkPkg.dsc b/NetworkPkg/NetworkPkg.dsc
index be9d9248e4..fe2fcf7b3c 100644
--- a/NetworkPkg/NetworkPkg.dsc
+++ b/NetworkPkg/NetworkPkg.dsc
@@ -41,12 +41,6 @@
DxeServicesTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf
SafeIntLib|MdePkg/Library/BaseSafeIntLib/BaseSafeIntLib.inf
- DpcLib|MdeModulePkg/Library/DxeDpcLib/DxeDpcLib.inf
- NetLib|MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf
- IpIoLib|MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.inf
- UdpIoLib|MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.inf
- TcpIoLib|MdeModulePkg/Library/DxeTcpIoLib/DxeTcpIoLib.inf
- HttpLib|MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.inf
BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf
IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf
@@ -103,24 +97,10 @@
###################################################################################################
[Components]
- NetworkPkg/Ip6Dxe/Ip6Dxe.inf
- NetworkPkg/TcpDxe/TcpDxe.inf
- NetworkPkg/Udp6Dxe/Udp6Dxe.inf
- NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf
- NetworkPkg/Mtftp6Dxe/Mtftp6Dxe.inf
- NetworkPkg/DnsDxe/DnsDxe.inf
- NetworkPkg/HttpDxe/HttpDxe.inf
- NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesDxe.inf
- NetworkPkg/HttpBootDxe/HttpBootDxe.inf
NetworkPkg/WifiConnectionManagerDxe/WifiConnectionManagerDxe.inf
-
NetworkPkg/Application/VConfig/VConfig.inf
-[Components.IA32, Components.X64, Components.ARM, Components.AARCH64]
- NetworkPkg/IScsiDxe/IScsiDxe.inf
- NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
- NetworkPkg/TlsDxe/TlsDxe.inf
- NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf
+ !include NetworkPkg/Network.dsc.inc
[BuildOptions]
*_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES
--
2.13.0.windows.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#40115): https://edk2.groups.io/g/devel/message/40115
Mute This Topic: https://groups.io/mt/31532469/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Reviewed-by: Siyuan Fu <siyuan.fu@intel.com> > -----Original Message----- > From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of Liming > Gao > Sent: Tuesday, May 7, 2019 10:27 PM > To: devel@edk2.groups.io > Subject: [edk2-devel] [Patch v5 3/3] NetworkPkg: Add package level include DSC > file > > Platform DSC can include Network.dsc.inc to enable network features. > > Signed-off-by: Liming Gao <liming.gao@intel.com> > Acked-by: Laszlo Ersek <lersek@redhat.com> > --- > NetworkPkg/Network.dsc.inc | 40 ++++++++++++++++++++++++++++++++++++++++ > NetworkPkg/NetworkPkg.dsc | 22 +--------------------- > 2 files changed, 41 insertions(+), 21 deletions(-) > create mode 100644 NetworkPkg/Network.dsc.inc > > diff --git a/NetworkPkg/Network.dsc.inc b/NetworkPkg/Network.dsc.inc > new file mode 100644 > index 0000000000..c7f43282e4 > --- /dev/null > +++ b/NetworkPkg/Network.dsc.inc > @@ -0,0 +1,40 @@ > +## @file > +# Network DSC include file for Platform DSC > +# > +# This file includes all required information to enable Network features. > +# It can be included to a platform DSC file by using "!include > NetworkPkg/Network.dsc.inc". > +# > +# This file defines one build flag PLATFORMX64_ENABLE to support > +# IA32 PEI and X64 DXE platform. Its default value is FALSE. > +# > +# Copyright (c) 2019, Intel Corporation. All rights reserved.<BR> > +# > +# SPDX-License-Identifier: BSD-2-Clause-Patent > +# > +## > + > +[Defines] > +!include NetworkPkg/NetworkDefines.dsc.inc > + > +!ifndef PLATFORMX64_ENABLE > + # > + # PLATFORMX64_ENABLE is set to TRUE when PEI is IA32 and DXE is X64 > platform > + # > + DEFINE PLATFORMX64_ENABLE = FALSE > +!endif > + > +[PcdsFixedAtBuild] > +!include NetworkPkg/NetworkPcds.dsc.inc > + > +[LibraryClasses] > +!include NetworkPkg/NetworkLibs.dsc.inc > + > +!if $(PLATFORMX64_ENABLE) == TRUE > +[Components.X64] > +!include NetworkPkg/NetworkComponents.dsc.inc > + > +!else > +[Components.IA32, Components.X64, Components.ARM, Components.AARCH64] > +!include NetworkPkg/NetworkComponents.dsc.inc > + > +!endif > diff --git a/NetworkPkg/NetworkPkg.dsc b/NetworkPkg/NetworkPkg.dsc > index be9d9248e4..fe2fcf7b3c 100644 > --- a/NetworkPkg/NetworkPkg.dsc > +++ b/NetworkPkg/NetworkPkg.dsc > @@ -41,12 +41,6 @@ > > DxeServicesTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf > SafeIntLib|MdePkg/Library/BaseSafeIntLib/BaseSafeIntLib.inf > > - DpcLib|MdeModulePkg/Library/DxeDpcLib/DxeDpcLib.inf > - NetLib|MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf > - IpIoLib|MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.inf > - UdpIoLib|MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.inf > - TcpIoLib|MdeModulePkg/Library/DxeTcpIoLib/DxeTcpIoLib.inf > - HttpLib|MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.inf > BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf > OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf > IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf > @@ -103,24 +97,10 @@ > > ############################################################################## > ##################### > > [Components] > - NetworkPkg/Ip6Dxe/Ip6Dxe.inf > - NetworkPkg/TcpDxe/TcpDxe.inf > - NetworkPkg/Udp6Dxe/Udp6Dxe.inf > - NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf > - NetworkPkg/Mtftp6Dxe/Mtftp6Dxe.inf > - NetworkPkg/DnsDxe/DnsDxe.inf > - NetworkPkg/HttpDxe/HttpDxe.inf > - NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesDxe.inf > - NetworkPkg/HttpBootDxe/HttpBootDxe.inf > NetworkPkg/WifiConnectionManagerDxe/WifiConnectionManagerDxe.inf > - > NetworkPkg/Application/VConfig/VConfig.inf > > -[Components.IA32, Components.X64, Components.ARM, Components.AARCH64] > - NetworkPkg/IScsiDxe/IScsiDxe.inf > - NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf > - NetworkPkg/TlsDxe/TlsDxe.inf > - NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf > + !include NetworkPkg/Network.dsc.inc > > [BuildOptions] > *_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES > -- > 2.13.0.windows.1 > > > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#40118): https://edk2.groups.io/g/devel/message/40118 Mute This Topic: https://groups.io/mt/31532469/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
© 2016 - 2026 Red Hat, Inc.