提交 86ff5f37 编写于 作者: M Mike Beaton

OpenDuet: Output additional serial debug info in DEBUG as well as NOOPT builds

Return NOOPT build to -O0, even though this does not start
yet (for reasons tbd)
上级 13a1c624
......@@ -114,13 +114,13 @@
# To save size, use NULL library for DebugLib and ReportStatusCodeLib.
# If need status code output, do library instance override.
#
!if ($(TARGET) == NOOPT)
!if ($(TARGET) == RELEASE)
DebugLib|OpenCorePkg/Library/OcDebugLibNull/OcDebugLibNull.inf
!else
#
# NOOPT equivalent to DEBUG_ON_SERIAL_PORT in OvmfPkg.
# Equivalent to DEBUG_ON_SERIAL_PORT in OvmfPkg.
#
DebugLib|OpenCorePkg/Library/OcDebugLibSerial/OcDebugLibSerial.inf
!else
DebugLib|OpenCorePkg/Library/OcDebugLibNull/OcDebugLibNull.inf
!endif
DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf
ReportStatusCodeLib|MdePkg/Library/BaseReportStatusCodeLibNull/BaseReportStatusCodeLibNull.inf
......@@ -263,18 +263,16 @@
gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvModeEnable|TRUE
gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x10000
gEfiMdeModulePkgTokenSpaceGuid.PcdVariableStoreSize|0x10000
!if ($(TARGET) == NOOPT)
!if ($(TARGET) == RELEASE)
gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x0
gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x0
gEfiMdePkgTokenSpaceGuid.PcdFixedDebugPrintErrorLevel|0x0
!else
# DEBUG_ASSERT_ENABLED | DEBUG_PRINT_ENABLED | DEBUG_CODE_ENABLED | CLEAR_MEMORY_ENABLED | ASSERT_DEADLOOP_ENABLED
##gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x2f
# DEBUG_PRINT_ENABLED | DEBUG_CODE_ENABLED | CLEAR_MEMORY_ENABLED | ASSERT_DEADLOOP_ENABLED
gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x2e
gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x2f
# DEBUG_ERROR | DEBUG_WARN | DEBUG_INFO
gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x80000042
gEfiMdePkgTokenSpaceGuid.PcdFixedDebugPrintErrorLevel|0x80000042
!else
gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x0
gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x0
gEfiMdePkgTokenSpaceGuid.PcdFixedDebugPrintErrorLevel|0x0
!endif
gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|0x0
gOpenCorePkgTokenSpaceGuid.PcdCanaryAllowRdtscFallback|TRUE
......@@ -296,8 +294,8 @@
MSFT:DEBUG_*_*_CC_FLAGS = -D OC_TARGET_RELEASE=1 /FAcs -Dinline=__inline -DMDEPKG_NDEBUG /GS /kernel
MSFT:RELEASE_*_*_CC_FLAGS = -D OC_TARGET_RELEASE=1 /FAcs -Dinline=__inline -DMDEPKG_NDEBUG /GS /kernel
XCODE:NOOPT_*_*_CC_FLAGS = -D OC_TARGET_RELEASE=1 -fno-unwind-tables -flto -Os -fstack-protector-strong -ftrivial-auto-var-init=pattern
XCODE:DEBUG_*_*_CC_FLAGS = -D OC_TARGET_RELEASE=1 -fno-unwind-tables -flto -Os -DMDEPKG_NDEBUG -fstack-protector-strong -ftrivial-auto-var-init=pattern
XCODE:NOOPT_*_*_CC_FLAGS = -D OC_TARGET_RELEASE=1 -fno-unwind-tables -O0 -fstack-protector-strong -ftrivial-auto-var-init=pattern
XCODE:DEBUG_*_*_CC_FLAGS = -D OC_TARGET_RELEASE=1 -fno-unwind-tables -flto -Os -fstack-protector-strong -ftrivial-auto-var-init=pattern
XCODE:RELEASE_*_*_CC_FLAGS = -D OC_TARGET_RELEASE=1 -fno-unwind-tables -flto -Os -DMDEPKG_NDEBUG -fstack-protector-strong -ftrivial-auto-var-init=pattern
GCC:NOOPT_*_*_CC_FLAGS = -D OC_TARGET_RELEASE=1 -Wno-unused-but-set-variable -fstack-protector-strong -mstack-protector-guard=global -Wuninitialized
......
......@@ -14,11 +14,17 @@
##
BlockSize = 0x10000
!if ($(TARGET) == NOOPT)
NumBlocks = 0x24 #GenFv image size 0x240000
# Required IA32 size is ~1 block bigger than required X64 size for each
# build, so just use minimum IA32 sizes for both.
!if ($(TARGET) == RELEASE)
NumBlocks = 0x8 #GenFv image size 0x80000
!else
!if ($(TARGET) == DEBUG)
NumBlocks = 0xd #GenFv image size 0xd0000
!else
NumBlocks = 0x24 #GenFv image size 0x240000
!endif
!endif
FvAlignment = 16 #FV alignment and FV attributes setting.
ERASE_POLARITY = 1
MEMORY_MAPPED = TRUE
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册