Jump to content

Clover Problems and Solutions


ErmaC
3,206 posts in this topic

Recommended Posts

My smbios seems patched. When i boot without clover the smbios is ok.

Can i somehow log the smbios patch when i boot linux?

Compile Clover by yourself, insert DBG() messages into StartLoader() to see what is happen.

  • Like 1
Link to comment
Share on other sites

hello clover users.

 

before i give slice update data, i want to test new platform data update. i updated PBr key, REV, RPlt and added some model.

 

my laptop was tested.

 

i want to know imac14,2 and macpro6,1 and macbookair6,2. if you have smbios like 14,2, 6,1, 6,2, copy and paste, boot, get clover log. attached log please.

 

thanks in advance.

r3949-new platform.zip

Link to comment
Share on other sites

hello clover users.

 

before i give slice update data, i want to test new platform data update. i updated PBr key, REV, RPlt and added some model.

 

my laptop was tested.

 

i want to know imac14,2 and macpro6,1 and macbookair6,2. if you have smbios like 14,2, 6,1, 6,2, copy and paste, boot, get clover log. attached log please.

 

thanks in advance.

here you got :D thx

MacbookAir62.txt

MacBookAir6,2.rtf

Link to comment
Share on other sites

here you got :D thx

 

strange. i changed smc rev value. but your laptop shown rev value in original r3949 repo.

 

did you change info.plist in fakesmc?

 

try this

r3949-new platform v2.zip

 

 

add. i got it.

 

first. replace bootloader file, then boot, we can get first smc keys(no change smc keys).

 

so we have to reboot 2 times(change smc keys). all fixed. thanks

Link to comment
Share on other sites

strange. i changed smc rev value. but your laptop shown rev value in original r3949 repo.

 

did you change info.plist in fakesmc?

 

try this

attachicon.gifr3949-new platform v2.zip

 

 

add. i got it.

 

first. replace bootloader file, then boot, we can get first smc keys(no change smc keys).

 

so we have to reboot 2 times(change smc keys). all fixed. thanks

also recognized this :)

 

now it seems to be ok after second reboot :D

fakesmc-key-MSWr-ui8	%00
fakesmc-key-RBr -ch8*	j41j43%00%00
fakesmc-key-EPCI-ui32	%07%b0%07%00
fakesmc-key-MSAc-ui16	%00%00
fakesmc-key-CLKH-{clh	%00%00p%80%00%01%19@
fakesmc-key-NATi-ui16	%00%1e
fakesmc-key-NTOK-ui8	%01
fakesmc-key-BATP-flag	%00
fakesmc-key-$Num-ui8	%01
fakesmc-key-HI1N-ui8	%11
fakesmc-key-REV -ch8*	%02%13%0f%00%00%15
fakesmc-key-HI0N-ui8	%11
fakesmc-key-MSTc-ui8	%00
fakesmc-key-MSLD-ui8	%00
fakesmc-key-QENA-ui8	%01
fakesmc-key-MSPS-ui16	%00%03
fakesmc-key-RMde-char	A
fakesmc-key-RPlt-ch8*	J43%00%00%00%00%00
fakesmc-key-BEMB-flag	%01
fakesmc-key-#KEY-ui32	%00%00%00%1b
fakesmc-key-MSFW-ui8	%01%00
fakesmc-key-$Adr-ui32	%00%00%03%00
fakesmc-key-CLKT-ui32	%00%00%c3s
fakesmc-key-MSDW-ui8	%01
fakesmc-key-BNum-ui8	%01
fakesmc-key-BBIN-ui8	%01
fakesmc-key-NATJ-ui8	%02

thx :)

  • Like 1
Link to comment
Share on other sites

@Slice

 

updated files

cpu.c - add default broadwell macbookpro model if user don't have smbios when install first macOS. skylake user too.

kext_inject.c - change name, and support Sierra DP1 again(PMheart request)

Platform.h - add support model(mbp113, imac14,4, etc)

platformdata.c - updated smc keys and support PBr key and Rev. thanks to FredWST. he give me more correct information.

 

before you add commits, can check code blow. it's my clover test github

https://github.com/BarbaraPalvin/Clover-EFI-bootloader/commits/master

 

 

thanks in advance

 

I think there is a mistake in REV key this is 6 bytes, the 2 right byte are swap or not according to smc revision date.

 

update bin : SmcExtract.zip

 

 Sherlocks : iMac14,2 is 2.15f7 not 2.15f2 

 

Fred

  • Like 1
Link to comment
Share on other sites

I think there is a mistake in REV key this is 6 bytes, the 2 right byte are swap or not according to smc revision date.

 

update bin : attachicon.gifSmcExtract.zip

 

Sherlocks : iMac14,2 is 2.15f7 not 2.15f2

 

Fred

I followd rev from your tool. Rev shown some different. useally 0x01 0x13 0x0F 0 0 0x03. This is format. But some model has example 0x02 0x18 0x0F 0x00 0x96 0x00.

 

Only mistake imac14,2?

 

add. latest smcextract shown difference rev compared before. i will update thanks

 

old SmcExtract

 

SMC Revision keys

 

REV          : 02 20 0f 00 18 00

RBr          : 6a 39 30 00 00 00 00 00

RPlt         : 6a 39 30 00 00 00 00 00

Unknow key   : 0000

CRCA/CRCa    : 0ef9988e

Unknow key   : 00000000

 

new SmcExtract

 

SMC Revision keys

 

REV          : 02 20 0f 00 00 18

RBr          : 6a 39 30 00 00 00 00 00

RPlt         : 6a 39 30 00 00 00 00 00

Unknow key   : 0000

CRCA/CRCa    : 0ef9988e

Unknow key   : 00000000

 

latest SmcExtract has bug. happen imac14.4 macbook8,1

 

SMC Revision keys

 

REV          : 02 21 0f 00 00 ffffff92

RBr          : 6a 37 30 00 00 00 00 00

RPlt         : 6a 37 30 00 00 00 00 00

Unknow key   : 0000

CRCA/CRCa    : 6ea1f2d8

Unknow key   : 00000000

 

thank you.

 

 

나의 LG-F410S 의 Tapatalk에서 보냄

Link to comment
Share on other sites

updated files


cpu.c - add default broadwell macbookpro model if user don't have smbios when install first macOS. skylake user too.


kext_inject.c - change name, and support Sierra DP1 again(PMheart request)


Platform.h - add support model(mbp113, imac14,4, etc)


platformdata.c - updated smc keys and support PBr key and Rev. thanks to FredWST. he give me more correct information. 11/29 rev - fixed


 


before you add commits, can check code blow. it's my clover test github


https://github.com/B.../commits/master


update commits-rev fix.zip

Link to comment
Share on other sites

I followd rev from your tool. Rev shown some different. useally 0x01 0x13 0x0F 0 0 0x03. This is format. But some model has example 0x02 0x18 0x0F 0x00 0x96 0x00.

 

Only mistake imac14,2?

 

add. latest smcextract shown difference rev compared before. i will update thanks

 

old SmcExtract

 

new SmcExtract

 

latest SmcExtract has bug. happen imac14.4 macbook8,1

 

thank you.

 

 

나의 LG-F410S 의 Tapatalk에서 보냄

 

Just a problem of print format signed / unsigned.

 

SmcExtract.zip

 

Fred

  • Like 1
Link to comment
Share on other sites

Okay. I did put smc keys in platformdata.

Thank you.

 

나의 LG-F410S 의 Tapatalk에서 보냄

 

You can find more smc file here : https://support.apple.com/en-us/HT201518

 

Update bin : SmcExtract.zip

 

Src update with some new old smc took on Apple link : https://www.dropbox.com/s/eh65d1cs4p0pa4a/SmcExtract.zip?dl=0

 

Fred

  • Like 2
Link to comment
Share on other sites

The "No SIP" boot menu option isn't working here with r3949 and Sierra. SIP is still enabled when I boot into the system (csr-active-config shows 00 in nvram).

 

If I go into System Parameters and disable SIP in there, then it's disabled in the system (correct csr-active-config value in nvram).

Link to comment
Share on other sites

You can find more smc file here : https://support.apple.com/en-us/HT201518

 

Update bin : attachicon.gifSmcExtract.zip

 

Src update with some new old smc took on Apple link : https://www.dropbox.com/s/eh65d1cs4p0pa4a/SmcExtract.zip?dl=0

 

Fred

 

awesome. your tools is great :thumbsup_anim:. i checked smc information in all websites(apple and geekbench and apple disccusion, etc). i did update smc information from apple site.

 

I will not update it until someone gives me the information.

 

thank you for your effort :)

 

@Slice. before you add commits, can check change commits. i did test all. thank you. this github is for testing.

https://github.com/BarbaraPalvin/Clover-EFI-bootloader/commits/master

update platform data.zip

Link to comment
Share on other sites

Hi,

 

kext_patcher.c in function : VOID PatchKext(UINT8 *Driver, UINT32 DriverSize, CHAR8 *InfoPlist, UINT32 InfoPlistSize, LOADER_ENTRY *Entry)

 

I propose this patch to avoid kext_patcher to try patching plugin in master kext.

At the moment, SearchAndReplace function doesn't find string and return "not patched", it could cause some trouble in case of match.

    for (i = 0; i < Entry->KernelAndKextPatches->NrKexts; i++) {
      
      ExtractKextBoundleIdentifier(InfoPlist);
        
      if ((Entry->KernelAndKextPatches->KextPatches[i].DataLen > 0) &&
         // (AsciiStrStr(InfoPlist, Entry->KernelAndKextPatches->KextPatches[i].Name) != NULL) &&
          (AsciiStrStr(gKextBoundleIdentifier, Entry->KernelAndKextPatches->KextPatches[i].Name) != NULL) ) {
          
        DBG_RT(Entry, "\n\nPatch kext: %a\n", Entry->KernelAndKextPatches->KextPatches[i].Name);
        AnyKextPatch(Driver, DriverSize, InfoPlist, InfoPlistSize, i, Entry);
          
      }
    }

Test and works.

 

Fred

  • Like 1
Link to comment
Share on other sites

Poor me, i didnt see your "ExtractKextBoundleIdentifier(InfoPlist)" on your prev post sorry.
Before, for ex: with given patch_name as "AppleHDA" will match "AppleHDA" & "AppleHDAController" etc in InfoPlist, right?
But storing ExtractKextBoundleIdentifier there will made some redundant call with debug ON (2nd on AnyKextPatch func), which is pain.
Already made some raw implementation yesterday based on your proposes & working great..

  • Like 1
Link to comment
Share on other sites

@Slice

 

i did updated commits. i tested it

post-980913-0-81085600-1480664614_thumb.png

 

here is

update commits.zip

 

kext_inject.c

- just changed name to help more clear in future,  i did test it(sierra, el capitan and other osx)

 

cpu.c

- separated code to support skylake and broadwell laptop

 

before you update commits, can check here. based on r3953

https://github.com/BarbaraPalvin/Clover-EFI-bootloader/commits/master

 

thanks in advance. have a nice day

Link to comment
Share on other sites

@Slice

 

i did updated commits. i tested it

attachicon.gif스크린샷 2016-12-02 오후 4.48.55.png

 

here is

attachicon.gifupdate commits.zip

 

kext_inject.c

- just changed name to help more clear in future,  i did test it(sierra, el capitan and other osx)

 

cpu.c

- separated code to support skylake and broadwell laptop

 

before you update commits, can check here. based on r3953

https://github.com/BarbaraPalvin/Clover-EFI-bootloader/commits/master

 

thanks in advance. have a nice day

Why comment KERNEL_MAX_SIZE ? It could be useful in some cases.

Link to comment
Share on other sites

Why comment KERNEL_MAX_SIZE ? It could be useful in some cases.

 

we already have "#define KERNEL_MAX_SIZE 40000000" in rEFIt_UEFI/refit/lib.h. :) 

 

therefore, we don't need to add  "#define KERNEL_MAX_SIZE 40000000" in kext_inject.c. because of this, i did comment.

 

i will remove this comment. prevent confusing from code for some users in the future.

@Slice

 

i did updated commits. i tested it

attachicon.gif스크린샷 2016-12-02 오후 4.48.55.png

 

here is

attachicon.gifupdate commits.zip

 

kext_inject.c

- just changed name to help more clear in future,  i did test it(sierra, el capitan and other osx)

 

cpu.c

- separated code to support skylake and broadwell laptop

 

before you update commits, can check here. based on r3953

https://github.com/BarbaraPalvin/Clover-EFI-bootloader/commits/master

 

thanks in advance. have a nice day

 

updated. i just did clean up. can check github.

update commits(clean up).zip

 

thanks in advance

Link to comment
Share on other sites

we already have "#define KERNEL_MAX_SIZE 40000000" in rEFIt_UEFI/refit/lib.h. :) 

 

therefore, we don't need to add  "#define KERNEL_MAX_SIZE 40000000" in kext_inject.c. because of this, i did comment.

 

i will remove this comment. prevent confusing from code for some users in the future.

 

updated. i just did clean up. can check github.

attachicon.gifupdate commits(clean up).zip

 

thanks in advance

Ah I see. Sorry for ignoring lib.h. But just one of them exists is OK.  :)

Link to comment
Share on other sites

Poor me, i didnt see your "ExtractKextBoundleIdentifier(InfoPlist)" on your prev post sorry.

Before, for ex: with given patch_name as "AppleHDA" will match "AppleHDA" & "AppleHDAController" etc in InfoPlist, right?

But storing ExtractKextBoundleIdentifier there will made some redundant call with debug ON (2nd on AnyKextPatch func), which is pain.

Already made some raw implementation yesterday based on your proposes & working great..

 

Will it be merge with master clover branch ?

 

Fred

Link to comment
Share on other sites

we already have "#define KERNEL_MAX_SIZE 40000000" in rEFIt_UEFI/refit/lib.h. :) 

 

therefore, we don't need to add  "#define KERNEL_MAX_SIZE 40000000" in kext_inject.c. because of this, i did comment.

 

i will remove this comment. prevent confusing from code for some users in the future.

 

updated. i just did clean up. can check github.

attachicon.gifupdate commits(clean up).zip

 

thanks in advance

OK, I committed kext inject patch. But I don't want to change default MacModel because it may change behavior for users of such CPU.

Take into account that MacBookPro131 is not supported in ElCapitan. There must be user intervention.

Link to comment
Share on other sites

×
×
  • Create New...