public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Fu Siyuan <siyuan.fu@intel.com>
To: edk2-devel@lists.01.org
Cc: Ruiyu Ni <ruiyu.ni@intel.com>, Hao Wu <hao.a.wu@intel.com>
Subject: [PATCH v2 2/6] Nt32Pkg: Update DSC/FDF to use NetworkPkg's include fragment file.
Date: Thu, 22 Nov 2018 13:21:48 +0800	[thread overview]
Message-ID: <20181122052153.89464-3-siyuan.fu@intel.com> (raw)
In-Reply-To: <20181122052153.89464-1-siyuan.fu@intel.com>

This patch updates the platform DSC/FDF files to use the include fragment
files provided by NetworkPkg.
The feature enabling flags in [Defines] section have be updated to use the
NetworkPkg's terms, and the value have been overridden with the original
default value on this platform.

Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Hao Wu <hao.a.wu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
---

Notes:
    v2:
    Change the !if reference of TLS_ENABLE to NETWORK_TLS_ENABLE for OpensslLib.

 Nt32Pkg/Nt32Pkg.dsc | 104 ++++++--------------
 Nt32Pkg/Nt32Pkg.fdf |  27 +----
 2 files changed, 31 insertions(+), 100 deletions(-)

diff --git a/Nt32Pkg/Nt32Pkg.dsc b/Nt32Pkg/Nt32Pkg.dsc
index 4dbde0cc45b6..06d6407d593c 100644
--- a/Nt32Pkg/Nt32Pkg.dsc
+++ b/Nt32Pkg/Nt32Pkg.dsc
@@ -44,39 +44,20 @@ [Defines]
   # Defines for default states.  These can be changed on the command line.
   # -D FLAG=VALUE
   #
-  # Note: Secure Boot feature highly depends on the OpenSSL building. To enable this 
-  #       feature, please follow the instructions found in the file "Patch-HOWTO.txt" 
+  # Note: Secure Boot feature highly depends on the OpenSSL building. To enable this
+  #       feature, please follow the instructions found in the file "Patch-HOWTO.txt"
   #       located in CryptoPkg\Library\OpensslLib to enable the OpenSSL building first.
   #
   DEFINE SECURE_BOOT_ENABLE      = FALSE
-  
-  #
-  # This flag is to enable or disable TLS feature.  
-  # These can be changed on the command line.
-  # -D FLAG=VALUE
-  #
-  # Note: TLS feature highly depends on the OpenSSL building. To enable this 
-  #       feature, please follow the instructions found in the file "Patch-HOWTO.txt" 
-  #       located in CryptoPkg\Library\OpensslLib to enable the OpenSSL building first.
-  #
-  DEFINE TLS_ENABLE = FALSE
-  
-  #
-  # Indicates whether HTTP connections (i.e., unsecured) are permitted or not.
-  # -D FLAG=VALUE
-  #
-  # Note: If ALLOW_HTTP_CONNECTIONS is TRUE, HTTP connections are allowed. Both 
-  #       the "https://" and "http://" URI schemes are permitted. Otherwise, HTTP 
-  #       connections are denied. Only the "https://" URI scheme is permitted.
-  #
-  DEFINE ALLOW_HTTP_CONNECTIONS = TRUE
 
   #
-  # This flag is to enable or disable IPv6 network stack.
-  # These can be changed on the command line.
-  # -D FLAG=VALUE
+  # SnpNt32Dxe.inf will be used.
   #
-  DEFINE NETWORK_IP6_ENABLE = FALSE
+  DEFINE NETWORK_SNP_ENABLE             = FALSE
+  DEFINE NETWORK_IP6_ENABLE             = FALSE
+  DEFINE NETWORK_TLS_ENABLE             = FALSE
+  DEFINE NETWORK_ALLOW_HTTP_CONNECTIONS = TRUE
+!include NetworkPkg/NetworkDefines.dsc.inc
 
 ################################################################################
 #
@@ -133,18 +114,12 @@ [LibraryClasses]
   DxeServicesTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf
   UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf
   FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf
-  
+
   #
   # Generic Modules
   #
   UefiUsbLib|MdePkg/Library/UefiUsbLib/UefiUsbLib.inf
   UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.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
-  DpcLib|MdeModulePkg/Library/DxeDpcLib/DxeDpcLib.inf
   OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.inf
   GenericBdsLib|IntelFrameworkModulePkg/Library/GenericBdsLib/GenericBdsLib.inf
   CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf
@@ -153,6 +128,12 @@ [LibraryClasses]
   SerialPortLib|MdePkg/Library/BaseSerialPortLibNull/BaseSerialPortLibNull.inf
   CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf
   BootLogoLib|MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf
+
+  #
+  # Network libraries
+  #
+!include NetworkPkg/NetworkLibs.dsc.inc
+
   #
   # Platform
   #
@@ -168,12 +149,12 @@ [LibraryClasses]
   LockBoxLib|MdeModulePkg/Library/LockBoxNullLib/LockBoxNullLib.inf
   IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf
   ResetSystemLib|Nt32Pkg/Library/ResetSystemLib/ResetSystemLib.inf
-!if $(TLS_ENABLE) == TRUE
+!if $(NETWORK_TLS_ENABLE) == TRUE
   OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf
 !else
   OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf
 !endif
-  
+
 !if $(SECURE_BOOT_ENABLE) == TRUE
   PlatformSecureLib|Nt32Pkg/Library/PlatformSecureLib/PlatformSecureLib.inf
   TpmMeasurementLib|SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasurementLib.inf
@@ -245,7 +226,7 @@ [LibraryClasses.common.UEFI_DRIVER]
 [LibraryClasses.common.UEFI_APPLICATION]
   PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
   PrintLib|MdeModulePkg/Library/DxePrintLibPrint2Protocol/DxePrintLibPrint2Protocol.inf
-  
+
 [LibraryClasses.common.DXE_RUNTIME_DRIVER]
   #
   # Runtime
@@ -276,10 +257,10 @@ [PcdsFixedAtBuild]
   gEfiMdeModulePkgTokenSpaceGuid.PcdResetOnMemoryTypeInformationChange|FALSE
   gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x2000
 
-!if $(ALLOW_HTTP_CONNECTIONS) == TRUE
-  gEfiNetworkPkgTokenSpaceGuid.PcdAllowHttpConnections|TRUE
-!endif
-
+  #
+  # Network Pcds
+  #
+!include NetworkPkg/NetworkPcds.dsc.inc
 
 !if $(SECURE_BOOT_ENABLE) == TRUE
   # override the default values from SecurityPkg to ensure images from all sources are verified in secure boot
@@ -287,7 +268,7 @@ [PcdsFixedAtBuild]
   gEfiSecurityPkgTokenSpaceGuid.PcdFixedMediaImageVerificationPolicy|0x04
   gEfiSecurityPkgTokenSpaceGuid.PcdRemovableMediaImageVerificationPolicy|0x04
 !endif
-                        
+
   gEfiMdeModulePkgTokenSpaceGuid.PcdBootManagerMenuFile|{ 0x21, 0xaa, 0x2c, 0x46, 0x14, 0x76, 0x03, 0x45, 0x83, 0x6e, 0x8a, 0xb6, 0xf4, 0x66, 0x23, 0x31 }
 
 
@@ -362,7 +343,7 @@ [Components]
   Nt32Pkg/BootModePei/BootModePei.inf
   Nt32Pkg/StallPei/StallPei.inf
   Nt32Pkg/WinNtFlashMapPei/WinNtFlashMapPei.inf
-  
+
   MdeModulePkg/Universal/FaultTolerantWritePei/FaultTolerantWritePei.inf
   MdeModulePkg/Universal/Variable/Pei/VariablePei.inf
 
@@ -394,7 +375,7 @@ [Components]
     <LibraryClasses>
 !if $(SECURE_BOOT_ENABLE) == TRUE
       NULL|SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.inf
-!endif 
+!endif
   }
   MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf
   MdeModulePkg/Universal/EbcDxe/EbcDxe.inf
@@ -457,35 +438,8 @@ [Components]
   # Network stack drivers
   # To test network drivers, need network Io driver(SnpNt32Io.dll), please refer to NETWORK-IO Subproject.
   #
-  MdeModulePkg/Universal/Network/DpcDxe/DpcDxe.inf
-  MdeModulePkg/Universal/Network/ArpDxe/ArpDxe.inf
-  MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf
-  MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf
-  MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf
-  MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf
-  MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
-  MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
-  NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
-  NetworkPkg/TcpDxe/TcpDxe.inf
-  NetworkPkg/IScsiDxe/IScsiDxe.inf
   Nt32Pkg/SnpNt32Dxe/SnpNt32Dxe.inf
-
-!if $(NETWORK_IP6_ENABLE) == TRUE
-  NetworkPkg/Ip6Dxe/Ip6Dxe.inf
-  NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf
-  NetworkPkg/Udp6Dxe/Udp6Dxe.inf
-  NetworkPkg/Mtftp6Dxe/Mtftp6Dxe.inf
-!endif
-
-  NetworkPkg/HttpBootDxe/HttpBootDxe.inf
-  NetworkPkg/DnsDxe/DnsDxe.inf
-  NetworkPkg/HttpDxe/HttpDxe.inf
-  NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesDxe.inf
-   
-!if $(TLS_ENABLE) == TRUE
-  NetworkPkg/TlsDxe/TlsDxe.inf
-  NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf
-!endif
+!include NetworkPkg/NetworkComponents.dsc.inc
 
   MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
   MdeModulePkg/Application/UiApp/UiApp.inf{
@@ -534,9 +488,9 @@ [Components]
 ###################################################################################################
 #
 # BuildOptions Section - Define the module specific tool chain flags that should be used as
-#                        the default flags for a module. These flags are appended to any 
-#                        standard flags that are defined by the build process. They can be 
-#                        applied for any modules or only those modules with the specific 
+#                        the default flags for a module. These flags are appended to any
+#                        standard flags that are defined by the build process. They can be
+#                        applied for any modules or only those modules with the specific
 #                        module style (EDK or EDKII) specified in [Components] section.
 #
 ###################################################################################################
diff --git a/Nt32Pkg/Nt32Pkg.fdf b/Nt32Pkg/Nt32Pkg.fdf
index b65c95201b36..3e7b4477f753 100644
--- a/Nt32Pkg/Nt32Pkg.fdf
+++ b/Nt32Pkg/Nt32Pkg.fdf
@@ -249,32 +249,9 @@ [FV.FvRecovery]
 INF  MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatformDriOverrideDxe.inf
 INF  MdeModulePkg/Universal/DriverSampleDxe/DriverSampleDxe.inf
 
-INF  MdeModulePkg/Universal/Network/DpcDxe/DpcDxe.inf
-INF  MdeModulePkg/Universal/Network/ArpDxe/ArpDxe.inf
-INF  MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf
-INF  MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf
-INF  MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf
-INF  MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf
-INF  MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
-INF  MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
-INF  NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
-INF  NetworkPkg/TcpDxe/TcpDxe.inf
-INF  NetworkPkg/IScsiDxe/IScsiDxe.inf
 INF  Nt32Pkg/SnpNt32Dxe/SnpNt32Dxe.inf
-!if $(NETWORK_IP6_ENABLE) == TRUE
-INF  NetworkPkg/Ip6Dxe/Ip6Dxe.inf
-INF  NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf
-INF  NetworkPkg/Udp6Dxe/Udp6Dxe.inf
-INF  NetworkPkg/Mtftp6Dxe/Mtftp6Dxe.inf
-!endif
-INF  NetworkPkg/HttpBootDxe/HttpBootDxe.inf
-INF  NetworkPkg/DnsDxe/DnsDxe.inf
-INF  NetworkPkg/HttpDxe/HttpDxe.inf
-INF  NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesDxe.inf
-!if $(TLS_ENABLE) == TRUE
-INF  NetworkPkg/TlsDxe/TlsDxe.inf
-INF  NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf
-!endif
+!include NetworkPkg/Network.fdf.inc
+
 INF  MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenuApp.inf
 ################################################################################
 #
-- 
2.19.1.windows.1



  parent reply	other threads:[~2018-11-22  5:22 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-22  5:21 [PATCH v2 0/6] Add DSC/FDF include segment files for network stack Fu Siyuan
2018-11-22  5:21 ` [PATCH v2 1/6] NetworkPkg: Add DSC/FDF include segment files to NetworkPkg Fu Siyuan
2018-11-22  9:56   ` Ni, Ruiyu
2018-11-22 10:52     ` Fu, Siyuan
2018-11-23 10:56   ` Laszlo Ersek
2018-12-10  8:36     ` Ard Biesheuvel
2018-12-10 14:40       ` Laszlo Ersek
2018-12-10 16:39         ` Ard Biesheuvel
2018-11-22  5:21 ` Fu Siyuan [this message]
2018-11-22  5:21 ` [PATCH v2 3/6] ArmVirtPkg: Update DSC/FDF to use NetworkPkg's include fragment file Fu Siyuan
2018-11-23 12:29   ` Laszlo Ersek
2018-11-23 12:30     ` Laszlo Ersek
2018-11-23 16:50   ` Laszlo Ersek
2018-11-22  5:21 ` [PATCH v2 4/6] EmulatorPkg: " Fu Siyuan
2018-11-22  5:21 ` [PATCH v2 5/6] OvmfPkg: " Fu Siyuan
2018-11-23 12:00   ` Laszlo Ersek
2018-11-23 12:10   ` Laszlo Ersek
2018-11-23 12:19   ` Laszlo Ersek
2018-11-22  5:21 ` [PATCH v2 6/6] Vlv2TbltDevicePkg: " Fu Siyuan
2018-11-22  6:14 ` [PATCH v2 0/6] Add DSC/FDF include segment files for network stack Gao, Liming
2018-11-22 15:48   ` Laszlo Ersek
2018-11-23 16:02     ` Gao, Liming
2018-11-23 18:35       ` Laszlo Ersek
2018-11-26  3:31         ` Gao, Liming
2018-11-26 11:34           ` Laszlo Ersek
2018-11-22 16:12 ` Laszlo Ersek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181122052153.89464-3-siyuan.fu@intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox