Micky1979 Posted January 24, 2017 Share Posted January 24, 2017 ok, time for me to update Pandora. Thanks @polyzaregone for testing with me working 10.12.3, 10.12.4. https://applelife.ru/threads/clover.42089/page-694#post-639537 thanks for testing. Can you add the link to insanelymac to that "tiny" patch on AppleLife? thanks 2 Link to comment https://www.insanelymac.com/forum/topic/284656-clover-general-discussion/page/484/#findComment-2356550 Share on other sites More sharing options...
polyzargone Posted January 24, 2017 Share Posted January 24, 2017 Thanks to you for your responsiveness ! 2 Link to comment https://www.insanelymac.com/forum/topic/284656-clover-general-discussion/page/484/#findComment-2356554 Share on other sites More sharing options...
PMheart Posted January 25, 2017 Share Posted January 25, 2017 ok, the time to compile Clover with this: UINT8 KBESieSearchEXT[] = { 0xE8, 0x25, 0x00, 0x00, 0x00, 0xEB, 0x05, 0xE8, 0x9E, 0x05, 0x00, 0x00 }; UINT8 KBESieReplaceEXT[] = { 0xE8, 0x25, 0x00, 0x00, 0x00, 0x90, 0x90, 0xE8, 0x9E, 0x05, 0x00, 0x00 } //UINT8 KBESieSearchEXT[] = { 0xE8, 0x25, 0x00, 0x00, 0x00, 0xEB, 0x05, 0xE8, 0x7E, 0x05, 0x00, 0x00 }; //UINT8 KBESieReplaceEXT[] = { 0xE8, 0x25, 0x00, 0x00, 0x00, 0x90, 0x90, 0xE8, 0x7E, 0x05, 0x00, 0x00 }; 2 minutes.. Warning: this will fail to boot extensions in 10.12, 10.12.1, 10.12.2 and 10.12.3 from Clover dir. You should try to boot only 10.12.4 from usb. If works later will be udjusted Hi. Why not delete 'e8 9e 05 00 00'? The only thing we should do is 'eb 05' ==> '90 90'. And I can assure that only one set of this data can be found. BTW. Tested. KernelPm/KernelCPU/KernelLapic/AppleRTC/FakeCPUID will still work. Link to comment https://www.insanelymac.com/forum/topic/284656-clover-general-discussion/page/484/#findComment-2356608 Share on other sites More sharing options...
Sherlocks Posted January 25, 2017 Share Posted January 25, 2017 @Micky1979 nice work. thank you @Slice i cleaned up kext_inject.c. we dont need +// Sierra debug kernel+UINT8 KBESieDebugSearchEXT[] = { 0xE8, 0x47, 0x00, 0x00, 0x00, 0xE9, 0x09, 0x00, 0x00, 0x00, 0x48, 0x8B, 0x7D, 0xE8, 0xE8, 0xD9 };+UINT8 KBESieDebugReplaceEXT[] = { 0xE8, 0x47, 0x00, 0x00, 0x00, 0x90, 0x90, 0x00, 0x00, 0x00, 0x48, 0x8B, 0x7D, 0xE8, 0xE8, 0xD9 };+UINT8 KBESieDebugSearchSIP[] = { 0x31, 0xC9, 0x39, 0xC1, 0x0F, 0x85, 0x3C, 0x00, 0x00, 0x00, 0x48, 0x8B, 0x85, 0xF8, 0xFE, 0xFF };+UINT8 KBESieDebugReplaceSIP[] = { 0x31, 0xC9, 0x39, 0xC1, 0xEB, 0x80, 0x90, 0x90, 0x90, 0x90, 0x48, 0x8B, 0x85, 0xF8, 0xFE, 0xFF };++// Sierra develop kernel+UINT8 KBESieDevelSearchEXT[] = { 0xE8, 0x47, 0x00, 0x00, 0x00, 0xE9, 0x09, 0x00, 0x00, 0x00, 0x48, 0x8B, 0x7D, 0xE8, 0xE8, 0xD9 };+UINT8 KBESieDevelReplaceEXT[] = { 0xE8, 0x47, 0x00, 0x00, 0x00, 0x90, 0x90, 0x00, 0x00, 0x00, 0x48, 0x8B, 0x7D, 0xE8, 0xE8, 0xD9 };+UINT8 KBESieDevelSearchSIP[] = { 0x31, 0xC9, 0x39, 0xC1, 0x0F, 0x85, 0x3C, 0x00, 0x00, 0x00, 0x48, 0x8B, 0x85, 0xF8, 0xFE, 0xFF };+UINT8 KBESieDevelReplaceSIP[] = { 0x31, 0xC9, 0x39, 0xC1, 0xEB, 0x80, 0x90, 0x90, 0x90, 0x90, 0x48, 0x8B, 0x85, 0xF8, 0xFE, 0xFF }; it's same hex code. we have to choose one(just prefer to choose name name. not important name) clover always enter + else if (NumSieDebug == 1) { + else if (NumSieDebug == 1) {+ Num = SearchAndReplace(Kernel, KERNEL_MAX_SIZE, KBESieDebugSearchEXT, sizeof(KBESieDebugSearchEXT), KBESieDebugReplaceEXT, 1) ++ SearchAndReplace(Kernel, KERNEL_MAX_SIZE, KBESieDebugSearchSIP, sizeof(KBESieDebugSearchSIP), KBESieDebugReplaceSIP, 1);+ DBG_RT(Entry, "==> kernel Sierra Debug: %d replaces done.\n", Num);+ }+ else if (NumSieDevel == 1) {+ Num = SearchAndReplace(Kernel, KERNEL_MAX_SIZE, KBESieDevelSearchEXT, sizeof(KBESieDevelSearchEXT), KBESieDevelReplaceEXT, 1) ++ SearchAndReplace(Kernel, KERNEL_MAX_SIZE, KBESieDevelSearchSIP, sizeof(KBESieDevelSearchSIP), KBESieDevelReplaceSIP, 1);+ DBG_RT(Entry, "==> kernel Sierra Development: %d replaces done.\n", Num);+ }+ never enter + else if (NumSieDevel == 1) {. because same hex code. if one of hex code has difference, i never mention it now i remove this one and added 10.12.4+ hex code by micky thank you kext_inject.c-clean2.zip 2 Link to comment https://www.insanelymac.com/forum/topic/284656-clover-general-discussion/page/484/#findComment-2356629 Share on other sites More sharing options...
PMheart Posted January 25, 2017 Share Posted January 25, 2017 (edited) @Micky1979 nice work. thank you @Slice i cleaned up kext_inject.c. we dont need it's same hex code. we have to choose one(just prefer to choose name name. not important name) clover always enter + else if (NumSieDebug == 1) { never enter + else if (NumSieDevel == 1) {. because same hex code. i remove this one and added 10.12.4+ hex code by micky thank you I think there's a typo... KBESie4*EXT is for 10.12.0 - 10.12.3, and KBESie*EXT is for 10.12.4+... You can check the hex code. (Previously it's 'e8 7e' and now it's 'e8 9e'.) BTW. I think the code for KBESieDebugReplaceEXT is wrong. Only NOP out 'e9 09' is not enough. Actually the 'e9 09 00 00 00' is the integrated jmpq and thus we should fill it with '90 90 90 90 90' (5x NOPs). Edit: Here is the fixed one.. Edited January 25, 2017 by PMheart 1 Link to comment https://www.insanelymac.com/forum/topic/284656-clover-general-discussion/page/484/#findComment-2356647 Share on other sites More sharing options...
Sherlocks Posted January 25, 2017 Share Posted January 25, 2017 I think there's a typo... KBESie4*EXT is for 10.12.0 - 10.12.3, and KBESie*EXT is for 10.12.4+... You can check the hex code. (Previously it's 'e8 7e' and now it's 'e8 9e'.) Edit: Here is the fixed one.. new_kext_inject.c.zip i take a micky code. your are right. i checked old hex code. i changed kext_inject.c now 2 Link to comment https://www.insanelymac.com/forum/topic/284656-clover-general-discussion/page/484/#findComment-2356655 Share on other sites More sharing options...
PMheart Posted January 25, 2017 Share Posted January 25, 2017 i take a micky code. your are right. i checked old hex code. i changed kext_inject.c nowI updated it. Check above. Link to comment https://www.insanelymac.com/forum/topic/284656-clover-general-discussion/page/484/#findComment-2356656 Share on other sites More sharing options...
Sherlocks Posted January 25, 2017 Share Posted January 25, 2017 I updated it. Check above. checked. you just did change hex order. "(Previously it's 'e8 7e' and now it's 'e8 9e'.)" UINT8 KBESieSearchEXT[] = { 0xE8, 0x25, 0x00, 0x00, 0x00, 0xEB, 0x05, 0xE8, 0x9E, 0x05, 0x00, 0x00 }; UINT8 KBESieReplaceEXT[] = { 0xE8, 0x25, 0x00, 0x00, 0x00, 0x90, 0x90, 0xE8, 0x9E, 0x05, 0x00, 0x00 }; UINT8 KBESie4SearchEXT[] = { 0xE8, 0x25, 0x00, 0x00, 0x00, 0xEB, 0x05, 0xE8, 0x7E, 0x05, 0x00, 0x00 }; UINT8 KBESie4ReplaceEXT[] = { 0xE8, 0x25, 0x00, 0x00, 0x00, 0x90, 0x90, 0xE8, 0x7E, 0x05, 0x00, 0x00 }; to UINT8 KBESieSearchEXT[] = { 0xE8, 0x25, 0x00, 0x00, 0x00, 0xEB, 0x05, 0xE8, 0x7E, 0x05, 0x00, 0x00 }; UINT8 KBESieReplaceEXT[] = { 0xE8, 0x25, 0x00, 0x00, 0x00, 0x90, 0x90, 0xE8, 0x7E, 0x05, 0x00, 0x00 }; UINT8 KBESie4SearchEXT[] = { 0xE8, 0x25, 0x00, 0x00, 0x00, 0xEB, 0x05, 0xE8, 0x9E, 0x05, 0x00, 0x00 }; UINT8 KBESie4ReplaceEXT[] = { 0xE8, 0x25, 0x00, 0x00, 0x00, 0x90, 0x90, 0xE8, 0x9E, 0x05, 0x00, 0x00 }; it's not important order. but it help more clear. thank you kext_inject.c-clean2.zip 2 Link to comment https://www.insanelymac.com/forum/topic/284656-clover-general-discussion/page/484/#findComment-2356659 Share on other sites More sharing options...
PMheart Posted January 25, 2017 Share Posted January 25, 2017 checked. you just did change hex order. "(Previously it's 'e8 7e' and now it's 'e8 9e'.)" to it's not important order. but it help more clear. thank you Also check the Debug section. Only NOP out part of a jmpq is not enough. Link to comment https://www.insanelymac.com/forum/topic/284656-clover-general-discussion/page/484/#findComment-2356665 Share on other sites More sharing options...
Sherlocks Posted January 25, 2017 Share Posted January 25, 2017 Also check the Debug section. Only NOP out part of a jmpq is not enough. if i have develop kernel, i can surely check. but i can't surely mention it now. Link to comment https://www.insanelymac.com/forum/topic/284656-clover-general-discussion/page/484/#findComment-2356674 Share on other sites More sharing options...
PMheart Posted January 25, 2017 Share Posted January 25, 2017 if i have develop kernel, i can surely check. but i can't surely mention it now. Right. I don't have debugging kernel as well. But the issue is on the replacement/patch. Just fix it. 1 Link to comment https://www.insanelymac.com/forum/topic/284656-clover-general-discussion/page/484/#findComment-2356679 Share on other sites More sharing options...
cecekpawon Posted January 25, 2017 Share Posted January 25, 2017 (edited) Please distribute new unstable kernel patch version pattern via "KernelToPatch" (this features exists for this kind of purposes) and not into source, they will be junk someday IMHO EDIT: Im trying to patch Smbios Table134 days ago to store smc revision. They exist in header & seems didnt do anything. Am I doing wrong / this completely unnecessary? Edited January 25, 2017 by cecekpawon 6 Link to comment https://www.insanelymac.com/forum/topic/284656-clover-general-discussion/page/484/#findComment-2356709 Share on other sites More sharing options...
abdouoi Posted January 25, 2017 Share Posted January 25, 2017 After this update my backlight control stopped working. Am I the only one? Link to comment https://www.insanelymac.com/forum/topic/284656-clover-general-discussion/page/484/#findComment-2356724 Share on other sites More sharing options...
Slice Posted January 25, 2017 Share Posted January 25, 2017 Please distribute new unstable kernel patch version pattern via "KernelToPatch" (this features exists for this kind of purposes) and not into source, they will be junk someday IMHO Yes! <key>KernelAndKextPatches</key> <dict> <key>KernelToPatch</key> <array> <dict> <key>Comment</key> <string>Kext inject allowed</string> <key>MatchOS</key> <string>10.12.4</string> <key>Find</key> <data>6CUAAADrBeieBQAA</data> <key>Replace</key> <data>6CUAAACQkOieBQAA</data> </dict> </array> 5 Link to comment https://www.insanelymac.com/forum/topic/284656-clover-general-discussion/page/484/#findComment-2356737 Share on other sites More sharing options...
PMheart Posted January 25, 2017 Share Posted January 25, 2017 Why not consider reducing the search/replace patterns? 'e8 25 00 00 00 eb 05 e8' to 'e8 25 00 00 00 90 90 e8' This keeps the patch unique. And IMHO it will not cause confusions... (Patch more than 1 time) 1 Link to comment https://www.insanelymac.com/forum/topic/284656-clover-general-discussion/page/484/#findComment-2356743 Share on other sites More sharing options...
Micky1979 Posted January 25, 2017 Share Posted January 25, 2017 too short IMHO. but ...we have the "decode kernel" function in Clover? 1 Link to comment https://www.insanelymac.com/forum/topic/284656-clover-general-discussion/page/484/#findComment-2356758 Share on other sites More sharing options...
Slice Posted January 25, 2017 Share Posted January 25, 2017 too short IMHO. but ...we have the "decode kernel" function in Clover? No Link to comment https://www.insanelymac.com/forum/topic/284656-clover-general-discussion/page/484/#findComment-2356764 Share on other sites More sharing options...
SavageAUS Posted January 25, 2017 Share Posted January 25, 2017 Rev 3879 Skylake support, by goodwin_c. <key>CPU</key> <dict> <key>HWPEnable</key> <true/> </dict> This variable switches on Intel Speed Shift technology. Also named Hardware-Controlled Performance States Present on MacBook9,1 Is this needed to be set on skylake if using an ssdt? Does checking the box (clover configurator) enable this feature? or disable it? Never mind, trialled it and setting the checkbox set my CPU @ 4ghz and stayed at that. Link to comment https://www.insanelymac.com/forum/topic/284656-clover-general-discussion/page/484/#findComment-2356863 Share on other sites More sharing options...
Micky1979 Posted January 25, 2017 Share Posted January 25, 2017 i take a micky code. your are right. i checked old hex code. i changed kext_inject.c now Please distribute new unstable kernel patch version pattern via "KernelToPatch" (this features exists for this kind of purposes) and not into source, they will be junk someday IMHO EDIT: Im trying to patch Smbios Table134 days ago to store smc revision. They exist in header & seems didnt do anything. Am I doing wrong / this completely unnecessary? No pity. Guys why not like this? else if (NumSie == 1) { Num = SearchAndReplace(Kernel, KERNEL_MAX_SIZE, KBESieSearchSIP, sizeof(KBESieSearchSIP), KBESieReplaceSIP, 1); if ((Num +1) != (Num + SearchAndReplace(Kernel, KERNEL_MAX_SIZE, KBESieSearchEXT, sizeof(KBESieSearchEXT), KBESieReplaceEXT, 1))) { // this is for 10.12.4 beta and may (or not) be changed. // to avoid an additional search that takes time (even if little), do that only if SearchAndReplace return 0 Num = Num + SearchAndReplace(Kernel, KERNEL_MAX_SIZE, KBESie4SearchEXT, sizeof(KBESie4SearchEXT), KBESie4ReplaceEXT, 1); // but if the patch will be confirmed, swap KBESie4* with KBESie* to be faster in newer version of Sierra! } else { Num ++; } DBG_RT(Entry, "==> kernel Sierra: %d replaces done.\n", Num); } will speed up the process (not tested, and off course if SearchAndReplace respect the MaxReplaces given) Link to comment https://www.insanelymac.com/forum/topic/284656-clover-general-discussion/page/484/#findComment-2357015 Share on other sites More sharing options...
Micky1979 Posted January 26, 2017 Share Posted January 26, 2017 but ...we have the "decode kernel" function in Clover? No this is the same: Get_PreLink() ...should be a good place to dinamically patching the kernel (LC_SEGMENT/LC_SEGMENT_64), since we already iterates through the kernel in that function. Everythings needs is already in loader.h Link to comment https://www.insanelymac.com/forum/topic/284656-clover-general-discussion/page/484/#findComment-2357640 Share on other sites More sharing options...
bronxteck Posted January 26, 2017 Share Posted January 26, 2017 3989 seems to compile fine using edk 23831 after removing conflicting file EfiShell.h. Booted fine on haswell integrated graphics laptop with beta 10.12.4 also used mick script with latest edk rev edit in it Link to comment https://www.insanelymac.com/forum/topic/284656-clover-general-discussion/page/484/#findComment-2357805 Share on other sites More sharing options...
FredWst Posted January 27, 2017 Share Posted January 27, 2017 Hi, Rev 3990 working fine. I've a question I install a fresh Sierra 10.12.3, choose my language French, at second stage install goes in English ? Is-it a Clover bug ? Fred Link to comment https://www.insanelymac.com/forum/topic/284656-clover-general-discussion/page/484/#findComment-2358039 Share on other sites More sharing options...
arsradu Posted January 27, 2017 Share Posted January 27, 2017 Hi guys, Has anyone tried 10.12.4 PB1 yet? Does it boot for you? I'm on Clover 3974 and can't boot anymore after upgrading to that Beta. Good thing it's on a different partition. Update: Nvm that. I managed to boot using the patch posted by Slice above. Million thanks! update 2: for anyone wondering, Clover 3994 injection now works fine without the patch above. So if you haven't, you should probably update. 1 Link to comment https://www.insanelymac.com/forum/topic/284656-clover-general-discussion/page/484/#findComment-2358045 Share on other sites More sharing options...
Slice Posted January 27, 2017 Share Posted January 27, 2017 this is the same: Get_PreLink() ...should be a good place to dinamically patching the kernel (LC_SEGMENT/LC_SEGMENT_64), since we already iterates through the kernel in that function. Everythings needs is already in loader.h Take into account that we don't know where the kernel is loaded. It is Chameleon who knows. Link to comment https://www.insanelymac.com/forum/topic/284656-clover-general-discussion/page/484/#findComment-2358068 Share on other sites More sharing options...
tluck Posted January 27, 2017 Share Posted January 27, 2017 Happy new year! thank you all! reporting good news... clover 3994 and edk2 23831 all working good here for 10.12.3 and 10.12.4 pb1 on Lenovo T420 UEFI and Lenovo T460 UEFI+EmuVariable Link to comment https://www.insanelymac.com/forum/topic/284656-clover-general-discussion/page/484/#findComment-2358323 Share on other sites More sharing options...
Recommended Posts