]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Enable the build command override the .DSC file contents to enable debug output and...
authorLee Leahy <leroy.p.leahy@intel.com>
Tue, 19 Nov 2013 02:37:37 +0000 (02:37 +0000)
committerlpleahy <lpleahy@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 19 Nov 2013 02:37:37 +0000 (02:37 +0000)
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 <leroy.p.leahy@intel.com>
Reviewed-by: Daryl McDaniel <daryl.mcdaniel@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14859 6f19259b-4bc3-4df7-8a09-765794883524

AppPkg/AppPkg.dsc
StdLib/StdLib.dsc

index 23ebf4773391aa954cefde561949f189adc48cd0..d0aac2c5092aee578f23ccad275a72dad0243b01 100644 (file)
   BUILD_TARGETS                  = DEBUG|RELEASE\r
   SKUID_IDENTIFIER               = DEFAULT\r
 \r
+#\r
+#  Debug output control\r
+#\r
+  DEFINE DEBUG_ENABLE_OUTPUT      = FALSE       # Set to TRUE to enable debug output\r
+  DEFINE DEBUG_PRINT_ERROR_LEVEL  = 0x80000040  # Flags to control amount of debug output\r
+  DEFINE DEBUG_PROPERTY_MASK      = 0\r
+\r
 [PcdsFeatureFlag]\r
 \r
 [PcdsFixedAtBuild]\r
-  gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x00\r
-  gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x80000040\r
+  gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|$(DEBUG_PROPERTY_MASK)\r
+  gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|$(DEBUG_PRINT_ERROR_LEVEL)\r
 \r
 [PcdsFixedAtBuild.IPF]\r
 \r
   MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf\r
   UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf\r
   UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf\r
-  #\r
-  # To enable debugging:\r
-  #   Enable ONE of the following DebugLib instances, as appropriate for your platform.\r
-  #\r
-  DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf\r
-#  DebugLib|MdePkg/Library/UefiDebugLibConOut/UefiDebugLibConOut.inf\r
+  !if $(DEBUG_ENABLE_OUTPUT)\r
+    DebugLib|MdePkg/Library/UefiDebugLibConOut/UefiDebugLibConOut.inf\r
+    DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf\r
+  !else   ## DEBUG_ENABLE_OUTPUT\r
+    DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf\r
+  !endif  ## DEBUG_ENABLE_OUTPUT\r
 \r
   DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf\r
   PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf\r
index f9f28b872bd9e0a4decf9a9d4e69f40ea6cdae22..b0309e2bf3cc4be9787598381e6d5be21e69350e 100644 (file)
   BUILD_TARGETS                  = DEBUG|RELEASE\r
   SKUID_IDENTIFIER               = DEFAULT\r
 \r
+#\r
+#  Debug output control\r
+#\r
+  DEFINE DEBUG_ENABLE_OUTPUT      = FALSE       # Set to TRUE to enable debug output\r
+  DEFINE DEBUG_PRINT_ERROR_LEVEL  = 0x80000000  # Flags to control amount of debug output\r
+  DEFINE DEBUG_PROPERTY_MASK      = 0x0f\r
+\r
 [PcdsFeatureFlag]\r
 \r
 [PcdsFixedAtBuild]\r
-  gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x0f\r
-  gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x80000000\r
+  gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|$(DEBUG_PROPERTY_MASK)\r
+  gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|$(DEBUG_PRINT_ERROR_LEVEL)\r
 \r
 [PcdsFixedAtBuild.IPF]\r
 \r
   MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf\r
   UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf\r
   UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf\r
-  DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf\r
+  !if $(DEBUG_ENABLE_OUTPUT)\r
+    DebugLib|MdePkg/Library/UefiDebugLibConOut/UefiDebugLibConOut.inf\r
+    DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf\r
+  !else   ## DEBUG_ENABLE_OUTPUT\r
+    DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf\r
+  !endif  ## DEBUG_ENABLE_OUTPUT\r
   DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf\r
   PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf\r
   IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf\r