[edk2-devel] [Patch V2 10/12] UefiPayloadPkg: Add macro to disable some drivers

Zhiguang Liu zhiguang.liu at intel.com
Wed Jun 23 08:50:11 UTC 2021


Sorry, the two if condition statements about EMU_VARIABLE_ENABLE should be

    !if $(EMU_VARIABLE_ENABLE) == TRUE

When the EMU_VARIABLE_ENABLE Macro is true, will include the VariableRuntimeDxe.inf driver.

Thanks
Zhiguang
________________________________
From: devel at edk2.groups.io <devel at edk2.groups.io> on behalf of Zhiguang Liu <zhiguang.liu at intel.com>
Sent: Wednesday, June 23, 2021 10:52
To: devel at edk2.groups.io <devel at edk2.groups.io>
Cc: Ma, Maurice <maurice.ma at intel.com>; Dong, Guo <guo.dong at intel.com>; You, Benjamin <benjamin.you at intel.com>
Subject: [edk2-devel] [Patch V2 10/12] UefiPayloadPkg: Add macro to disable some drivers

V2:
Change DISABLE_VARIABLE to EMU_VARIABLE_ENABLE

Cc: Maurice Ma <maurice.ma at intel.com>
Cc: Guo Dong <guo.dong at intel.com>
Cc: Benjamin You <benjamin.you at intel.com>
Signed-off-by: Zhiguang Liu <zhiguang.liu at intel.com>
---
 UefiPayloadPkg/UefiPayloadPkg.dsc | 11 ++++++++++-
 UefiPayloadPkg/UefiPayloadPkg.fdf |  7 +++++++
 2 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc b/UefiPayloadPkg/UefiPayloadPkg.dsc
index 155aea4bc4..85055e9091 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.dsc
+++ b/UefiPayloadPkg/UefiPayloadPkg.dsc
@@ -87,6 +87,12 @@
   #

   DEFINE SHELL_TYPE                   = BUILD_SHELL



+  #

+  # Disable features

+  #

+  DEFINE EMU_VARIABLE_ENABLE   = FALSE

+  DEFINE DISABLE_RESET_SYSTEM  = FALSE

+

 [BuildOptions]

   *_*_*_CC_FLAGS                 = -D DISABLE_NEW_DEPRECATED_INTERFACES

   GCC:*_UNIXGCC_*_CC_FLAGS       = -DMDEPKG_NDEBUG

@@ -431,10 +437,13 @@
   MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf

   MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf

   MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf

+!if $(DISABLE_RESET_SYSTEM) == FALSE

   MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystemRuntimeDxe.inf

+!endif

   PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcatRealTimeClockRuntimeDxe.inf

+!if $(EMU_VARIABLE_ENABLE) == FALSE

   MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf

-

+!endif

   #

   # Following are the DXE drivers

   #

diff --git a/UefiPayloadPkg/UefiPayloadPkg.fdf b/UefiPayloadPkg/UefiPayloadPkg.fdf
index 6073f9c1b4..4d186692da 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.fdf
+++ b/UefiPayloadPkg/UefiPayloadPkg.fdf
@@ -105,9 +105,16 @@ INF MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
 INF MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf

 INF MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf

 INF MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf

+

+!if $(DISABLE_RESET_SYSTEM) == FALSE

 INF MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystemRuntimeDxe.inf

+!endif

+

 INF PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcatRealTimeClockRuntimeDxe.inf

+

+!if $(EMU_VARIABLE_ENABLE) == FALSE

 INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf

+!endif



 INF UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf

 INF MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf

--
2.30.0.windows.2



-=-=-=-=-=-=
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#76897): https://edk2.groups.io/g/devel/message/76897
Mute This Topic: https://groups.io/mt/83730189/1779286
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [zhiguang.liu at intel.com]
-=-=-=-=-=-=




-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#76921): https://edk2.groups.io/g/devel/message/76921
Mute This Topic: https://groups.io/mt/83730189/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/edk2-devel-archive/attachments/20210623/d58046b4/attachment.htm>


More information about the edk2-devel-archive mailing list