join kext and kernel patches

Signed-off-by: SergeySlice <sergey.slice@gmail.com>
This commit is contained in:
SergeySlice 2020-10-03 17:16:11 +03:00
parent 53b163c57c
commit 2286f19503
4 changed files with 15 additions and 13 deletions

View File

@ -6,8 +6,8 @@
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Clover r5120\n"
"POT-Creation-Date: 2020-07-17 15:12+0200\n"
"Project-Id-Version: Clover r5122\n"
"POT-Creation-Date: 2020-10-03 15:30+0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"

View File

@ -21,11 +21,6 @@
#include <Platform.h> // Only use angled for Platform, else, xcode project won't compile
extern "C" {
//#include "../../OpenCorePkg/Include/Acidanthera/OpenCore.h"
//#include "../../OpenCorePkg/Include/Acidanthera/Library/OcConsoleLib.h"
}
STATIC EFI_CONSOLE_CONTROL_SCREEN_MODE CurrentMode = EfiConsoleControlScreenText;
EFI_STATUS

View File

@ -859,8 +859,8 @@ if ( Prop ) panic("config.plist/KernelAndKextPatches/OcKernelCache has been move
// }
{
const TagDict* OcQuirksDict = DictPointer->dictPropertyForKey("OcQuirks");
if ( OcQuirksDict ) panic("config.plist/KernelAndKextPatches/OcQuirks has been merged in the config.plist/Quirks section. Update your config.plist");
// const TagDict* OcQuirksDict = DictPointer->dictPropertyForKey("OcQuirks");
//if ( OcQuirksDict ) panic("config.plist/KernelAndKextPatches/OcQuirks has been merged in the config.plist/Quirks section. Update your config.plist");
// if ( OcQuirksDict )
// {
// Prop = OcQuirksDict->propertyForKey("AppleCpuPmCfgLock");
@ -1267,6 +1267,8 @@ if ( OcQuirksDict ) panic("config.plist/KernelAndKextPatches/OcQuirks has been m
}
DBG(" %s", newKernelPatch.Label.c_str());
newKernelPatch.Name = "kernel"_XS8;
prop3 = Prop2->propertyForKey("Disabled");
newKernelPatch.MenuItem.BValue = !IsPropertyNotNullAndTrue(prop3);
@ -1392,9 +1394,10 @@ if ( OcQuirksDict ) panic("config.plist/KernelAndKextPatches/OcQuirks has been m
MsgLog("ATTENTION : Comment property not string in KernelToPatch\n");
}
}
DBG(" %s", newBootPatch.Label.c_str());
newBootPatch.Name = "boot.efi"_XS8;
prop3 = Prop2->propertyForKey("Disabled");
newBootPatch.MenuItem.BValue = !IsPropertyNotNullAndTrue(prop3);
newBootPatch.MenuItem.ItemType = BoolValue;

View File

@ -1053,6 +1053,10 @@ DBG("Beginning OC\n");
{
if ( KernelAndKextPatches.KextPatches[kextPatchIdx].MenuItem.BValue ) selectedPathArray.AddReference(&KernelAndKextPatches.KextPatches[kextPatchIdx], false);
}
for (size_t kernelPatchIdx = 0 ; kernelPatchIdx < KernelAndKextPatches.KernelPatches.size() ; kernelPatchIdx++ )
{
if ( KernelAndKextPatches.KernelPatches[kernelPatchIdx].MenuItem.BValue ) selectedPathArray.AddReference(&KernelAndKextPatches.KernelPatches[kernelPatchIdx], false);
}
mOpenCoreConfiguration.Kernel.Patch.Count = (UINT32)selectedPathArray.size();
mOpenCoreConfiguration.Kernel.Patch.AllocCount = mOpenCoreConfiguration.Kernel.Patch.Count;
mOpenCoreConfiguration.Kernel.Patch.ValueSize = sizeof(__typeof_am__(**mOpenCoreConfiguration.Kernel.Patch.Values));
@ -1060,8 +1064,8 @@ DBG("Beginning OC\n");
memset(mOpenCoreConfiguration.Kernel.Patch.Values, 0, mOpenCoreConfiguration.Kernel.Patch.AllocCount*sizeof(*mOpenCoreConfiguration.Kernel.Patch.Values));
for (size_t kextPatchIdx = 0 ; kextPatchIdx < selectedPathArray.size() ; kextPatchIdx++ )
{
const KEXT_PATCH& kextPatch = selectedPathArray[kextPatchIdx];
DBG("Bridge kext patch to OC : %s\n", kextPatch.Label.c_str());
const KEXT_PATCH& kextPatch = selectedPathArray[kextPatchIdx]; //as well as kernel patches
DBG("Bridge %s patch to OC : %s\n", kextPatch.Name.c_str(), kextPatch.Label.c_str());
mOpenCoreConfiguration.Kernel.Patch.Values[kextPatchIdx] = (__typeof_am__(*mOpenCoreConfiguration.Kernel.Patch.Values))AllocateZeroPool(mOpenCoreConfiguration.Kernel.Patch.ValueSize); // sizeof(OC_KERNEL_ADD_ENTRY) == 680
OC_STRING_ASSIGN(mOpenCoreConfiguration.Kernel.Patch.Values[kextPatchIdx]->Arch, OC_BLOB_GET(&mOpenCoreConfiguration.Kernel.Scheme.KernelArch));
OC_STRING_ASSIGN(mOpenCoreConfiguration.Kernel.Patch.Values[kextPatchIdx]->Base, kextPatch.ProcedureName.c_str());
@ -1088,7 +1092,7 @@ DBG("Beginning OC\n");
mOpenCoreConfiguration.Uefi.Output.ProvideConsoleGop = FALSE; //gSettings.ProvideConsoleGop;
OcProvideConsoleGop(gSettings.ProvideConsoleGop);
OcProvideConsoleGop(gSettings.ProvideConsoleGop); //do it before OcMain
OC_STRING_ASSIGN(mOpenCoreConfiguration.Uefi.Output.Resolution, XString8(GlobalConfig.ScreenResolution).c_str());
OcMain(&mOpenCoreStorage, NULL);