mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2024-11-10 09:40:53 +01:00
Redirect OC log to Clover.
Keep log file handle opened. Put back -DMDEPKG_NDEBUG.
This commit is contained in:
parent
584df7808f
commit
73f29eb538
230
Clover.dsc
230
Clover.dsc
@ -148,12 +148,14 @@
|
||||
!ifdef DEBUG_ON_SERIAL_PORT
|
||||
BaseSerialPortLib|MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.inf
|
||||
SerialPortLib|MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.inf
|
||||
DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf
|
||||
!else
|
||||
BaseSerialPortLib|MdePkg/Library/BaseSerialPortLibNull/BaseSerialPortLibNull.inf
|
||||
SerialPortLib|MdePkg/Library/BaseSerialPortLibNull/BaseSerialPortLibNull.inf
|
||||
DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
|
||||
!endif
|
||||
BaseDebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf
|
||||
DebugLib|OpenCorePkg/Library/OcDebugLogLib/OcDebugLogLib.inf
|
||||
#DebugLib|OpenCorePkg/Library/OcDebugLogLib/OcDebugLogLib.inf
|
||||
DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf
|
||||
ReportStatusCodeLib|MdePkg/Library/BaseReportStatusCodeLibNull/BaseReportStatusCodeLibNull.inf
|
||||
|
||||
@ -185,7 +187,6 @@
|
||||
OcConsoleLib|OpenCorePkg/Library/OcConsoleLib/OcConsoleLib.inf
|
||||
OcCpuLib|OpenCorePkg/Library/OcCpuLib/OcCpuLib.inf
|
||||
OcCryptoLib|OpenCorePkg/Library/OcCryptoLib/OcCryptoLib.inf
|
||||
OcDebugLogLib|OpenCorePkg/Library/OcDebugLogLib/OcDebugLogLib.inf
|
||||
OcDevicePathLib|OpenCorePkg/Library/OcDevicePathLib/OcDevicePathLib.inf
|
||||
OcFileLib|OpenCorePkg/Library/OcFileLib/OcFileLib.inf
|
||||
OcMemoryLib|OpenCorePkg/Library/OcMemoryLib/OcMemoryLib.inf
|
||||
@ -199,7 +200,6 @@
|
||||
OcTemplateLib|OpenCorePkg/Library/OcTemplateLib/OcTemplateLib.inf
|
||||
OcXmlLib|OpenCorePkg/Library/OcXmlLib/OcXmlLib.inf
|
||||
OcDeviceTreeLib|OpenCorePkg/Library/OcDeviceTreeLib/OcDeviceTreeLib.inf
|
||||
OcDebugLogLib|OpenCorePkg/Library/OcDebugLogLib/OcDebugLogLib.inf
|
||||
OcDataHubLib|OpenCorePkg/Library/OcDataHubLib/OcDataHubLib.inf
|
||||
OcAppleImg4Lib|OpenCorePkg/Library/OcAppleImg4Lib/OcAppleImg4Lib.inf
|
||||
OcAppleKernelLib|OpenCorePkg/Library/OcAppleKernelLib/OcAppleKernelLib.inf
|
||||
@ -210,7 +210,7 @@
|
||||
OcAppleSecureBootLib|OpenCorePkg/Library/OcAppleSecureBootLib/OcAppleSecureBootLib.inf
|
||||
OcAppleImageVerificationLib|OpenCorePkg/Library/OcAppleImageVerificationLib/OcAppleImageVerificationLib.inf
|
||||
OcDriverConnectionLib|OpenCorePkg/Library/OcDriverConnectionLib/OcDriverConnectionLib.inf
|
||||
OcDebugLogLib|OpenCorePkg/Library/OcDebugLogLib/OcDebugLogLib.inf
|
||||
#OcDebugLogLib|OpenCorePkg/Library/OcDebugLogLib/OcDebugLogLib.inf
|
||||
OcAcpiLib|OpenCorePkg/Library/OcAcpiLib/OcAcpiLib.inf
|
||||
OcAppleEventLib|OpenCorePkg/Library/OcAppleEventLib/OcAppleEventLib.inf
|
||||
#OcAppleImageConversionLib|OpenCorePkg/Library/OcAppleImageConversionLib/OcAppleImageConversionLib.inf
|
||||
@ -228,6 +228,7 @@
|
||||
#OcPngLib|OpenCorePkg/Library/OcPngLib/OcPngLib.inf
|
||||
|
||||
OpenCoreLib|OpenCorePkg/Platform/OpenCore/OpenCoreLib.inf
|
||||
OcDebugLogLibOc2Clover|OpenCorePkg/Library/OcDebugLogLibOc2Clover/OcDebugLogLibOc2Clover.inf
|
||||
|
||||
#MachoLib|Library/MachoLib/MachoLib.inf
|
||||
|
||||
@ -282,6 +283,216 @@
|
||||
#
|
||||
###################################################################################################
|
||||
[Components]
|
||||
|
||||
OpenCorePkg/Platform/OpenCore/OpenCoreLib.inf {
|
||||
<BuildOptions>
|
||||
*_*_*_CC_FLAGS = -include OpenCoreFromClover.h
|
||||
}
|
||||
OpenCorePkg/Library/OcGuardLib/OcGuardLib.inf {
|
||||
<BuildOptions>
|
||||
*_*_*_CC_FLAGS = -include OpenCoreFromClover.h
|
||||
}
|
||||
OpenCorePkg/Library/OcAfterBootCompatLib/OcAfterBootCompatLib.inf {
|
||||
<BuildOptions>
|
||||
*_*_*_CC_FLAGS = -include OpenCoreFromClover.h
|
||||
}
|
||||
OpenCorePkg/Library/OcAppleBootPolicyLib/OcAppleBootPolicyLib.inf {
|
||||
<BuildOptions>
|
||||
*_*_*_CC_FLAGS = -include OpenCoreFromClover.h
|
||||
}
|
||||
OpenCorePkg/Library/OcAppleChunklistLib/OcAppleChunklistLib.inf {
|
||||
<BuildOptions>
|
||||
*_*_*_CC_FLAGS = -include OpenCoreFromClover.h
|
||||
}
|
||||
OpenCorePkg/Library/OcAppleDiskImageLib/OcAppleDiskImageLib.inf {
|
||||
<BuildOptions>
|
||||
*_*_*_CC_FLAGS = -include OpenCoreFromClover.h
|
||||
}
|
||||
OpenCorePkg/Library/OcAppleKeyMapLib/OcAppleKeyMapLib.inf {
|
||||
<BuildOptions>
|
||||
*_*_*_CC_FLAGS = -include OpenCoreFromClover.h
|
||||
}
|
||||
OpenCorePkg/Library/OcAppleKeysLib/OcAppleKeysLib.inf {
|
||||
<BuildOptions>
|
||||
*_*_*_CC_FLAGS = -include OpenCoreFromClover.h
|
||||
}
|
||||
OpenCorePkg/Library/OcAppleRamDiskLib/OcAppleRamDiskLib.inf {
|
||||
<BuildOptions>
|
||||
*_*_*_CC_FLAGS = -include OpenCoreFromClover.h
|
||||
}
|
||||
OpenCorePkg/Library/OcBootManagementLib/OcBootManagementLib.inf {
|
||||
<BuildOptions>
|
||||
*_*_*_CC_FLAGS = -include OpenCoreFromClover.h
|
||||
}
|
||||
OpenCorePkg/Library/OcCompressionLib/OcCompressionLib.inf {
|
||||
<BuildOptions>
|
||||
*_*_*_CC_FLAGS = -include OpenCoreFromClover.h
|
||||
}
|
||||
OpenCorePkg/Library/OcConsoleLib/OcConsoleLib.inf {
|
||||
<BuildOptions>
|
||||
*_*_*_CC_FLAGS = -include OpenCoreFromClover.h
|
||||
}
|
||||
OpenCorePkg/Library/OcCpuLib/OcCpuLib.inf {
|
||||
<BuildOptions>
|
||||
*_*_*_CC_FLAGS = -include OpenCoreFromClover.h
|
||||
}
|
||||
OpenCorePkg/Library/OcCryptoLib/OcCryptoLib.inf {
|
||||
<BuildOptions>
|
||||
*_*_*_CC_FLAGS = -include OpenCoreFromClover.h
|
||||
}
|
||||
OpenCorePkg/Library/OcDevicePathLib/OcDevicePathLib.inf {
|
||||
<BuildOptions>
|
||||
*_*_*_CC_FLAGS = -include OpenCoreFromClover.h
|
||||
}
|
||||
OpenCorePkg/Library/OcFileLib/OcFileLib.inf {
|
||||
<BuildOptions>
|
||||
*_*_*_CC_FLAGS = -include OpenCoreFromClover.h
|
||||
}
|
||||
OpenCorePkg/Library/OcMemoryLib/OcMemoryLib.inf {
|
||||
<BuildOptions>
|
||||
*_*_*_CC_FLAGS = -include OpenCoreFromClover.h
|
||||
}
|
||||
OpenCorePkg/Library/OcMiscLib/OcMiscLib.inf {
|
||||
<BuildOptions>
|
||||
*_*_*_CC_FLAGS = -include OpenCoreFromClover.h
|
||||
}
|
||||
OpenCorePkg/Library/OcOSInfoLib/OcOSInfoLib.inf {
|
||||
<BuildOptions>
|
||||
*_*_*_CC_FLAGS = -include OpenCoreFromClover.h
|
||||
}
|
||||
OpenCorePkg/Library/OcRngLib/OcRngLib.inf {
|
||||
<BuildOptions>
|
||||
*_*_*_CC_FLAGS = -include OpenCoreFromClover.h
|
||||
}
|
||||
OpenCorePkg/Library/OcRtcLib/OcRtcLib.inf {
|
||||
<BuildOptions>
|
||||
*_*_*_CC_FLAGS = -include OpenCoreFromClover.h
|
||||
}
|
||||
OpenCorePkg/Library/OcSerializeLib/OcSerializeLib.inf {
|
||||
<BuildOptions>
|
||||
*_*_*_CC_FLAGS = -include OpenCoreFromClover.h
|
||||
}
|
||||
OpenCorePkg/Library/OcStringLib/OcStringLib.inf {
|
||||
<BuildOptions>
|
||||
*_*_*_CC_FLAGS = -include OpenCoreFromClover.h
|
||||
}
|
||||
OpenCorePkg/Library/OcStorageLib/OcStorageLib.inf {
|
||||
<BuildOptions>
|
||||
*_*_*_CC_FLAGS = -include OpenCoreFromClover.h
|
||||
}
|
||||
OpenCorePkg/Library/OcTemplateLib/OcTemplateLib.inf {
|
||||
<BuildOptions>
|
||||
*_*_*_CC_FLAGS = -include OpenCoreFromClover.h
|
||||
}
|
||||
OpenCorePkg/Library/OcXmlLib/OcXmlLib.inf {
|
||||
<BuildOptions>
|
||||
*_*_*_CC_FLAGS = -include OpenCoreFromClover.h
|
||||
}
|
||||
OpenCorePkg/Library/OcDeviceTreeLib/OcDeviceTreeLib.inf {
|
||||
<BuildOptions>
|
||||
*_*_*_CC_FLAGS = -include OpenCoreFromClover.h
|
||||
}
|
||||
OpenCorePkg/Library/OcDataHubLib/OcDataHubLib.inf {
|
||||
<BuildOptions>
|
||||
*_*_*_CC_FLAGS = -include OpenCoreFromClover.h
|
||||
}
|
||||
OpenCorePkg/Library/OcAppleImg4Lib/OcAppleImg4Lib.inf {
|
||||
<BuildOptions>
|
||||
*_*_*_CC_FLAGS = -include OpenCoreFromClover.h
|
||||
}
|
||||
OpenCorePkg/Library/OcAppleKernelLib/OcAppleKernelLib.inf {
|
||||
<BuildOptions>
|
||||
*_*_*_CC_FLAGS = -include OpenCoreFromClover.h
|
||||
}
|
||||
OpenCorePkg/Library/OcMachoLib/OcMachoLib.inf {
|
||||
<BuildOptions>
|
||||
*_*_*_CC_FLAGS = -include OpenCoreFromClover.h
|
||||
}
|
||||
OpenCorePkg/Library/OcVirtualFsLib/OcVirtualFsLib.inf {
|
||||
<BuildOptions>
|
||||
*_*_*_CC_FLAGS = -include OpenCoreFromClover.h
|
||||
}
|
||||
OpenCorePkg/Library/OcMacInfoLib/OcMacInfoLib.inf {
|
||||
<BuildOptions>
|
||||
*_*_*_CC_FLAGS = -include OpenCoreFromClover.h
|
||||
}
|
||||
OpenCorePkg/Library/OcApfsLib/OcApfsLib.inf {
|
||||
<BuildOptions>
|
||||
*_*_*_CC_FLAGS = -include OpenCoreFromClover.h
|
||||
}
|
||||
OpenCorePkg/Library/OcAppleSecureBootLib/OcAppleSecureBootLib.inf {
|
||||
<BuildOptions>
|
||||
*_*_*_CC_FLAGS = -include OpenCoreFromClover.h
|
||||
}
|
||||
OpenCorePkg/Library/OcAppleImageVerificationLib/OcAppleImageVerificationLib.inf {
|
||||
<BuildOptions>
|
||||
*_*_*_CC_FLAGS = -include OpenCoreFromClover.h
|
||||
}
|
||||
OpenCorePkg/Library/OcDriverConnectionLib/OcDriverConnectionLib.inf {
|
||||
<BuildOptions>
|
||||
*_*_*_CC_FLAGS = -include OpenCoreFromClover.h
|
||||
}
|
||||
#OcDebugLogLib|OpenCorePkg/Library/OcDebugLogLib/OcDebugLogLib.inf
|
||||
OpenCorePkg/Library/OcAcpiLib/OcAcpiLib.inf {
|
||||
<BuildOptions>
|
||||
*_*_*_CC_FLAGS = -include OpenCoreFromClover.h
|
||||
}
|
||||
OpenCorePkg/Library/OcAppleEventLib/OcAppleEventLib.inf {
|
||||
<BuildOptions>
|
||||
*_*_*_CC_FLAGS = -include OpenCoreFromClover.h
|
||||
}
|
||||
#OcAppleImageConversionLib|OpenCorePkg/Library/OcAppleImageConversionLib/OcAppleImageConversionLib.inf
|
||||
OpenCorePkg/Library/OcAudioLib/OcAudioLib.inf {
|
||||
<BuildOptions>
|
||||
*_*_*_CC_FLAGS = -include OpenCoreFromClover.h
|
||||
}
|
||||
OpenCorePkg/Library/OcInputLib/OcInputLib.inf {
|
||||
<BuildOptions>
|
||||
*_*_*_CC_FLAGS = -include OpenCoreFromClover.h
|
||||
}
|
||||
OpenCorePkg/Library/OcAppleUserInterfaceThemeLib/OcAppleUserInterfaceThemeLib.inf {
|
||||
<BuildOptions>
|
||||
*_*_*_CC_FLAGS = -include OpenCoreFromClover.h
|
||||
}
|
||||
OpenCorePkg/Library/OcConfigurationLib/OcConfigurationLib.inf {
|
||||
<BuildOptions>
|
||||
*_*_*_CC_FLAGS = -include OpenCoreFromClover.h
|
||||
}
|
||||
OpenCorePkg/Library/OcDevicePropertyLib/OcDevicePropertyLib.inf {
|
||||
<BuildOptions>
|
||||
*_*_*_CC_FLAGS = -include OpenCoreFromClover.h
|
||||
}
|
||||
OpenCorePkg/Library/OcFirmwareVolumeLib/OcFirmwareVolumeLib.inf {
|
||||
<BuildOptions>
|
||||
*_*_*_CC_FLAGS = -include OpenCoreFromClover.h
|
||||
}
|
||||
OpenCorePkg/Library/OcHashServicesLib/OcHashServicesLib.inf {
|
||||
<BuildOptions>
|
||||
*_*_*_CC_FLAGS = -include OpenCoreFromClover.h
|
||||
}
|
||||
OpenCorePkg/Library/OcSmbiosLib/OcSmbiosLib.inf {
|
||||
<BuildOptions>
|
||||
*_*_*_CC_FLAGS = -include OpenCoreFromClover.h
|
||||
}
|
||||
OpenCorePkg/Library/OcSmcLib/OcSmcLib.inf {
|
||||
<BuildOptions>
|
||||
*_*_*_CC_FLAGS = -include OpenCoreFromClover.h
|
||||
}
|
||||
OpenCorePkg/Library/OcUnicodeCollationEngLib/OcUnicodeCollationEngGenericLib.inf {
|
||||
<BuildOptions>
|
||||
*_*_*_CC_FLAGS = -include OpenCoreFromClover.h
|
||||
}
|
||||
OpenCorePkg/Library/OcPeCoffLib/OcPeCoffLib.inf {
|
||||
<BuildOptions>
|
||||
*_*_*_CC_FLAGS = -include OpenCoreFromClover.h
|
||||
}
|
||||
#OcPngLib|OpenCorePkg/Library/OcPngLib/OcPngLib.inf
|
||||
OpenCorePkg/Platform/OpenCore/OpenCoreLib.inf {
|
||||
<BuildOptions>
|
||||
*_*_*_CC_FLAGS = -include OpenCoreFromClover.h
|
||||
}
|
||||
|
||||
|
||||
#DuetPkg/BootSector/BootSector.inf
|
||||
|
||||
#DuetPkg/DxeIpl/DxeIpl.inf {
|
||||
@ -552,8 +763,7 @@
|
||||
gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x07
|
||||
gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0xFFFFFFFF
|
||||
<LibraryClasses>
|
||||
DebugLib|OpenCorePkg/Library/OcDebugLogLib/OcDebugLogLib.inf
|
||||
#DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf
|
||||
DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf
|
||||
SerialPortLib|MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.inf
|
||||
}
|
||||
|
||||
@ -641,8 +851,7 @@
|
||||
gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0xFFFFFFFF
|
||||
<LibraryClasses>
|
||||
SerialPortLib|MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.inf
|
||||
DebugLib|OpenCorePkg/Library/OcDebugLogLib/OcDebugLogLib.inf
|
||||
#DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf
|
||||
DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf
|
||||
DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf
|
||||
}
|
||||
!else
|
||||
@ -671,8 +880,7 @@
|
||||
gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0xFFFFFFFF
|
||||
<LibraryClasses>
|
||||
SerialPortLib|MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.inf
|
||||
DebugLib|OpenCorePkg/Library/OcDebugLogLib/OcDebugLogLib.inf
|
||||
#DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf
|
||||
DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf
|
||||
DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf
|
||||
}
|
||||
!else
|
||||
@ -748,7 +956,7 @@ DEFINE EXIT_USBKB_FLAG = -DEXIT_USBKB
|
||||
!endif
|
||||
|
||||
|
||||
DEFINE BUILD_OPTIONS=-DCLOVER_BUILD $(VBIOS_PATCH_CLOVEREFI_FLAG) $(ONLY_SATA_0_FLAG) $(BLOCKIO_FLAG) $(NOUSB_FLAG) $(NOUDMA_FLAG) $(AMD_FLAG) $(SECURE_BOOT_FLAG) $(ANDX86_FLAG) $(PS2MOUSE_LEGACYBOOT_FLAG) $(DEBUG_ON_SERIAL_PORT_FLAG) $(EXIT_USBKB_FLAG)
|
||||
DEFINE BUILD_OPTIONS=-DMDEPKG_NDEBUG -DCLOVER_BUILD $(VBIOS_PATCH_CLOVEREFI_FLAG) $(ONLY_SATA_0_FLAG) $(BLOCKIO_FLAG) $(NOUSB_FLAG) $(NOUDMA_FLAG) $(AMD_FLAG) $(SECURE_BOOT_FLAG) $(ANDX86_FLAG) $(PS2MOUSE_LEGACYBOOT_FLAG) $(DEBUG_ON_SERIAL_PORT_FLAG) $(EXIT_USBKB_FLAG)
|
||||
|
||||
#MSFT:*_*_*_CC_FLAGS = /FAcs /FR$(@R).SBR /wd4701 /wd4703 $(BUILD_OPTIONS)
|
||||
MSFT:*_*_*_CC_FLAGS = /FAcs $(BUILD_OPTIONS) -Dinline=__inline /Zi -D DISABLE_NEW_DEPRECATED_INTERFACES -D OC_TARGET_DEBUG
|
||||
|
@ -194,6 +194,9 @@
|
||||
## Include/Protocol/OcAudio.h
|
||||
gOcAudioProtocolGuid = {0x4B228577, 0x6274, 0x4A48, {0x82, 0xAE, 0x07, 0x13, 0xA1, 0x17, 0x19, 0x87}}
|
||||
|
||||
gEfiDataHubProtocolGuid = { 0xAE80D021, 0x618E, 0x11D4, { 0xBC, 0xD7, 0x00, 0x80, 0xC7, 0x3C, 0x88, 0x81 }}
|
||||
gEfiProcessorSubClassGuid = { 0x26fdeb7e, 0xb8af, 0x4ccf, { 0xaa, 0x97, 0x02, 0x63, 0x3c, 0xe4, 0x8c, 0xa7 }}
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -58,6 +58,8 @@
|
||||
gEfiDiskIoProtocolGuid
|
||||
gEfiDiskIo2ProtocolGuid
|
||||
gEfiGraphicsOutputProtocolGuid
|
||||
gEfiDataHubProtocolGuid ## PRODUCES
|
||||
gEfiProcessorSubClassGuid
|
||||
|
||||
[Depex]
|
||||
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit d17192301a02083188e358cec281a072729a1d5e
|
||||
Subproject commit bc0b403c614504c083c28c89f6a85494d5b492fd
|
@ -67,7 +67,7 @@
|
||||
BaseLib
|
||||
UefiLib
|
||||
UefiDriverEntryPoint
|
||||
#OcDataHubLib
|
||||
OcDataHubLib
|
||||
|
||||
|
||||
[Protocols]
|
||||
|
@ -39,6 +39,11 @@ then
|
||||
fi
|
||||
> ./serial0_qemu_out.log # empty file without erasing it. Useful for editor for refreshing and reloading.
|
||||
|
||||
if ! [ -f "$SCRIPT_DIR"/disk_image_gpt.img ]
|
||||
then
|
||||
unzip -o "$SCRIPT_DIR"/disk_image_gpt.img.zip
|
||||
rm -rf "$SCRIPT_DIR"/__MACOSX
|
||||
fi
|
||||
hdiutil attach ./disk_image_gpt.img || exit 1
|
||||
|
||||
shopt -s nocasematch
|
||||
@ -67,6 +72,7 @@ then
|
||||
-device VGA,vgamem_mb=64,edid=on,xres=1024,yres=768 \
|
||||
-device ahci,id=ahi \
|
||||
-drive format=raw,id=hda,file=./disk_image_gpt.img \
|
||||
-cdrom "/JiefLand/3.Infos/3.Infos-Mac/MacOs/11.0.20A5343j Big Sur/BigSurInstall.iso" \
|
||||
-usb \
|
||||
-device usb-mouse,bus=usb-bus.0,port=2 \
|
||||
-device usb-kbd,bus=usb-bus.0,port=1 \
|
||||
|
@ -57,7 +57,7 @@ PrintBytes(IN VOID *Bytes, IN UINTN Number)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static EFI_FILE_PROTOCOL* gLogFile = NULL;
|
||||
|
||||
EFI_FILE_PROTOCOL* GetDebugLogFile()
|
||||
{
|
||||
@ -66,6 +66,8 @@ EFI_FILE_PROTOCOL* GetDebugLogFile()
|
||||
EFI_FILE_PROTOCOL *RootDir;
|
||||
EFI_FILE_PROTOCOL *LogFile;
|
||||
|
||||
if ( gLogFile ) return gLogFile;
|
||||
|
||||
// get RootDir from device we are loaded from
|
||||
Status = gBS->HandleProtocol(gImageHandle, &gEfiLoadedImageProtocolGuid, (VOID **) &LoadedImage);
|
||||
if (EFI_ERROR(Status)) {
|
||||
@ -108,12 +110,14 @@ EFI_FILE_PROTOCOL* GetDebugLogFile()
|
||||
LogFile = NULL;
|
||||
}
|
||||
|
||||
gLogFile = LogFile;
|
||||
return LogFile;
|
||||
}
|
||||
|
||||
|
||||
VOID SaveMessageToDebugLogFile(IN CHAR8 *LastMessage)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
STATIC BOOLEAN FirstTimeSave = TRUE;
|
||||
// STATIC UINTN Position = 0;
|
||||
CHAR8 *MemLogBuffer;
|
||||
@ -134,7 +138,7 @@ VOID SaveMessageToDebugLogFile(IN CHAR8 *LastMessage)
|
||||
// Advance to the EOF so we append
|
||||
EFI_FILE_INFO *Info = EfiLibFileInfo(LogFile);
|
||||
if (Info) {
|
||||
LogFile->SetPosition(LogFile, Info->FileSize);
|
||||
Status = LogFile->SetPosition(LogFile, Info->FileSize);
|
||||
// If we haven't had root before this write out whole log
|
||||
if (FirstTimeSave) {
|
||||
Text = MemLogBuffer;
|
||||
@ -142,9 +146,11 @@ VOID SaveMessageToDebugLogFile(IN CHAR8 *LastMessage)
|
||||
FirstTimeSave = FALSE;
|
||||
}
|
||||
// Write out this message
|
||||
LogFile->Write(LogFile, &TextLen, Text);
|
||||
Status = LogFile->Write(LogFile, &TextLen, Text);
|
||||
Status = LogFile->Flush(LogFile);
|
||||
(void)Status;
|
||||
}
|
||||
LogFile->Close(LogFile);
|
||||
// LogFile->Close(LogFile);
|
||||
}
|
||||
}
|
||||
|
||||
@ -228,3 +234,25 @@ EFI_STATUS SaveBooterLog(IN EFI_FILE_HANDLE BaseDir OPTIONAL, IN CONST CHAR16 *F
|
||||
return egSaveFile(BaseDir, FileName, (UINT8*)MemLogBuffer, MemLogLen);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Redirection of OpenCore log to Clover Log.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This function is called from OpenCore when there is a DEBUG ((expression))
|
||||
* Mapping from DEBUG to DebugLogForOC is made in OpenCoreFromClover.h
|
||||
*/
|
||||
VOID EFIAPI DebugLogForOC(IN INTN DebugLevel, IN CONST CHAR8 *FormatString, ...)
|
||||
{
|
||||
VA_LIST Marker;
|
||||
|
||||
if (FormatString == NULL ) return;
|
||||
|
||||
// Print message to log buffer
|
||||
VA_START(Marker, FormatString);
|
||||
MemLogVA(TRUE, 1, FormatString, Marker);
|
||||
VA_END(Marker);
|
||||
}
|
||||
|
@ -10,12 +10,9 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
#include <Uefi/UefiBaseType.h>
|
||||
#include <Protocol/SimpleFileSystem.h> // for EFI_FILE_HANDLE
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
|
||||
//#define SAFE_LOG_SIZE 80
|
||||
//#define MSG_LOG_SIZE (256 * 1024)
|
||||
@ -60,4 +57,18 @@ PrintBytes (
|
||||
IN UINTN Number
|
||||
);
|
||||
|
||||
|
||||
/*
|
||||
* OpenCore
|
||||
*/
|
||||
// This use the EDK format
|
||||
VOID EFIAPI DebugLogForOC(IN INTN DebugLevel, IN CONST CHAR8 *FormatString, ...);
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -353,7 +353,8 @@
|
||||
BaseDebugPrintErrorLevelLib
|
||||
BaseSerialPortLib
|
||||
OpenCoreLib
|
||||
OcDebugLogLib
|
||||
#OcDebugLogLib
|
||||
OcDebugLogLibOc2Clover
|
||||
|
||||
[Guids]
|
||||
gEfiAcpiTableGuid
|
||||
|
@ -1007,7 +1007,7 @@ extern "C" {
|
||||
#include <Library/OcVirtualFsLib.h>
|
||||
#include <Library/OcConfigurationLib.h>
|
||||
#include <Library/OcDevicePathLib.h>
|
||||
#include <Library/OcDebugLogLib.h>
|
||||
|
||||
extern OC_GLOBAL_CONFIG mOpenCoreConfiguration;
|
||||
extern OC_STORAGE_CONTEXT mOpenCoreStorage;
|
||||
extern OC_CPU_INFO mOpenCoreCpuInfo;
|
||||
@ -1396,9 +1396,9 @@ DBG("Beginning OC\n");
|
||||
if ( GlobalConfig.DebugLog ) {
|
||||
mOpenCoreConfiguration.Misc.Debug.AppleDebug = true;
|
||||
mOpenCoreConfiguration.Misc.Debug.ApplePanic = true;
|
||||
mOpenCoreConfiguration.Misc.Debug.DisableWatchDog = true;
|
||||
mOpenCoreConfiguration.Misc.Debug.DisplayLevel = 2151678018;
|
||||
mOpenCoreConfiguration.Misc.Debug.Target = 65;
|
||||
// mOpenCoreConfiguration.Misc.Debug.DisableWatchDog = true; // already done by Clover ?
|
||||
mOpenCoreConfiguration.Misc.Debug.DisplayLevel = 0x80400042;
|
||||
mOpenCoreConfiguration.Misc.Debug.Target = 0x41;
|
||||
}
|
||||
|
||||
OC_STRING_ASSIGN(mOpenCoreConfiguration.Misc.Security.SecureBootModel, "Disabled");
|
||||
@ -2424,26 +2424,6 @@ RefitMain (IN EFI_HANDLE ImageHandle,
|
||||
|
||||
construct_globals_objects(gImageHandle); // do this after SelfLoadedImage is initialized
|
||||
|
||||
// UINT64 CPUFrequencyFromART;
|
||||
// InternalCalculateARTFrequencyIntel(&CPUFrequencyFromART, NULL, 1);
|
||||
//
|
||||
// EFI_LOADED_IMAGE* OcLoadedImage;
|
||||
// Status = gBS->HandleProtocol(gImageHandle, &gEfiLoadedImageProtocolGuid, (VOID **) &OcLoadedImage);
|
||||
// EFI_SIMPLE_FILE_SYSTEM_PROTOCOL* FileSystem = LocateFileSystem(OcLoadedImage->DeviceHandle, OcLoadedImage->FilePath);
|
||||
// Status = OcStorageInitFromFs(&mOpenCoreStorage, FileSystem, L"EFI\\CLOVER", NULL);
|
||||
//
|
||||
// OcConfigureLogProtocol (
|
||||
// 9,
|
||||
// 0,
|
||||
// 2151678018,
|
||||
// 2147483648,
|
||||
// OPEN_CORE_LOG_PREFIX_PATH,
|
||||
// mOpenCoreStorage.FileSystem
|
||||
// );
|
||||
// DEBUG ((DEBUG_INFO, "OC: Log initialized...\n"));
|
||||
// OcAppleDebugLogInstallProtocol(0);
|
||||
|
||||
|
||||
|
||||
#ifdef JIEF_DEBUG
|
||||
// all_tests();
|
||||
|
Loading…
Reference in New Issue
Block a user