Jump to content
ErmaC

Clover General discussion

20,226 posts in this topic

Recommended Posts

Posted (edited)
14 minutes ago, vector sigma said:

What about:


// SetupDataForOSX
/// Sets the DataHub data used by OS X
VOID EFIAPI
SetupDataForOSX(BOOLEAN Hibernate)
{
  EFI_STATUS Status;

  UINT32     DevPathSupportedVal;
  UINT64     FrontSideBus;
  UINT64     CpuSpeed;
  UINT64     TscFrequency;
  UINT64     ARTFrequency;
  CHAR16*    ProductName;
  CHAR16*    SerialNumber;
  UINTN      Revision;
  UINT16     Zero = 0;
  BOOLEAN    isRevLess = (gSettings.REV[0] == 0 &&
                          gSettings.REV[1] == 0 &&
                          gSettings.REV[2] == 0 &&
                          gSettings.REV[3] == 0 &&
                          gSettings.REV[4] == 0 &&
                          gSettings.REV[5] == 0);
  
  if (AsciiStrStr(gSettings.BootArgs, "-withREV") != NULL) {
    isRevLess = false;
  } else if (AsciiStrStr(gSettings.BootArgs, "-noREV") != NULL) {
    isRevLess = true;
  }

and use the same arguments used by FakeSMC??

 

good boot-arg. can we consider that no need update fakesmc that is not relate new model without boot-arg?

from check clover's any values, does fakesmc have determination to add isRevLess as free?

the recent models of apple has t2 and smc3 except imac19.x.
we just think imac19.x have t2 and smc3. but it's not correct.
in future, there are possibility that not include smc3 version in macbook11,1 or macbookpro16,1 or etc.

therefore, if we add smbios data in clover's platformdata of the future model, can we consider freely more from smc3 according to clover in fakesmc?

ofc, default value has all(rev/pbr/epci)

it's just my think. sorry for my bad english.

Edited by Sherlocks

Share this post


Link to post
Share on other sites
Advertisement
1 minute ago, Sherlocks said:

good boot-arg. can we consider that no need update fakesmc that is not relate new model without boot-arg?

from check clover's any values, does fakesmc have determination to add isRevLess as free?

the recent models of apple has t2 and smc3 except imac19.x.
we just think imac19.x have t2 and smc3. but it's not correct.
in future, there are possibility that not include smc3 version in macbook11,1 or macbookpro16,1 or etc.

therefore, if we add smbios data in clover's platformdata of the future model, can we consider freely more from smc3 according to clover in fakesmc?

it's just my think. sorry for my bad english.

FakeSMC is not used only by Clover, so it has to know which models needs REV or not. In fact REV (and a lot of keys) can be injected by it's Info.plist. 

Only users that will have older Clover or FakeSMC (the actual revisions, from now on) can decide to override this behaviour with boot-args, with or without having an updated platformdata for newer models.

Share this post


Link to post
Share on other sites
3 minutes ago, vector sigma said:

FakeSMC is not used only by Clover, so it has to know which models needs REV or not. In fact REV (and a lot of keys) can be injected by it's Info.plist. 

Only users that will have older Clover or FakeSMC (the actual revisions, from now on) can decide to override this behaviour with boot-args, with or without having an updated platformdata for newer models.

 

FakeSMC is not used only by Clover

- i forgot it. so seems it's best now.

Share this post


Link to post
Share on other sites
Posted (edited)

Anyway why Apple done that? I've received notification from the System when the revision was bad.... something tells me that this can have some evolution.. who knows..

or was something else?:unsure:

Edited by vector sigma

Share this post


Link to post
Share on other sites

Thay's bit weird that since r4956 I got random AppleSMC kernel panic when mach halt (reboot / shutdown). Not sure why mine is affected bcoz I'm sure my SMBios (MBP10,1) is not on those updated platformdata.c list. A similar issue with 10.3.6 upto 10.15 Beta using FakeSMC (Rehabman), not trying VirtualSMC yet. (Sorry, can not upload full crash logs. I'm currently on mobile).

Share this post


Link to post
Share on other sites
1 hour ago, Badruzeus said:

Thay's bit weird that since r4956 I got random AppleSMC kernel panic when mach halt (reboot / shutdown). Not sure why mine is affected bcoz I'm sure my SMBios (MBP10,1) is not on those updated platformdata.c list. A similar issue with 10.3.6 upto 10.15 Beta using FakeSMC (Rehabman), not trying VirtualSMC yet. (Sorry, can not upload full crash logs. I'm currently on mobile).

 

strange. did you try to cleanup nvram?

Share this post


Link to post
Share on other sites
2 hours ago, Badruzeus said:

Thay's bit weird that since r4956 I got random AppleSMC kernel panic when mach halt (reboot / shutdown). Not sure why mine is affected bcoz I'm sure my SMBios (MBP10,1) is not on those updated platformdata.c list. A similar issue with 10.3.6 upto 10.15 Beta using FakeSMC (Rehabman), not trying VirtualSMC yet. (Sorry, can not upload full crash logs. I'm currently on mobile).

Is it happen with FakeSMC-6 and never with FakeSMC-3?

Share this post


Link to post
Share on other sites

Hi,

 

I propose this new patch for kext injection of 10.15:

Index: rEFIt_UEFI/Platform/kext_inject.c
===================================================================
--- rEFIt_UEFI/Platform/kext_inject.c	(revision 4959)
+++ rEFIt_UEFI/Platform/kext_inject.c	(working copy)
@@ -681,8 +681,8 @@
 // Catalina (SIP)
 // PMheart: checked
 // Need to pair with KBEMojaCata*EXT
-UINT8   KBECataSearchSIP[]            = { 0x00, 0x85, 0xC0, 0x0F, 0x84, 0x87, 0x00, 0x00, 0x00, 0x49 };
-UINT8   KBECataReplaceSIP[]           = { 0x00, 0x85, 0xC0, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x49 };
+UINT8   KBECataSearchSIP[]            = { 0xE8, 0xB0, 0xEE, 0x0C, 0x00, 0x85, 0xC0, 0x0F, 0x84 };
+UINT8   KBECataReplaceSIP[]           = { 0xE8, 0xB0, 0xEE, 0x0C, 0x00, 0x31, 0xC0, 0x0F, 0x84 };
 
 // Mojave 10.14 - 10.14.3
 // Avoid race condition in OSKext::removeKextBootstrap when using booter kexts without keepsyms=1.

Don't ask me if it works, of course it does - just read the asm code. ;)

 

PMheart

Share this post


Link to post
Share on other sites
18 hours ago, Pene said:

 

True, but I already fixed that with r4949. Try a later revision.

 

OK,thx

Share this post


Link to post
Share on other sites
1 hour ago, Slice said:

Is it happen with FakeSMC-6 and never with FakeSMC-3?

I think bcoz of Nvram, no longer having issue after Clover's F11 key for full clean, thanks @Sherlocks for suggestion. Oh ya, could be affected by VirtualSMC either.. I remember previously boot with it using OpenCore, then switch to Clover (FakeSMC). I will retry with your FakeSMC v3.5.1.

Share this post


Link to post
Share on other sites
Posted (edited)
8 minutes ago, Badruzeus said:

I think bcoz of Nvram, no longer having issue after Clover's F11 key for full clean, thanks @Sherlocks for suggestion. Oh ya, could be affected by VirtualSMC either.. I remember previously boot with it using OpenCore, then switch to Clover (FakeSMC). I will retry with your FakeSMC v3.5.1.

 

probably. recent commit for smc3 is no problem for rehabman and slice fakesmc version.

anyways f11 can clean opencore nvram keys.

 

now i keep rehabman fakesmc. his kext suppport all macos(10.6~10.15). its all in one. but his kext need to update for smc3 like vector's update of hwsensor3.

Edited by Sherlocks

Share this post


Link to post
Share on other sites
Posted (edited)

When building Clover r4961 with `./ebuild.sh --ext-co -fr` I got this errors (seem related to OcSupportPkg):

Building ... /Users/badruzeus/src/EXT_PACKAGES/OcSupportPkg/Library/OcStringLib/OcStringLib.inf [X64]
[CC] OcAsciiLib
[CC] BitOverflow
[CC] DataPatcher
[CC] FileProtocol
/Users/badruzeus/src/EXT_PACKAGES/OcSupportPkg/Library/OcStringLib/OcUnicodeLib.c:67:23: error: implicit declaration of function 'CharToUpper' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
  UpperFirstString  = CharToUpper (*FirstString);
                      ^
/Users/badruzeus/src/EXT_PACKAGES/OcSupportPkg/Library/OcStringLib/OcUnicodeLib.c:143:23: error: implicit declaration of function 'CharToUpper' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
  UpperFirstString  = CharToUpper (*FirstString);
                      ^
2 errors generated.
make: *** [/Users/badruzeus/src/UDK2018/Build/AptioFixPkg/RELEASE_XCODE8/X64/OcSupportPkg/Library/OcStringLib/OcStringLib/OUTPUT/OcUnicodeLib.obj] Error 1


build.py...
 : error 7000: Failed to execute command
	make tbuild [/Users/badruzeus/src/UDK2018/Build/AptioFixPkg/RELEASE_XCODE8/X64/OcSupportPkg/Library/OcStringLib/OcStringLib]


build.py...
 : error F002: Failed to build module
	/Users/badruzeus/src/EXT_PACKAGES/OcSupportPkg/Library/OcStringLib/OcStringLib.inf [X64, XCODE8, RELEASE]

- Failed -
Build end time: 09:07:33, Jun.10 2019
Build total time: 00:00:10

MacBookPro:Clover badruzeus$

Thanks.

Edited by Badruzeus

Share this post


Link to post
Share on other sites
1 hour ago, Badruzeus said:

When building Clover r4961 with `./ebuild.sh --ext-co -fr` I got this errors (seem related to OcSupportPkg):


Building ... /Users/badruzeus/src/EXT_PACKAGES/OcSupportPkg/Library/OcStringLib/OcStringLib.inf [X64]
[CC] OcAsciiLib
[CC] BitOverflow
[CC] DataPatcher
[CC] FileProtocol
/Users/badruzeus/src/EXT_PACKAGES/OcSupportPkg/Library/OcStringLib/OcUnicodeLib.c:67:23: error: implicit declaration of function 'CharToUpper' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
  UpperFirstString  = CharToUpper (*FirstString);
                      ^
/Users/badruzeus/src/EXT_PACKAGES/OcSupportPkg/Library/OcStringLib/OcUnicodeLib.c:143:23: error: implicit declaration of function 'CharToUpper' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
  UpperFirstString  = CharToUpper (*FirstString);
                      ^
2 errors generated.
make: *** [/Users/badruzeus/src/UDK2018/Build/AptioFixPkg/RELEASE_XCODE8/X64/OcSupportPkg/Library/OcStringLib/OcStringLib/OUTPUT/OcUnicodeLib.obj] Error 1


build.py...
 : error 7000: Failed to execute command
	make tbuild [/Users/badruzeus/src/UDK2018/Build/AptioFixPkg/RELEASE_XCODE8/X64/OcSupportPkg/Library/OcStringLib/OcStringLib]


build.py...
 : error F002: Failed to build module
	/Users/badruzeus/src/EXT_PACKAGES/OcSupportPkg/Library/OcStringLib/OcStringLib.inf [X64, XCODE8, RELEASE]

- Failed -
Build end time: 09:07:33, Jun.10 2019
Build total time: 00:00:10

MacBookPro:Clover badruzeus$

Thanks.

It should be reported to Acidantera.

Share this post


Link to post
Share on other sites
22 hours ago, PMheart said:

Hi,

 

I propose this new patch for kext injection of 10.15:


Index: rEFIt_UEFI/Platform/kext_inject.c
===================================================================
--- rEFIt_UEFI/Platform/kext_inject.c	(revision 4959)
+++ rEFIt_UEFI/Platform/kext_inject.c	(working copy)
@@ -681,8 +681,8 @@
 // Catalina (SIP)
 // PMheart: checked
 // Need to pair with KBEMojaCata*EXT
-UINT8   KBECataSearchSIP[]            = { 0x00, 0x85, 0xC0, 0x0F, 0x84, 0x87, 0x00, 0x00, 0x00, 0x49 };
-UINT8   KBECataReplaceSIP[]           = { 0x00, 0x85, 0xC0, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x49 };
+UINT8   KBECataSearchSIP[]            = { 0xE8, 0xB0, 0xEE, 0x0C, 0x00, 0x85, 0xC0, 0x0F, 0x84 };
+UINT8   KBECataReplaceSIP[]           = { 0xE8, 0xB0, 0xEE, 0x0C, 0x00, 0x31, 0xC0, 0x0F, 0x84 };
 
 // Mojave 10.14 - 10.14.3
 // Avoid race condition in OSKext::removeKextBootstrap when using booter kexts without keepsyms=1.

Don't ask me if it works, of course it does - just read the asm code. ;)

 

PMheart

Sorry for commiting too late.

Share this post


Link to post
Share on other sites
23 hours ago, Slice said:

Is it happen with FakeSMC-6 and never with FakeSMC-3?

FakeSMC jump from 3 to 6? Where is new version please?

Share this post


Link to post
Share on other sites

hello Slice

 

last commit r4962 have problems

 

it boot Mojave but not Catalina

 

in Catalina give KP

 

thanks

Share this post


Link to post
Share on other sites
Posted (edited)
7 hours ago, SavageAUS said:

FakeSMC jump from 3 to 6? Where is new version please?

 

Here it is;

 

cloverefiboot-code-r4961-CloverPackage-CloverV2-ThirdParty-kexts-Other.zip

 

I download a snapshot from here but I am not sure did I right.

 

https://sourceforge.net/p/cloverefiboot/code/4961/tree//CloverPackage/CloverV2/ThirdParty/kexts/Other/

Edited by telepati

Share this post


Link to post
Share on other sites
Posted (edited)

Looks like ext_packages have yet another issue when building Clover.

 

Just letting you guys know in case you come across the same thing.

 

OCSupportPkg should be for OpenCore only. Not sure why is it trying to compile it for Clover... But anyway. Maybe there's no condition put in place to detect what you're trying to compile and only add that support pkg where it's needed.

 

Anyway, I just thought you guys might wanna know about this.

[SLINK] BaseIoLibIntrinsic
Building ... /Users/jimmy/src/EXT_PACKAGES/OcSupportPkg/Library/OcDataHubLib/OcDataHubLib.inf [X64]
/Users/jimmy/src/EXT_PACKAGES/OcSupportPkg/Library/OcStringLib/OcUnicodeLib.c:67:23: error: implicit declaration of function 'CharToUpper' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
  UpperFirstString  = CharToUpper (*FirstString);
                      ^
/Users/jimmy/src/EXT_PACKAGES/OcSupportPkg/Library/OcStringLib/OcUnicodeLib.c:143:23: error: implicit declaration of function 'CharToUpper' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
  UpperFirstString  = CharToUpper (*FirstString);
                      ^
2 errors generated.
make: *** [/Users/jimmy/src/UDK2018/Build/AptioFixPkg/RELEASE_XCODE8/X64/OcSupportPkg/Library/OcStringLib/OcStringLib/OUTPUT/OcUnicodeLib.obj] Error 1


build.py...
 : error 7000: Failed to execute command
	make tbuild [/Users/jimmy/src/UDK2018/Build/AptioFixPkg/RELEASE_XCODE8/X64/OcSupportPkg/Library/OcStringLib/OcStringLib]


build.py...
 : error F002: Failed to build module
	/Users/jimmy/src/EXT_PACKAGES/OcSupportPkg/Library/OcStringLib/OcStringLib.inf [X64, XCODE8, RELEASE]

- Failed -
Build end time: 14:35:16, Jun.10 2019
Build total time: 00:00:04

 

Edited by arsradu

Share this post


Link to post
Share on other sites
8 minutes ago, arsradu said:

Looks like ext_packages have yet another issue when building Clover.

 

Just letting you guys know in case you come across the same thing.

 

OCSupportPkg should be for OpenCore only. Not sure why is it trying to compile it for Clover... But anyway. Maybe there's no condition put in place to detect what you're trying to compile and only add that support pkg where it's needed.

 

Anyway, I just thought you guys might wanna know about this.


[SLINK] BaseIoLibIntrinsic
Building ... /Users/jimmy/src/EXT_PACKAGES/OcSupportPkg/Library/OcDataHubLib/OcDataHubLib.inf [X64]
/Users/jimmy/src/EXT_PACKAGES/OcSupportPkg/Library/OcStringLib/OcUnicodeLib.c:67:23: error: implicit declaration of function 'CharToUpper' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
  UpperFirstString  = CharToUpper (*FirstString);
                      ^
/Users/jimmy/src/EXT_PACKAGES/OcSupportPkg/Library/OcStringLib/OcUnicodeLib.c:143:23: error: implicit declaration of function 'CharToUpper' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
  UpperFirstString  = CharToUpper (*FirstString);
                      ^
2 errors generated.
make: *** [/Users/jimmy/src/UDK2018/Build/AptioFixPkg/RELEASE_XCODE8/X64/OcSupportPkg/Library/OcStringLib/OcStringLib/OUTPUT/OcUnicodeLib.obj] Error 1


build.py...
 : error 7000: Failed to execute command
	make tbuild [/Users/jimmy/src/UDK2018/Build/AptioFixPkg/RELEASE_XCODE8/X64/OcSupportPkg/Library/OcStringLib/OcStringLib]


build.py...
 : error F002: Failed to build module
	/Users/jimmy/src/EXT_PACKAGES/OcSupportPkg/Library/OcStringLib/OcStringLib.inf [X64, XCODE8, RELEASE]

- Failed -
Build end time: 14:35:16, Jun.10 2019
Build total time: 00:00:04

 

vit9696 told me on OpenCore thread it needs AUDK (Acidenthera) instead of UDK.

Share this post


Link to post
Share on other sites
Just now, Badruzeus said:

vit9696 told me on OpenCore thread it needs AUDK (Acidenthera) instead of UDK.

 

Ok...but I'm not trying to build OpenCore. I'm trying to build Clover.

Share this post


Link to post
Share on other sites
40 minutes ago, arsradu said:

 

Ok...but I'm not trying to build OpenCore. I'm trying to build Clover.

I got similar error with OcSupportPkg when building Clover & OpenCore using UDK.

Share this post


Link to post
Share on other sites

Hi @Badruzeus, @arsradu

 

I think i's a AptiofixPg problem not Clover. There is some commits last 4hours 1hour in OCSupportPkg and OpenCore.

 

So wait and see :)

 

What flag to use for external package in ebuild.sh ( ---ext-co or --ext-pre)?

 

Sorry for my bad english

 

Share this post


Link to post
Share on other sites
Posted (edited)
8 minutes ago, Matgen84 said:

Hi @Badruzeus, @arsradu

 

I think i's a AptiofixPg problem not Clover. There is some commits last 4hours 1hour in OCSupportPkg and OpenCore.

 

So wait and see :)

 

What flag to use for external package in ebuild.sh ( ---ext-co or --ext-pre)?

 

Sorry for my bad english

 

At this point, all ebuild.sh parameters related to external packages will cause errors. Some will cause the error I mentioned before, others will cause other errors.

 

Anyway, these are the available options, and I've tried all of them with no success.

print_option_help "--ext-pre" "enable external driver download"
print_option_help "--ext-co" "checkout & build external drivers at ..src/EXT_PACKAGES"
print_option_help "--ext-build" "build existing external drivers located at ..src/EXT_PACKAGES"

The only way I could find to build Clover at this point is to build only Clover (no external drivers)

Edited by arsradu

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Similar Content

    • By ErmaC
      Slice is glad to present a new EFI bootloader.

      CLOVER
      Now version 2 rEFIt based.


      It is open source based on different projects: Chameleon, rEFIt, XNU, VirtualBox. The main is EDK2 latest revision.
      I also want to thank all who help Slice with the development. Credits and copyrights remain in the sources.
      https://sourceforge.net/projects/cloverefiboot/?source=directory
      There is a WIKI 
      http://clover-wiki.zetam.org/
      Main features:


      If you have a question please provide outputs from DarwinDumper (formed from Trauma tool). Thanks Trauma!
      Continued by blackosx and STLVNUB.
      Post#2 CloverGrower - create Clover by yourself Post#3 Downloads Post#4 Installation of the bootloader Post#5 How to do UEFI boot Post#6 How to use - common words Post#7 Calculator for Automatic DSDT fix Post#8 Instructions for GraphicsInjector Post#9 ATIConnector patching Post#10 Any kexts patching with some Samples Post#11 CustomEDID Post#12 Hiding unnecessary menu entries Post#13 Instruction for DSDT corrections to do DeviceInjection works Post#14 Development Post#15 Themes Post#16 About kexts injection Post#17 Instructions for P- and C-states generator Post#18 Patching DSDT to get Sleep working Post#19 CPU settings and geekbench Post#20 ACPI tables loading Post#21 DSDTmini Post#22 Custom SMBios Post#23 F.A.Q. Post#24 iCloudFix Post#25 Using mouse. Post#26 How to make orange icons to be metallic Post#27 How to make software RAID (by Magnifico) Post#28 How to modify InstallESD.dmg (by shiecldk) Post#29 Config.plist settings Post#30 Using extra kexts and skipping kernelcache Post#31 Choosing EFI drivers Post#32 Configuration files Post#33 Automatic config.plist creating Post#34 Custom DSDT patches Post#35 How to do sleep/wake working with UEFI BOOT Post#36 DeviceID substitution (FakeID) Post#37 Using Custom OS Icons Post#38 Hibernation Post#39 Floating regions Post#41 Property List Editor Post#42 Blocking Bad Kext Post#43 AAPL,slot-name Post#44 FakeCPUID for unsupported CPU Post#45 Multiple Boot Options - to write into UEFI BIOS boot menu Post#46 How to install Windows UEFI Post#47 How to speedup Clover boot Post#48 Info.plist patching Post#49 Arbitrary device injection Post#50 Non-Standard Legacy Boot Files Post#51 Reboot to Windows UEFI from Mac OSX Post#52 Deprecated Features Post#53 Using UDK2018 Post#54 Device Properties Post#55 Scalable themes Post#56 How to search Clover mistakes (bisection) -----------------
       
      Slice:
      I edited all posts in the thread to correspond to actual Clover revision.
      Please install Clover at least 2652 and use new instructions.
×