[edk2-platforms][PATCH V1 15/27] NetworkFeaturePkg: Use MinPlatformPkg build include files


Oram, Isaac W
 

Standalong build was not working due to missing libraries.
Leverage MinPlatformPkg common includes for core libraries.

Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>

Signed-off-by: Isaac Oram <isaac.w.oram@intel.com>
---
Features/Intel/Network/NetworkFeaturePkg/Include/NetworkFeature.dsc | 89 ++------------------
Features/Intel/Network/NetworkFeaturePkg/NetworkFeaturePkg.dsc | 18 ++++
2 files changed, 24 insertions(+), 83 deletions(-)

diff --git a/Features/Intel/Network/NetworkFeaturePkg/Include/NetworkFeature.dsc b/Features/Intel/Network/NetworkFeaturePkg/Include/NetworkFeature.dsc
index bbc91ecbb1..ca151b4e33 100644
--- a/Features/Intel/Network/NetworkFeaturePkg/Include/NetworkFeature.dsc
+++ b/Features/Intel/Network/NetworkFeaturePkg/Include/NetworkFeature.dsc
@@ -18,12 +18,12 @@
#
################################################################################
[Defines]
-!ifndef $(PEI_ARCH)
- !error "PEI_ARCH must be specified to build this feature!"
-!endif
-!ifndef $(DXE_ARCH)
- !error "DXE_ARCH must be specified to build this feature!"
-!endif
+ !ifndef $(PEI_ARCH)
+ !error "PEI_ARCH must be specified to build this feature!"
+ !endif
+ !ifndef $(DXE_ARCH)
+ !error "DXE_ARCH must be specified to build this feature!"
+ !endif

!include NetworkPkg/NetworkDefines.dsc.inc

@@ -41,56 +41,9 @@
#
################################################################################

-!include MdePkg/MdeLibs.dsc.inc
-
[LibraryClasses]
!include NetworkPkg/NetworkLibs.dsc.inc
-
- #######################################
- # Edk2 Packages
- #######################################
- BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
- BaseLib|MdePkg/Library/BaseLib/BaseLib.inf
- BaseMemoryLib|MdePkg/Library/BaseMemoryLibRepStr/BaseMemoryLibRepStr.inf
- DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
- DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
- FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf
- HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf
- IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf
- OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf
- PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
- PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
- PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanceLibNull.inf
- PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
- ReportStatusCodeLib|MdePkg/Library/BaseReportStatusCodeLibNull/BaseReportStatusCodeLibNull.inf
- SafeIntLib|MdePkg/Library/BaseSafeIntLib/BaseSafeIntLib.inf
- SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf
- TimerLib|MdePkg/Library/BaseTimerLibNullTemplate/BaseTimerLibNullTemplate.inf
TlsLib|CryptoPkg/Library/TlsLib/TlsLib.inf
- UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf
- UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
- UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf
- UefiHiiServicesLib|MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServicesLib.inf
- UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
- UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
-
-[LibraryClasses.common.SEC,LibraryClasses.common.PEI_CORE,LibraryClasses.common.PEIM]
- #######################################
- # Edk2 Packages
- #######################################
- HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf
- MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf
- PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf
-
-[LibraryClasses.common.DXE_CORE,LibraryClasses.common.DXE_SMM_DRIVER,LibraryClasses.common.SMM_CORE,LibraryClasses.common.DXE_DRIVER,LibraryClasses.common.DXE_RUNTIME_DRIVER,LibraryClasses.common.UEFI_DRIVER,LibraryClasses.common.UEFI_APPLICATION]
- #######################################
- # Edk2 Packages
- #######################################
- DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf
- DxeServicesTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf
- HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
- MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
- PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf

################################################################################
#
@@ -106,21 +59,6 @@
# generated for it, but the binary will not be put into any firmware volume.
#
################################################################################
-#
-# Feature PEI Components
-#
-
-# @todo: Change below line to [Components.$(PEI_ARCH)] after https://bugzilla.tianocore.org/show_bug.cgi?id=2308
-# is completed.
-[Components.IA32]
- #####################################
- # Network Feature Package
- #####################################
-
- # Add library instances here that are not included in package components and should be tested
- # in the package build.
-
- # Add components here that should be included in the package build.

#
# Feature DXE Components
@@ -138,18 +76,3 @@

# Add components here that should be included in the package build.
!include NetworkPkg/NetworkComponents.dsc.inc
-
-###################################################################################################
-#
-# 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
-# module style (EDK or EDKII) specified in [Components] section.
-#
-# For advanced features, it is recommended to enable [BuildOptions] in
-# the applicable INF file so it does not affect the whole board package
-# build when this DSC file is active.
-#
-###################################################################################################
-[BuildOptions]
diff --git a/Features/Intel/Network/NetworkFeaturePkg/NetworkFeaturePkg.dsc b/Features/Intel/Network/NetworkFeaturePkg/NetworkFeaturePkg.dsc
index 199686fa09..cdc5dc851d 100644
--- a/Features/Intel/Network/NetworkFeaturePkg/NetworkFeaturePkg.dsc
+++ b/Features/Intel/Network/NetworkFeaturePkg/NetworkFeaturePkg.dsc
@@ -24,6 +24,24 @@
PEI_ARCH = IA32
DXE_ARCH = X64

+[Packages]
+ MinPlatformPkg/MinPlatformPkg.dec
+
+[PcdsFeatureFlag]
+ #
+ # PCD needed for MinPlatform build includes
+ #
+ gMinPlatformPkgTokenSpaceGuid.PcdSmiHandlerProfileEnable |FALSE
+ gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable |FALSE
+ gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable |FALSE
+
+#
+# Include common libraries
+#
+!include MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc
+!include MinPlatformPkg/Include/Dsc/CorePeiLib.dsc
+!include MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc
+
#
# This package always builds the feature.
#
--
2.27.0.windows.1


Nate DeSimone
 

Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com>

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Oram,
Isaac W
Sent: Tuesday, January 11, 2022 6:20 PM
To: devel@edk2.groups.io
Cc: Oram, Isaac W <isaac.w.oram@intel.com>; Chaganty, Rangasai V
<rangasai.v.chaganty@intel.com>; Gao, Liming <gaoliming@byosoft.com.cn>
Subject: [edk2-devel][edk2-platforms][PATCH V1 15/27]
NetworkFeaturePkg: Use MinPlatformPkg build include files

Standalong build was not working due to missing libraries.
Leverage MinPlatformPkg common includes for core libraries.

Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>

Signed-off-by: Isaac Oram <isaac.w.oram@intel.com>
---
Features/Intel/Network/NetworkFeaturePkg/Include/NetworkFeature.dsc
| 89 ++------------------
Features/Intel/Network/NetworkFeaturePkg/NetworkFeaturePkg.dsc |
18 ++++
2 files changed, 24 insertions(+), 83 deletions(-)

diff --git
a/Features/Intel/Network/NetworkFeaturePkg/Include/NetworkFeature.ds
c
b/Features/Intel/Network/NetworkFeaturePkg/Include/NetworkFeature.ds
c
index bbc91ecbb1..ca151b4e33 100644
---
a/Features/Intel/Network/NetworkFeaturePkg/Include/NetworkFeature.ds
c
+++
b/Features/Intel/Network/NetworkFeaturePkg/Include/NetworkFeature.ds
c
@@ -18,12 +18,12 @@
#

##########################################################
######################
[Defines]
-!ifndef $(PEI_ARCH)
- !error "PEI_ARCH must be specified to build this feature!"
-!endif
-!ifndef $(DXE_ARCH)
- !error "DXE_ARCH must be specified to build this feature!"
-!endif
+ !ifndef $(PEI_ARCH)
+ !error "PEI_ARCH must be specified to build this feature!"
+ !endif
+ !ifndef $(DXE_ARCH)
+ !error "DXE_ARCH must be specified to build this feature!"
+ !endif

!include NetworkPkg/NetworkDefines.dsc.inc

@@ -41,56 +41,9 @@
#

##########################################################
######################

-!include MdePkg/MdeLibs.dsc.inc
-
[LibraryClasses]
!include NetworkPkg/NetworkLibs.dsc.inc
-
- #######################################
- # Edk2 Packages
- #######################################
- BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
- BaseLib|MdePkg/Library/BaseLib/BaseLib.inf
-
BaseMemoryLib|MdePkg/Library/BaseMemoryLibRepStr/BaseMemoryLibR
epStr.inf
- DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
- DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
- FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf
- HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf
- IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf
- OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf
- PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
-
PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/Base
PeCoffGetEntryPointLib.inf
-
PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanc
eLibNull.inf
- PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
-
ReportStatusCodeLib|MdePkg/Library/BaseReportStatusCodeLibNull/BaseR
eportStatusCodeLibNull.inf
- SafeIntLib|MdePkg/Library/BaseSafeIntLib/BaseSafeIntLib.inf
- SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf
-
TimerLib|MdePkg/Library/BaseTimerLibNullTemplate/BaseTimerLibNullTem
plate.inf
TlsLib|CryptoPkg/Library/TlsLib/TlsLib.inf
-
UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLib/UefiBoo
tManagerLib.inf
-
UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBo
otServicesTableLib.inf
-
UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntry
Point.inf
-
UefiHiiServicesLib|MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiService
sLib.inf
- UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
-
UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib
/UefiRuntimeServicesTableLib.inf
-
-
[LibraryClasses.common.SEC,LibraryClasses.common.PEI_CORE,LibraryClasse
s.common.PEIM]
- #######################################
- # Edk2 Packages
- #######################################
- HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf
-
MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemory
AllocationLib.inf
- PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf
-
-
[LibraryClasses.common.DXE_CORE,LibraryClasses.common.DXE_SMM_DRI
VER,LibraryClasses.common.SMM_CORE,LibraryClasses.common.DXE_DRIVE
R,LibraryClasses.common.DXE_RUNTIME_DRIVER,LibraryClasses.common.U
EFI_DRIVER,LibraryClasses.common.UEFI_APPLICATION]
- #######################################
- # Edk2 Packages
- #######################################
- DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf
-
DxeServicesTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTabl
eLib.inf
- HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
-
MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemo
ryAllocationLib.inf
- PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf


##########################################################
######################
#
@@ -106,21 +59,6 @@
# generated for it, but the binary will not be put into any firmware
volume.
#

##########################################################
######################
-#
-# Feature PEI Components
-#
-
-# @todo: Change below line to [Components.$(PEI_ARCH)] after
https://bugzilla.tianocore.org/show_bug.cgi?id=2308
-# is completed.
-[Components.IA32]
- #####################################
- # Network Feature Package
- #####################################
-
- # Add library instances here that are not included in package components
and should be tested
- # in the package build.
-
- # Add components here that should be included in the package build.

#
# Feature DXE Components
@@ -138,18 +76,3 @@

# Add components here that should be included in the package build.
!include NetworkPkg/NetworkComponents.dsc.inc
-
-
##########################################################
#########################################
-#
-# 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
-# module style (EDK or EDKII) specified in [Components] section.
-#
-# For advanced features, it is recommended to enable
[BuildOptions] in
-# the applicable INF file so it does not affect the whole board
package
-# build when this DSC file is active.
-#
-
##########################################################
#########################################
-[BuildOptions]
diff --git
a/Features/Intel/Network/NetworkFeaturePkg/NetworkFeaturePkg.dsc
b/Features/Intel/Network/NetworkFeaturePkg/NetworkFeaturePkg.dsc
index 199686fa09..cdc5dc851d 100644
--- a/Features/Intel/Network/NetworkFeaturePkg/NetworkFeaturePkg.dsc
+++
b/Features/Intel/Network/NetworkFeaturePkg/NetworkFeaturePkg.dsc
@@ -24,6 +24,24 @@
PEI_ARCH = IA32
DXE_ARCH = X64

+[Packages]
+ MinPlatformPkg/MinPlatformPkg.dec
+
+[PcdsFeatureFlag]
+ #
+ # PCD needed for MinPlatform build includes
+ #
+ gMinPlatformPkgTokenSpaceGuid.PcdSmiHandlerProfileEnable
|FALSE
+ gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable
|FALSE
+ gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable
|FALSE
+
+#
+# Include common libraries
+#
+!include MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc
+!include MinPlatformPkg/Include/Dsc/CorePeiLib.dsc
+!include MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc
+
#
# This package always builds the feature.
#
--
2.27.0.windows.1





Chaganty, Rangasai V
 

Reviewed-by: Sai Chaganty <rangasai.v.chaganty@intel.com>

-----Original Message-----
From: Oram, Isaac W <isaac.w.oram@intel.com>
Sent: Tuesday, January 11, 2022 6:20 PM
To: devel@edk2.groups.io
Cc: Oram, Isaac W <isaac.w.oram@intel.com>; Chaganty, Rangasai V <rangasai.v.chaganty@intel.com>; Gao, Liming <gaoliming@byosoft.com.cn>
Subject: [edk2-devel][edk2-platforms][PATCH V1 15/27] NetworkFeaturePkg: Use MinPlatformPkg build include files

Standalong build was not working due to missing libraries.
Leverage MinPlatformPkg common includes for core libraries.

Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>

Signed-off-by: Isaac Oram <isaac.w.oram@intel.com>
---
Features/Intel/Network/NetworkFeaturePkg/Include/NetworkFeature.dsc | 89 ++------------------
Features/Intel/Network/NetworkFeaturePkg/NetworkFeaturePkg.dsc | 18 ++++
2 files changed, 24 insertions(+), 83 deletions(-)

diff --git a/Features/Intel/Network/NetworkFeaturePkg/Include/NetworkFeature.dsc b/Features/Intel/Network/NetworkFeaturePkg/Include/NetworkFeature.dsc
index bbc91ecbb1..ca151b4e33 100644
--- a/Features/Intel/Network/NetworkFeaturePkg/Include/NetworkFeature.dsc
+++ b/Features/Intel/Network/NetworkFeaturePkg/Include/NetworkFeature.dsc
@@ -18,12 +18,12 @@
#
################################################################################
[Defines]
-!ifndef $(PEI_ARCH)
- !error "PEI_ARCH must be specified to build this feature!"
-!endif
-!ifndef $(DXE_ARCH)
- !error "DXE_ARCH must be specified to build this feature!"
-!endif
+ !ifndef $(PEI_ARCH)
+ !error "PEI_ARCH must be specified to build this feature!"
+ !endif
+ !ifndef $(DXE_ARCH)
+ !error "DXE_ARCH must be specified to build this feature!"
+ !endif

!include NetworkPkg/NetworkDefines.dsc.inc

@@ -41,56 +41,9 @@
#
################################################################################

-!include MdePkg/MdeLibs.dsc.inc
-
[LibraryClasses]
!include NetworkPkg/NetworkLibs.dsc.inc
-
- #######################################
- # Edk2 Packages
- #######################################
- BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
- BaseLib|MdePkg/Library/BaseLib/BaseLib.inf
- BaseMemoryLib|MdePkg/Library/BaseMemoryLibRepStr/BaseMemoryLibRepStr.inf
- DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
- DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
- FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf
- HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf
- IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf
- OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf
- PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
- PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
- PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanceLibNull.inf
- PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
- ReportStatusCodeLib|MdePkg/Library/BaseReportStatusCodeLibNull/BaseReportStatusCodeLibNull.inf
- SafeIntLib|MdePkg/Library/BaseSafeIntLib/BaseSafeIntLib.inf
- SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf
- TimerLib|MdePkg/Library/BaseTimerLibNullTemplate/BaseTimerLibNullTemplate.inf
TlsLib|CryptoPkg/Library/TlsLib/TlsLib.inf
- UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf
- UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
- UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf
- UefiHiiServicesLib|MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServicesLib.inf
- UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
- UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
-
-[LibraryClasses.common.SEC,LibraryClasses.common.PEI_CORE,LibraryClasses.common.PEIM]
- #######################################
- # Edk2 Packages
- #######################################
- HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf
- MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf
- PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf
-
-[LibraryClasses.common.DXE_CORE,LibraryClasses.common.DXE_SMM_DRIVER,LibraryClasses.common.SMM_CORE,LibraryClasses.common.DXE_DRIVER,LibraryClasses.common.DXE_RUNTIME_DRIVER,LibraryClasses.common.UEFI_DRIVER,LibraryClasses.common.UEFI_APPLICATION]
- #######################################
- # Edk2 Packages
- #######################################
- DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf
- DxeServicesTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf
- HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
- MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
- PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf

################################################################################
#
@@ -106,21 +59,6 @@
# generated for it, but the binary will not be put into any firmware volume.
#
################################################################################
-#
-# Feature PEI Components
-#
-
-# @todo: Change below line to [Components.$(PEI_ARCH)] after https://bugzilla.tianocore.org/show_bug.cgi?id=2308
-# is completed.
-[Components.IA32]
- #####################################
- # Network Feature Package
- #####################################
-
- # Add library instances here that are not included in package components and should be tested
- # in the package build.
-
- # Add components here that should be included in the package build.

#
# Feature DXE Components
@@ -138,18 +76,3 @@

# Add components here that should be included in the package build.
!include NetworkPkg/NetworkComponents.dsc.inc
-
-###################################################################################################
-#
-# 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
-# module style (EDK or EDKII) specified in [Components] section.
-#
-# For advanced features, it is recommended to enable [BuildOptions] in
-# the applicable INF file so it does not affect the whole board package
-# build when this DSC file is active.
-#
-###################################################################################################
-[BuildOptions]
diff --git a/Features/Intel/Network/NetworkFeaturePkg/NetworkFeaturePkg.dsc b/Features/Intel/Network/NetworkFeaturePkg/NetworkFeaturePkg.dsc
index 199686fa09..cdc5dc851d 100644
--- a/Features/Intel/Network/NetworkFeaturePkg/NetworkFeaturePkg.dsc
+++ b/Features/Intel/Network/NetworkFeaturePkg/NetworkFeaturePkg.dsc
@@ -24,6 +24,24 @@
PEI_ARCH = IA32
DXE_ARCH = X64

+[Packages]
+ MinPlatformPkg/MinPlatformPkg.dec
+
+[PcdsFeatureFlag]
+ #
+ # PCD needed for MinPlatform build includes
+ #
+ gMinPlatformPkgTokenSpaceGuid.PcdSmiHandlerProfileEnable |FALSE
+ gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable |FALSE
+ gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable |FALSE
+
+#
+# Include common libraries
+#
+!include MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc
+!include MinPlatformPkg/Include/Dsc/CorePeiLib.dsc
+!include MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc
+
#
# This package always builds the feature.
#
--
2.27.0.windows.1


Oram, Isaac W
 

Pushed as e69e69bdf8..d0919cab63

-----Original Message-----
From: Chaganty, Rangasai V <rangasai.v.chaganty@intel.com>
Sent: Thursday, January 13, 2022 9:58 PM
To: Oram, Isaac W <isaac.w.oram@intel.com>; devel@edk2.groups.io
Cc: Gao, Liming <gaoliming@byosoft.com.cn>
Subject: RE: [edk2-devel][edk2-platforms][PATCH V1 15/27] NetworkFeaturePkg: Use MinPlatformPkg build include files

Reviewed-by: Sai Chaganty <rangasai.v.chaganty@intel.com>

-----Original Message-----
From: Oram, Isaac W <isaac.w.oram@intel.com>
Sent: Tuesday, January 11, 2022 6:20 PM
To: devel@edk2.groups.io
Cc: Oram, Isaac W <isaac.w.oram@intel.com>; Chaganty, Rangasai V <rangasai.v.chaganty@intel.com>; Gao, Liming <gaoliming@byosoft.com.cn>
Subject: [edk2-devel][edk2-platforms][PATCH V1 15/27] NetworkFeaturePkg: Use MinPlatformPkg build include files

Standalong build was not working due to missing libraries.
Leverage MinPlatformPkg common includes for core libraries.

Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>

Signed-off-by: Isaac Oram <isaac.w.oram@intel.com>
---
Features/Intel/Network/NetworkFeaturePkg/Include/NetworkFeature.dsc | 89 ++------------------
Features/Intel/Network/NetworkFeaturePkg/NetworkFeaturePkg.dsc | 18 ++++
2 files changed, 24 insertions(+), 83 deletions(-)

diff --git a/Features/Intel/Network/NetworkFeaturePkg/Include/NetworkFeature.dsc b/Features/Intel/Network/NetworkFeaturePkg/Include/NetworkFeature.dsc
index bbc91ecbb1..ca151b4e33 100644
--- a/Features/Intel/Network/NetworkFeaturePkg/Include/NetworkFeature.dsc
+++ b/Features/Intel/Network/NetworkFeaturePkg/Include/NetworkFeature.dsc
@@ -18,12 +18,12 @@
#
################################################################################
[Defines]
-!ifndef $(PEI_ARCH)
- !error "PEI_ARCH must be specified to build this feature!"
-!endif
-!ifndef $(DXE_ARCH)
- !error "DXE_ARCH must be specified to build this feature!"
-!endif
+ !ifndef $(PEI_ARCH)
+ !error "PEI_ARCH must be specified to build this feature!"
+ !endif
+ !ifndef $(DXE_ARCH)
+ !error "DXE_ARCH must be specified to build this feature!"
+ !endif

!include NetworkPkg/NetworkDefines.dsc.inc

@@ -41,56 +41,9 @@
#
################################################################################

-!include MdePkg/MdeLibs.dsc.inc
-
[LibraryClasses]
!include NetworkPkg/NetworkLibs.dsc.inc
-
- #######################################
- # Edk2 Packages
- #######################################
- BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
- BaseLib|MdePkg/Library/BaseLib/BaseLib.inf
- BaseMemoryLib|MdePkg/Library/BaseMemoryLibRepStr/BaseMemoryLibRepStr.inf
- DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
- DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
- FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf
- HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf
- IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf
- OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf
- PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
- PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
- PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanceLibNull.inf
- PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
- ReportStatusCodeLib|MdePkg/Library/BaseReportStatusCodeLibNull/BaseReportStatusCodeLibNull.inf
- SafeIntLib|MdePkg/Library/BaseSafeIntLib/BaseSafeIntLib.inf
- SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf
- TimerLib|MdePkg/Library/BaseTimerLibNullTemplate/BaseTimerLibNullTemplate.inf
TlsLib|CryptoPkg/Library/TlsLib/TlsLib.inf
- UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf
- UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
- UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf
- UefiHiiServicesLib|MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServicesLib.inf
- UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
- UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
-
-[LibraryClasses.common.SEC,LibraryClasses.common.PEI_CORE,LibraryClasses.common.PEIM]
- #######################################
- # Edk2 Packages
- #######################################
- HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf
- MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf
- PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf
-
-[LibraryClasses.common.DXE_CORE,LibraryClasses.common.DXE_SMM_DRIVER,LibraryClasses.common.SMM_CORE,LibraryClasses.common.DXE_DRIVER,LibraryClasses.common.DXE_RUNTIME_DRIVER,LibraryClasses.common.UEFI_DRIVER,LibraryClasses.common.UEFI_APPLICATION]
- #######################################
- # Edk2 Packages
- #######################################
- DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf
- DxeServicesTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf
- HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
- MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
- PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf

################################################################################
#
@@ -106,21 +59,6 @@
# generated for it, but the binary will not be put into any firmware volume.
#
################################################################################
-#
-# Feature PEI Components
-#
-
-# @todo: Change below line to [Components.$(PEI_ARCH)] after https://bugzilla.tianocore.org/show_bug.cgi?id=2308
-# is completed.
-[Components.IA32]
- #####################################
- # Network Feature Package
- #####################################
-
- # Add library instances here that are not included in package components and should be tested
- # in the package build.
-
- # Add components here that should be included in the package build.

#
# Feature DXE Components
@@ -138,18 +76,3 @@

# Add components here that should be included in the package build.
!include NetworkPkg/NetworkComponents.dsc.inc
-
-###################################################################################################
-#
-# 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
-# module style (EDK or EDKII) specified in [Components] section.
-#
-# For advanced features, it is recommended to enable [BuildOptions] in
-# the applicable INF file so it does not affect the whole board package
-# build when this DSC file is active.
-#
-###################################################################################################
-[BuildOptions]
diff --git a/Features/Intel/Network/NetworkFeaturePkg/NetworkFeaturePkg.dsc b/Features/Intel/Network/NetworkFeaturePkg/NetworkFeaturePkg.dsc
index 199686fa09..cdc5dc851d 100644
--- a/Features/Intel/Network/NetworkFeaturePkg/NetworkFeaturePkg.dsc
+++ b/Features/Intel/Network/NetworkFeaturePkg/NetworkFeaturePkg.dsc
@@ -24,6 +24,24 @@
PEI_ARCH = IA32
DXE_ARCH = X64

+[Packages]
+ MinPlatformPkg/MinPlatformPkg.dec
+
+[PcdsFeatureFlag]
+ #
+ # PCD needed for MinPlatform build includes
+ #
+ gMinPlatformPkgTokenSpaceGuid.PcdSmiHandlerProfileEnable |FALSE
+ gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable |FALSE
+ gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable |FALSE
+
+#
+# Include common libraries
+#
+!include MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc
+!include MinPlatformPkg/Include/Dsc/CorePeiLib.dsc
+!include MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc
+
#
# This package always builds the feature.
#
--
2.27.0.windows.1