Contribute
Register

[Solved] Compiling FakeSMC

Joined
Nov 6, 2016
Messages
6
Motherboard
Asus Z170 Pro Gaming
CPU
i7-6700K
Graphics
Geforce GTX950
Mac
Mac mini
Classic Mac
iBook
Mobile Phone
Android, iOS
Hi All,

Apologies if this is the wrong place for this thread, admins please feel free to move it :)

I've just completed my first custo-mac build with unibeast and multibeast, successfully installing Sierra on my new machine (Asus Z170 Pro Gaming + i7 Skylake), absolutely painless - great job done by all!

I've been looking to understand the process a littler better and am looking to perform a "Vanilla" install just using Clover, in the hope that I am able to better understand the changes required to get macOS running on commodity hardware - managing my kexts by hand for example.

So far I've managed to successfully build clover from source, prepare a USB installer with the Sierra Install App and install Clover onto that stick....things are looking good so far.

I build FakeSMC from source, using the same changeset as specified in the FakeSMC binary download hosted here: https://www.tonymacx86.com/resources/fakesmc.325/ - direct link to RehabMan's GitHub - https://github.com/RehabMan/OS-X-FakeSMC-kozlek/tree/2958f5581672b7c4e2f81032214a8aad38e76059 - Finally worked out the voodoo at the end of the filename, the 1723 being the number of commits leading to this changeset :)

Dropped the kext off in clover's other folder, boot the installer in verbose mode, wait a while and eventually get stuck at "timeout...AppleACPICPU".

After a little tinker with settings in clover I try the FakeSMC binary download hosted here, which I believe to be the same.

To my surprise I boot straight to the installer without problems.

I compare my binary and the downloaded one to find thousands of differences.

Having pulled the Info.plist out of the downloaded one, I installed exactly the same toolchain Xcode 7.3 and grabbed exactly the same version of the 10.8 SDK (from Xcode 4.6.3) and had another go building - the only difference, I'm building on Sierra 10.12....the original build appears to have been completed on El Capitan 10.11.6.

This time my build's Info.plist matches exactly with the downloaded one yet the binary still has over 1000 differences......and I still get the timeout when booting.

Can anyone shed some light on what I might be doing wrong.....is there a patch I'm missing for Sierra?

I'd really appreciate any help.

Once I've worked these few problems out I was planning on posting a guide for other intrepid idiots like myself who like pain for no reason :)

Thanks,

Phil

Update:

Found that the current version of FakeSMC.kext hosted on tonymacx86 (v6.21-311-g2958f55.1723) is identical to a version hosted on RehabMan's BitBucket page: https://bitbucket.org/RehabMan/os-x-fakesmc-kozlek/downloads (RehabMan-FakeSMC-2016-0908).

@RehabMan Can you lend a hand?
 
Last edited:

RehabMan

Moderator
Joined
May 3, 2012
Messages
190,973
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
MacBook Air
Mobile Phone
iOS
Hi All,

Apologies if this is the wrong place for this thread, admins please feel free to move it :)

I've just completed my first custo-mac build with unibeast and multibeast, successfully installing Sierra on my new machine (Asus Z170 Pro Gaming + i7 Skylake), absolutely painless - great job done by all!

I've been looking to understand the process a littler better and am looking to perform a "Vanilla" install just using Clover, in the hope that I am able to better understand the changes required to get macOS running on commodity hardware - managing my kexts by hand for example.

So far I've managed to successfully build clover from source, prepare a USB installer with the Sierra Install App and install Clover onto that stick....things are looking good so far.

I build FakeSMC from source, using the same changeset as specified in the FakeSMC binary download hosted here: https://www.tonymacx86.com/resources/fakesmc.325/ - direct link to RehabMan's GitHub - https://github.com/RehabMan/OS-X-FakeSMC-kozlek/tree/2958f5581672b7c4e2f81032214a8aad38e76059 - Finally worked out the voodoo at the end of the filename, the 1723 being the number of commits leading to this changeset :)

Dropped the kext off in clover's other folder, boot the installer in verbose mode, wait a while and eventually get stuck at "timeout...AppleACPICPU".

After a little tinker with settings in clover I try the FakeSMC binary download hosted here, which I believe to be the same.

To my surprise I boot straight to the installer without problems.

I compare my binary and the downloaded one to find thousands of differences.

Having pulled the Info.plist out of the downloaded one, I installed exactly the same toolchain Xcode 7.3 and grabbed exactly the same version of the 10.8 SDK (from Xcode 4.6.3) and had another go building - the only difference, I'm building on Sierra 10.12....the original build appears to have been completed on El Capitan 10.11.6.

This time my build's Info.plist matches exactly with the downloaded one yet the binary still has over 1000 differences......and I still get the timeout when booting.

Can anyone shed some light on what I might be doing wrong.....is there a patch I'm missing for Sierra?

I'd really appreciate any help.

Once I've worked these few problems out I was planning on posting a guide for other intrepid idiots like myself who like pain for no reason :)

Thanks,

Phil

Update:

Found that the current version of FakeSMC.kext hosted on tonymacx86 (v6.21-311-g2958f55.1723) is identical to a version hosted on RehabMan's BitBucket page: https://bitbucket.org/RehabMan/os-x-fakesmc-kozlek/downloads (RehabMan-FakeSMC-2016-0908).

@RehabMan Can you lend a hand?
You can build it with the current Xcode (currently 8.1), but you need to add the 10.8 SDK (no idea what happens if you use a different SDK).

Use 'make'.
 
Joined
Nov 6, 2016
Messages
6
Motherboard
Asus Z170 Pro Gaming
CPU
i7-6700K
Graphics
Geforce GTX950
Mac
Mac mini
Classic Mac
iBook
Mobile Phone
Android, iOS
Hi RehabMan,

Thanks for getting back to me so fast.

I've tried with with Xcode 8.1 originally....I just tried with 8.

Fresh Xcode app, deleted all the others and emptied my trash.

Added the 10.8 and 10.10 SDKs from their respective Xcode versions, into the Xcode 8 package SDK directory. Updated the appropriate info.plist allowing Xcode to recognise the SDKs.

Executed make from the command line and ended up with "Build Successful" and a big bunch of binaries.

Dropped the Release build of FakeSMC into my EFI partition on the memory stick, boot and bam same AppleACPICPU timeout error.

I suspected that this was totally unrelated for a while...it may still be. It seemed strange that whenever I drop your binary in instead of mine it boots fine.

Thats what got me looking at the differences between mine and your binary. I was expecting to see the odd bit of change due to timestamps and the like but there's bytes all over the place.

It doesn't sound like I'm doing anything wildly different to you.....have you got any other idea?

Really appreciate the help by the way!

Thanks,

Phil
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
190,973
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
MacBook Air
Mobile Phone
iOS
Hi RehabMan,

Thanks for getting back to me so fast.

I've tried with with Xcode 8.1 originally....I just tried with 8.

Fresh Xcode app, deleted all the others and emptied my trash.

Added the 10.8 and 10.10 SDKs from their respective Xcode versions, into the Xcode 8 package SDK directory. Updated the appropriate info.plist allowing Xcode to recognise the SDKs.

Executed make from the command line and ended up with "Build Successful" and a big bunch of binaries.

Dropped the Release build of FakeSMC into my EFI partition on the memory stick, boot and bam same AppleACPICPU timeout error.

I suspected that this was totally unrelated for a while...it may still be. It seemed strange that whenever I drop your binary in instead of mine it boots fine.

Thats what got me looking at the differences between mine and your binary. I was expecting to see the odd bit of change due to timestamps and the like but there's bytes all over the place.

It doesn't sound like I'm doing anything wildly different to you.....have you got any other idea?

Really appreciate the help by the way!

Thanks,

Phil
No ideas for you really. I build FakeSMC.kext on a variety of different machines, some running different Xcode. It works...
 
Joined
Nov 6, 2016
Messages
6
Motherboard
Asus Z170 Pro Gaming
CPU
i7-6700K
Graphics
Geforce GTX950
Mac
Mac mini
Classic Mac
iBook
Mobile Phone
Android, iOS
All,

I found it!!!

Some random ACPI table dropping lead me to a kernel panic....at the top of the kernel panic was an error that FakeSMC failed to load as CFBundleVersion was invalid.

Checked out the plist file.....no CFBundleVersion defined.

Finally found the cause - I downloaded a snapshot of your repo rather than cloned it.

The script PreBuild.sh calls svn or git to ascertain version information, that was silently failing and the build was ending up version less.

A quick hacked in version later and we're away.....a git clone and we're building with all our proper versions intact.

I was almost about to give up....phew,

Thanks again,

Phil
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
190,973
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
MacBook Air
Mobile Phone
iOS
All,

I found it!!!

Some random ACPI table dropping lead me to a kernel panic....at the top of the kernel panic was an error that FakeSMC failed to load as CFBundleVersion was invalid.

Checked out the plist file.....no CFBundleVersion defined.

Finally found the cause - I downloaded a snapshot of your repo rather than cloned it.

The script PreBuild.sh calls svn or git to ascertain version information, that was silently failing and the build was ending up version less.

A quick hacked in version later and we're away.....a git clone and we're building with all our proper versions intact.

I was almost about to give up....phew,

Thanks again,

Phil
I had just assumed you used 'git' to clone the project...
Glad you got it sorted.
 
Joined
Jul 26, 2018
Messages
680
Motherboard
Asus Z370-A Prime II
CPU
i7-8700
Graphics
RX 580
Mac
MacBook Pro
Mobile Phone
iOS
@RehabMan, I noticed here and there the mention of compiling a kext such as Fakesmc, Lilu, etc... Im not sure if I understand the purpose in compiling versus installing with KextBeast and Kext Utility or wether or not they're synonymous. Do you know of any reading I could find to view? Thanks.
 

Going Bald

Moderator
Joined
Aug 14, 2010
Messages
22,973
Motherboard
GA-X58A-UD7-F7
CPU
W3670
Graphics
RX 580
Mac
iMac, MacBook Pro, Mac mini
Classic Mac
iMac
@RehabMan, I noticed here and there the mention of compiling a kext such as Fakesmc, Lilu, etc... Im not sure if I understand the purpose in compiling versus installing with KextBeast and Kext Utility or wether or not they're synonymous. Do you know of any reading I could find to view? Thanks.
In order for source code to run you need to compile it to create the .kext file. You then install the .kext file in your system, repair permissions and rebuild your caches. This can be done manually, or place the kext on your desktop and run the kext install app of your choice and it automatically does this for you.
 
Top