Jump to content

Clover Problems and Solutions


ErmaC
3,206 posts in this topic

Recommended Posts

I have started seeing some major issues on my Lenovo T460 with i5-6300U (skyLake) on recent Clover builds.

 

it will boots UEFI (or with MBR/Legacy on USB)

but it need EmuVariable.efi, to get an NVRAM.

also needs this - OsxAptioFix2Drv or OsxAptioFixDrv.efi

 

so now i am having some major Clover issues failures:

 

1) Clover DefaultVolume and count down is breaks from 3636-3639

but can select OSX volume and boot...

seems to have trouble reading from NVRAM?

the Clover.Theme variable shows up garbled (every other character for the word: ThinkPad.

 

2) Now Clover completly hangs form 3640-3642 (latest) right after OsxAptioFix2 drive and hangs on the +++++++ line

 

here some logs.

Tested 3636-3642 by changing just BootX64.efi and CLoverX64.efi

 

3635 - last working version

3639 - sort of works (cannot find boot volume automatically.)

 

Note: all these builds work on my Lenovo T420 (UEFI + native NVRAM)

No need Emuvariable.efi in latest build? My skylake laptop need Emul+RC script. Bios is pheonix.

 

나의 LG-F410S 의 Tapatalk에서 보냄

Link to comment
Share on other sites

Topic cleaned,

the title say "Clover Bug/Issue Report and Patch", so if no issue, no report or no patches (code) = post deleted

 

Thanks for the collaboration


Yeah I did! But I never asked for installer... just a guide to revert back to the old version of Clover Boot Loader! :-)

And He give you the right answer (We don't know better method other than do that manually, that require you to know what to do)

You are Off Topic here, move to "Clover General Discussion" Topic

Link to comment
Share on other sites

Topic cleaned,

the title say "Clover Bug/Issue Report and Patch", so if no issue, no report or no patches (code) = post deleted

 

Thanks for the collaboration

And He give you the right answer. 

You are Off Topic here, move to "Clover General Discussion"

I have an issue with Clover 3642. So I asked! :-)

Link to comment
Share on other sites

For those who have issue with Clover 3642.

 

The bug introduced in commit 3634 and appears using nvram.

       ChosenTheme   = GetNvramVariable(L"Clover.Theme", &gEfiAppleBootGuid, NULL, &Size);
       if (ChosenTheme != NULL) {
-        if (AsciiStrCmp (ChosenTheme, "embedded") == 0) {
+        if (StriCmp (ChosenTheme, CONFIG_THEME_EMEDDED) == 0) {

NO!

NVRAM variable Clover.Theme is Ascii strings, not Unicode strings.

 

Corrected in commit 3643. Test, please!

  • Like 2
Link to comment
Share on other sites

@slice - there seems to be a bigger problem in builds 3640+. 

 

no real change with 3643 - the embedded theme comes up instead of ThinkPad. the options menu shows 2 installed themes. ThinkPad and embedded.

 

but then after you hit enter to boot OSX, its starts the boot process

you get the OsxAptioFix memory output shows up

and then you see the ++++++++++ line

and then hang.

 

on versions before 3636-3639, it acts differently. the proper theme showed up but it would say cannot find default volume. but i could select OSX and it would boot.

 

i will test out DxeHub on 3635 (last properly working version) to see how that effects NVRAM - i.e. need to use EmuVar or t

Link to comment
Share on other sites

Sorry for trouble.. How about converting GetNvramVariable result to unicode Slice? Im trying to manage (theme) static variables to lib.h for easy maintain. As a note, the problems only issued with some skylake setups, cannot test it sorry. Seems setting SIP without_nvram no longer fix aptiofix for some users (with different edk2 ver I believe) :( Tomorrow will retest

Link to comment
Share on other sites

@cecekpawon

yes. i am thinking the issues are related to not getting access to native NVRAM on this skyLake box. if there is some debug code or tests to figure out how to fix up OsxAptFixDrv etc. i am happy to test and/or provide output. -- i.e. get away from EmuVar etc. 

 

so added DxeHub but it did not change anything on 3635 - the last well working build. i removed EmuVariable. added DxeHub and booted into single user mode.

nvram - says not supported on this machine. 

 

i booted int the EFI shell (ShellU64.efi)

i ran these 3 commands and captured the output 

 

dmpstore     -- Displays all NVRAM variables
dmem         -- Displays the contents of memory
memmap         -- Displays the memory map

 

 

thinking this may have some good info? 

 

 

 

efi-info-T460.zip

Link to comment
Share on other sites

  gOptionsRef = IORegistryEntryFromPath(masterPort, "IODeviceTree:/options");
  if (gOptionsRef == 0) {
    errx(1, "nvram is not supported on this system");
  }

Does someone know what exposes IODeviceTree:/options?

 

EDIT:

 

Also, try either one of these... both have the same change:

 

https://www.dropbox.com/sh/s6lofuv83stgjec/AABOf31LukJsXt12crsG3T0Ya?dl=0

  • Like 1
Link to comment
Share on other sites

 

  gOptionsRef = IORegistryEntryFromPath(masterPort, "IODeviceTree:/options");
  if (gOptionsRef == 0) {
    errx(1, "nvram is not supported on this system");
  }
Does someone know what exposes IODeviceTree:/options?

 

I remember /options from PowerPC / Open Firmware days. I don't know how it applies to EFI...
Link to comment
Share on other sites

I remember /options from PowerPC / Open Firmware days. I don't know how it applies to EFI...

 

It's basically a 'mirror' of OS X's NVRAM scope... but I can't find what exposes it. macosxbootloader and boot-132 don't, and I can't find the kernel doing so. Probably AppleNVRAM kext?

Link to comment
Share on other sites

Yep, the kext. meklort's FileNVRAM.kext detaches a different node containings stuff from file (/chosen/nvram) and the kext take the step to move it under /options, so I guess that node is not existing during early boot.

If we create /options by ourself boot will fail (tested with Enoch). I mean that if the node does not exist at boot time this does not mean that the PC does not support NVRAM.

Link to comment
Share on other sites

For the Asus G750JX Laptop I need to use EMuVariableUefi for nvram.  I get an instant reboot for clover 3640 and above,  I see OsxAptioFixDrv: Starting overrides for System\Library\CoreServices\boot.efi, using reloc block: no, hibernate wake: no then the +++++++++++++++++++++++++.  So must be before kernel loads.  3636 working fine.

Link to comment
Share on other sites

It's basically a 'mirror' of OS X's NVRAM scope... but I can't find what exposes it. macosxbootloader and boot-132 don't, and I can't find the kernel doing so. Probably AppleNVRAM kext?

kernel+kext use EFI RUNTIME functions GetVariable() and SetVariable() absent in Chameleon and provided by Clover in some protected memory region known to kernel from device-tree.

Screen Shot 2016-07-19 at 22.31.01.png

Link to comment
Share on other sites

kernel+kext use EFI RUNTIME functions GetVariable() and SetVariable() absent in Chameleon and provided by Clover in some protected memory region known to kernel from device-tree.

attachicon.gifScreen Shot 2016-07-19 at 22.31.01.png

 

I'm not asking how NVRAM is accessed, but what exposes the /options Device Tree node. The guy gets the 'system unsupported' error and this only gets shown when this very node is missing.

Link to comment
Share on other sites

For the Asus G750JX Laptop I need to use EMuVariableUefi for nvram.  I get an instant reboot for clover 3640 and above,  I see OsxAptioFixDrv: Starting overrides for System\Library\CoreServices\boot.efi, using reloc block: no, hibernate wake: no then the +++++++++++++++++++++++++.  So must be before kernel loads.  3636 working fine.

Rev 3640 questionable improvement

--- a/rEFIt_UEFI/Platform/kernel_patcher.c
+++ b/rEFIt_UEFI/Platform/kernel_patcher.c
@@ -645,10 +645,12 @@
     else if (0x00000002000000E2ULL == (*((UINT64 *)Ptr))) {
       (*((UINT64 *)Ptr)) = 0x0000000000000000ULL;
       DBG("Kernel power management patch 10.10(data1) found and patched\n");
+      return TRUE;
     }
     else if (0x0000004C000000E2ULL == (*((UINT64 *)Ptr))) {
       (*((UINT64 *)Ptr)) = 0x0000000000000000ULL;
       DBG("Kernel power management patch 10.10(data2) found and patched\n");
+      return TRUE;
     }
     else if (0x00000190000000E2ULL == (*((UINT64 *)Ptr))) {
       (*((UINT64 *)Ptr)) = 0x0000000000000000ULL;

It works before!

I'm not asking how NVRAM is accessed, but what exposes the /options Device Tree node. The guy gets the 'system unsupported' error and this only gets shown when this very node is missing.

It means VariableDxe driver contains these functions GetVariable and SetVariable missing in UEFI firmware as well as in loaded drivers list.

Link to comment
Share on other sites

It means VariableDxe driver contains these functions GetVariable and SetVariable missing in UEFI firmware as well as in loaded drivers list.

 

If these functions were 'missing', he couldn't have dumped the variables. Also, what loaded drivers list? There is none attached, is there?

Link to comment
Share on other sites

this test version 3646 boots the system. but it used the embedded theme vs config.plist named theme ThinkPad - which does show as selected in menu Options/Themes.

 

attached logs from 3635 and 3646 (CLOVERX64.efi is different)

 

diffs:

tluck@Toms-Mac /Temp
$ diff 36*
2c2
< -19 TIME: 16:50:16
---
> -19 TIME: 16:35:44
4c4
<  MemLog inited, TSC freq: 2495883700
---
>  MemLog inited, TSC freq: 2508397760
7,10c7,10
<  Now is 19.7.2016,  20:50:4 (GMT)
<  Starting Clover rev 3635 on Lenovo EFI
<  Build with: [Args: ./ebuild.sh -release -gcc53 --x64 | Command: build -D USE_LOW_EBDA -p Clover/Clover.dsc -a X64 -b RELEASE -t GCC53 -n 5 | OS: 10.11.6]
<  SelfDevicePath=PciRoot(0x0)\Pci(0x17,0x0)\Sata(0x1,0x0,0x0)\HD(1,GPT,64C75011-6F23-4B55-AB3D-F3BA9342E6FE,0x28,0x64000) @B0B51198
---
>  Now is 19.7.2016,  20:35:31 (GMT)
>  Starting Clover rev 3646 on Lenovo EFI
>  Build with: [Args: ./ebuild.sh | Command: build -D USE_LOW_EBDA -p Clover/Clover.dsc -a X64 -b RELEASE -t XCODE5 -n 5 | OS: 10.11.6 | XCODE: 7.3.1]
>  SelfDevicePath=PciRoot(0x0)\Pci(0x17,0x0)\Sata(0x1,0x0,0x0)\HD(1,GPT,64C75011-6F23-4B55-AB3D-F3BA9342E6FE,0x28,0x64000) @B0B47798
29c29
<  Clover revision: 3635  running on 20FMS05K00
---
>  Clover revision: 3646  running on 20FMS05K00
38c38
<   Calibrated ARTFrequency: 23998881
---
>   Calibrated ARTFrequency: 24119209
85,99c85,99
<  KextsToPatch 0: AppleUSBXHCIPCI (change 15 port limit to 26 in XHCI kext (100-series)) :: Kext bin patch, data len: 7
<  KextsToPatch 1: AppleHDA (AppleHDA .xml.zl to .zml.zl) :: Kext bin patch, data len: 7
<  KextsToPatch 2: IOAHCIBlockStorage (Enable TRIM for non-Apple SSDs) :: Kext bin patch, data len: 11
<  KextsToPatch 3: disable:IOGraphicsFamily (Boot graphics glitch, 10.12.dp1 (credit denskop)) :: Kext bin patch, data len: 5
<  KextsToPatch 4: IOGraphicsFamily (Boot graphics glitch, 10.10.x/10.11.x (credit lisai9093, cecekpawon)) :: Kext bin patch, data len: 5
<  KextsToPatch 5: disable:AirPortBrcm4360 (AirPortBrcm4360 whitelist patch (board-id), 10.12.dp1, credit RehabMan) :: Kext bin patch, data len: 8
<  KextsToPatch 6: disable:AirPortBrcm4360 (AirPortBrcm4360 whitelist patch (board-id), 10.11.x, credit RehabMan) :: Kext bin patch, data len: 8
<  KextsToPatch 7: disable:AirPortBrcm4360 (AirPortBrcm4360 whitelist patch (board-id), 10.10.5, credit RehabMan) :: Kext bin patch, data len: 12
<  KextsToPatch 8: disable:AirPortBrcm4360 (10.10.2+ 5Ghz US FCC, the-darkvoid) :: Kext bin patch, data len: 7
<  KextsToPatch 9: disable:IOBluetoothFamily (10.10.2+ BT4LE-Handoff-Hotspot, Dokterdok) :: Kext bin patch, data len: 8
<  KextsToPatch 10: IOBluetoothFamily (10.11.dp1+ BT4LE-Handoff-Hotspot, credit RehabMan based on Dokterdok original) :: Kext bin patch, data len: 8
<  KextsToPatch 11: AppleIntelSKLGraphicsFramebuffer (HDMI-audio, port 0105, 0x19160000) :: Kext bin patch, data len: 12
<  KextsToPatch 12: AppleIntelSKLGraphicsFramebuffer (HDMI-audio, port 0204, 0x19160000) :: Kext bin patch, data len: 12
<  KextsToPatch 13: AppleIntelSKLGraphicsFramebuffer (DVMT) :: Kext bin patch, data len: 5
<  KextsToPatch 14: AppleIntelSKLGraphicsFramebuffer (Disable minStolenSize less or equal fStolenMemorySize assertion, 10.11.4 - based on Austere.J patch) :: Kext bin patch, data len: 5
---
>   - [0]: AppleUSBXHCIPCI (change 15 port limit to 26 in XHCI kext (100-series)) :: BinPatch :: data len: 7
>   - [1]: AppleHDA (AppleHDA .xml.zl to .zml.zl) :: BinPatch :: data len: 7
>   - [2]: IOAHCIBlockStorage (Enable TRIM for non-Apple SSDs) :: BinPatch :: data len: 11
>   - [3]: disable:IOGraphicsFamily (Boot graphics glitch, 10.12.dp1 (credit denskop)) :: BinPatch :: data len: 5
>   - [4]: IOGraphicsFamily (Boot graphics glitch, 10.10.x/10.11.x (credit lisai9093, cecekpawon)) :: BinPatch :: data len: 5
>   - [5]: disable:AirPortBrcm4360 (AirPortBrcm4360 whitelist patch (board-id), 10.12.dp1, credit RehabMan) :: BinPatch :: data len: 8
>   - [6]: disable:AirPortBrcm4360 (AirPortBrcm4360 whitelist patch (board-id), 10.11.x, credit RehabMan) :: BinPatch :: data len: 8
>   - [7]: disable:AirPortBrcm4360 (AirPortBrcm4360 whitelist patch (board-id), 10.10.5, credit RehabMan) :: BinPatch :: data len: 12
>   - [8]: disable:AirPortBrcm4360 (10.10.2+ 5Ghz US FCC, the-darkvoid) :: BinPatch :: data len: 7
>   - [9]: disable:IOBluetoothFamily (10.10.2+ BT4LE-Handoff-Hotspot, Dokterdok) :: BinPatch :: data len: 8
>   - [10]: IOBluetoothFamily (10.11.dp1+ BT4LE-Handoff-Hotspot, credit RehabMan based on Dokterdok original) :: BinPatch :: data len: 8
>   - [11]: AppleIntelSKLGraphicsFramebuffer (HDMI-audio, port 0105, 0x19160000) :: BinPatch :: data len: 12
>   - [12]: AppleIntelSKLGraphicsFramebuffer (HDMI-audio, port 0204, 0x19160000) :: BinPatch :: data len: 12
>   - [13]: AppleIntelSKLGraphicsFramebuffer (DVMT) :: BinPatch :: data len: 5
>   - [14]: AppleIntelSKLGraphicsFramebuffer (Disable minStolenSize less or equal fStolenMemorySize assertion, 10.11.4 - based on Austere.J patch) :: BinPatch :: data len: 5
166c166
<  Calibrated TSC frequency =2495883700 =2495MHz
---
>  Calibrated TSC frequency =2508397760 =2508MHz
238,241c238,240
<  Using theme 'ThinkPad' (EFI\CLOVER\themes\ThinkPad)
<  OS main and drive as badge
<  Warning! Character width should be even!
<  Choosing theme ThinkPad
---
>  GlobalConfig: theme.plist not found, get random theme embedded
>   using embedded theme
>  Choosing theme <null string>
287c286
<  Finally: Bus=99835kHz CPU=2496MHz
---
>  Finally: Bus=100335kHz CPU=2508MHz
291,305c290,304
<   - Patch [0] "AppleUSBXHCIPCI" :: KextPatch :: [OS: 10.11.6 | MatchOS: undefined] ==> allowed
<   - Patch [1] "AppleHDA" :: KextPatch :: [OS: 10.11.6 | MatchOS: undefined] ==> allowed
<   - Patch [2] "IOAHCIBlockStorage" :: KextPatch :: [OS: 10.11.6 | MatchOS: undefined] ==> allowed
<   - Patch [3] "disable:IOGraphicsFamily" :: KextPatch :: [OS: 10.11.6 | MatchOS: undefined] ==> allowed
<   - Patch [4] "IOGraphicsFamily" :: KextPatch :: [OS: 10.11.6 | MatchOS: undefined] ==> allowed
<   - Patch [5] "disable:AirPortBrcm4360" :: KextPatch :: [OS: 10.11.6 | MatchOS: undefined] ==> allowed
<   - Patch [6] "disable:AirPortBrcm4360" :: KextPatch :: [OS: 10.11.6 | MatchOS: undefined] ==> allowed
<   - Patch [7] "disable:AirPortBrcm4360" :: KextPatch :: [OS: 10.11.6 | MatchOS: undefined] ==> allowed
<   - Patch [8] "disable:AirPortBrcm4360" :: KextPatch :: [OS: 10.11.6 | MatchOS: undefined] ==> allowed
<   - Patch [9] "disable:IOBluetoothFamily" :: KextPatch :: [OS: 10.11.6 | MatchOS: undefined] ==> allowed
<   - Patch [10] "IOBluetoothFamily" :: KextPatch :: [OS: 10.11.6 | MatchOS: undefined] ==> allowed
<   - Patch [11] "AppleIntelSKLGraphicsFramebuffer" :: KextPatch :: [OS: 10.11.6 | MatchOS: undefined] ==> allowed
<   - Patch [12] "AppleIntelSKLGraphicsFramebuffer" :: KextPatch :: [OS: 10.11.6 | MatchOS: undefined] ==> allowed
<   - Patch [13] "AppleIntelSKLGraphicsFramebuffer" :: KextPatch :: [OS: 10.11.6 | MatchOS: undefined] ==> allowed
<   - Patch [14] "AppleIntelSKLGraphicsFramebuffer" :: KextPatch :: [OS: 10.11.6 | MatchOS: undefined] ==> allowed
---
>   - [0]: AppleUSBXHCIPCI (change 15 port limit to 26 in XHCI kext (100-series)) :: BinPatch :: [OS: 10.11.6 | MatchOS: All] ==> allowed
>   - [1]: AppleHDA (AppleHDA .xml.zl to .zml.zl) :: BinPatch :: [OS: 10.11.6 | MatchOS: All] ==> allowed
>   - [2]: IOAHCIBlockStorage (Enable TRIM for non-Apple SSDs) :: BinPatch :: [OS: 10.11.6 | MatchOS: All] ==> allowed
>   - [3]: disable:IOGraphicsFamily (Boot graphics glitch, 10.12.dp1 (credit denskop)) :: BinPatch :: [OS: 10.11.6 | MatchOS: All] ==> allowed
>   - [4]: IOGraphicsFamily (Boot graphics glitch, 10.10.x/10.11.x (credit lisai9093, cecekpawon)) :: BinPatch :: [OS: 10.11.6 | MatchOS: All] ==> allowed
>   - [5]: disable:AirPortBrcm4360 (AirPortBrcm4360 whitelist patch (board-id), 10.12.dp1, credit RehabMan) :: BinPatch :: [OS: 10.11.6 | MatchOS: All] ==> allowed
>   - [6]: disable:AirPortBrcm4360 (AirPortBrcm4360 whitelist patch (board-id), 10.11.x, credit RehabMan) :: BinPatch :: [OS: 10.11.6 | MatchOS: All] ==> allowed
>   - [7]: disable:AirPortBrcm4360 (AirPortBrcm4360 whitelist patch (board-id), 10.10.5, credit RehabMan) :: BinPatch :: [OS: 10.11.6 | MatchOS: All] ==> allowed
>   - [8]: disable:AirPortBrcm4360 (10.10.2+ 5Ghz US FCC, the-darkvoid) :: BinPatch :: [OS: 10.11.6 | MatchOS: All] ==> allowed
>   - [9]: disable:IOBluetoothFamily (10.10.2+ BT4LE-Handoff-Hotspot, Dokterdok) :: BinPatch :: [OS: 10.11.6 | MatchOS: All] ==> allowed
>   - [10]: IOBluetoothFamily (10.11.dp1+ BT4LE-Handoff-Hotspot, credit RehabMan based on Dokterdok original) :: BinPatch :: [OS: 10.11.6 | MatchOS: All] ==> allowed
>   - [11]: AppleIntelSKLGraphicsFramebuffer (HDMI-audio, port 0105, 0x19160000) :: BinPatch :: [OS: 10.11.6 | MatchOS: All] ==> allowed
>   - [12]: AppleIntelSKLGraphicsFramebuffer (HDMI-audio, port 0204, 0x19160000) :: BinPatch :: [OS: 10.11.6 | MatchOS: All] ==> allowed
>   - [13]: AppleIntelSKLGraphicsFramebuffer (DVMT) :: BinPatch :: [OS: 10.11.6 | MatchOS: All] ==> allowed
>   - [14]: AppleIntelSKLGraphicsFramebuffer (Disable minStolenSize less or equal fStolenMemorySize assertion, 10.11.4 - based on Austere.J patch) :: BinPatch :: [OS: 10.11.6 | MatchOS: All] ==> allowed
470c469
< PLE_FILE_SYSTEM_PROTOCOL installed on handle: B0B63218
---
> PLE_FILE_SYSTEM_PROTOCOL installed on handle: B0B5B798
472c471
< PLE_FILE_SYSTEM_PROTOCOL installed on handle: B0B63218
---
> PLE_FILE_SYSTEM_PROTOCOL installed on handle: B0B5B798

Clover-T460-3635-3646-boot.log.zip

  • Like 2
Link to comment
Share on other sites

×
×
  • Create New...