Revision: 14859
http://sourceforge.net/p/edk2/code/14859
Author: lpleahy
Date: 2013-11-19 02:37:37 +0000 (Tue, 19 Nov 2013)
Log Message:
-----------
Enable the build command override the .DSC file contents to enable debug output
and specify which debug messages are displayed. An example:
build -a IA32 -a X64 -t VS2008x86 -p AppPkg/AppPkg.dsc -b DEBUG -D
DEBUG_ENABLE_OUTPUT=TRUE -D DEBUG_PROPERTY_MASK=0x27 -D
DEBUG_PRINT_ERROR_LEVEL=0xFCF00040
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Lee Leahy <[email protected]>
Reviewed-by: Daryl McDaniel <[email protected]>
Modified Paths:
--------------
trunk/edk2/AppPkg/AppPkg.dsc
trunk/edk2/StdLib/StdLib.dsc
Modified: trunk/edk2/AppPkg/AppPkg.dsc
===================================================================
--- trunk/edk2/AppPkg/AppPkg.dsc 2013-11-19 01:49:49 UTC (rev 14858)
+++ trunk/edk2/AppPkg/AppPkg.dsc 2013-11-19 02:37:37 UTC (rev 14859)
@@ -27,11 +27,18 @@
BUILD_TARGETS = DEBUG|RELEASE
SKUID_IDENTIFIER = DEFAULT
+#
+# Debug output control
+#
+ DEFINE DEBUG_ENABLE_OUTPUT = FALSE # Set to TRUE to enable debug
output
+ DEFINE DEBUG_PRINT_ERROR_LEVEL = 0x80000040 # Flags to control amount of
debug output
+ DEFINE DEBUG_PROPERTY_MASK = 0
+
[PcdsFeatureFlag]
[PcdsFixedAtBuild]
- gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x00
- gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x80000040
+ gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|$(DEBUG_PROPERTY_MASK)
+ gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|$(DEBUG_PRINT_ERROR_LEVEL)
[PcdsFixedAtBuild.IPF]
@@ -53,12 +60,12 @@
MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
- #
- # To enable debugging:
- # Enable ONE of the following DebugLib instances, as appropriate for your
platform.
- #
- DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
-# DebugLib|MdePkg/Library/UefiDebugLibConOut/UefiDebugLibConOut.inf
+ !if $(DEBUG_ENABLE_OUTPUT)
+ DebugLib|MdePkg/Library/UefiDebugLibConOut/UefiDebugLibConOut.inf
+
DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf
+ !else ## DEBUG_ENABLE_OUTPUT
+ DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
+ !endif ## DEBUG_ENABLE_OUTPUT
DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
Modified: trunk/edk2/StdLib/StdLib.dsc
===================================================================
--- trunk/edk2/StdLib/StdLib.dsc 2013-11-19 01:49:49 UTC (rev 14858)
+++ trunk/edk2/StdLib/StdLib.dsc 2013-11-19 02:37:37 UTC (rev 14859)
@@ -29,11 +29,18 @@
BUILD_TARGETS = DEBUG|RELEASE
SKUID_IDENTIFIER = DEFAULT
+#
+# Debug output control
+#
+ DEFINE DEBUG_ENABLE_OUTPUT = FALSE # Set to TRUE to enable debug
output
+ DEFINE DEBUG_PRINT_ERROR_LEVEL = 0x80000000 # Flags to control amount of
debug output
+ DEFINE DEBUG_PROPERTY_MASK = 0x0f
+
[PcdsFeatureFlag]
[PcdsFixedAtBuild]
- gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x0f
- gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x80000000
+ gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|$(DEBUG_PROPERTY_MASK)
+ gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|$(DEBUG_PRINT_ERROR_LEVEL)
[PcdsFixedAtBuild.IPF]
@@ -55,7 +62,12 @@
MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
- DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
+ !if $(DEBUG_ENABLE_OUTPUT)
+ DebugLib|MdePkg/Library/UefiDebugLibConOut/UefiDebugLibConOut.inf
+
DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf
+ !else ## DEBUG_ENABLE_OUTPUT
+ DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
+ !endif ## DEBUG_ENABLE_OUTPUT
DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing
conversations that shape the rapidly evolving mobile landscape. Sign up now.
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits