Jump to content
InsanelyMac Forum
ErmaC

Clover v.2 Instructions

Recommended Posts

How to make orange icons to be metallic

 
If you see orange drive instead of metallic, external instead of internal, and DVD player doesn't work you may:
- use other icns file, but this doesn't solve DVD problem;
- substitute DeviceID from ICH6, but this reduce SATA functionality;
- use DeviceMergeNub, but it is additional kext;
- use patched AppleAHCIPort.kext, but until SoftwareUpdate.
It is better to write into Clover's config.plist

	<key>KernelAndKextPatches</key>
	<dict>
		<key>KextsToPatch</key>
		<array>
			<dict>
				<key>Comment</key>
				<string>Orange_icons_fix</string>
				<key>Name</key>
				<string>AppleAHCIPort</string>
				<key>Find</key>
				<data>RXh0ZXJuYWw=</data>
				<key>Replace</key>
				<data>SW50ZXJuYWw=</data>
			</dict>
		</array>
	</dict>

It works! Drives are metallic, DVD player works.

Edited by Slice
Update

Share this post


Link to post
Share on other sites
Advertisement

How to create a software raid 0 mode UEFI-bootable

 

1) get two identical disk ( better if you have SSD)

 

2) My advice is to have a pen drive from 8 gigabytes, where install clover. Formatted in fat 32 damzar Uefi Boot Clover

 

3) Have a OSX running, to clone the raid in later stage ( Carbon Cloner )

 

4) Create a raid Software ,with option 128 k ( is very performance )

 

5) Clone with Carbon Cloner

 

6) Start with thumb drive, to see if your OSX works

 

7) If work ( OSX) We must make it without the need of bootable pen drive

 

8) Run terminal and write diskutil list

 

9) Now you have to make visible the hidden EFI partition with this Terminal command :

mkdir /Volumes/efi

sudo mount -t msdos /dev/diskXs1 /Volumes/efi ( diskXs1 is your identifier , so write instead of your )

 

10) Now in your desktop t here will be a disk called EFI , and in this copy your efi folder from your pen drive ... previously performed with clover

 

Note this procedure with terminal have to do with the other efi disk hidden .

 

Work in progress short also will screen

 

How create raid

Open diskutility

scrn50b20100.png

 

When it ends, you will create this

 

scrn50b2033d.png

 

Use Carbon Cloner

 

scrn50b20612.png

 

When all finished to this

scrn50b20a39.png

 

Ok , now restart pc and boot again with pen drive

In gui clover there is a option :

Select with keyboard

screenshot1fnp.png

 

And Add this

screenshot2zd.png

 

Now restart pc and enter in your bios , and select First boot Clover osx

 

Good luck

 

And this score on two samsung 840 pro

 

schermata20121125alle15.png

 

It is fantastic SSD

 

schermata20121125alle15.png

Edited by ErmaC
Update

Share this post


Link to post
Share on other sites

How to modify InstallESD.dmg

 

You'll needinvisibliX:

http://www.macupdate...5872/invisiblix

 

1.Mount InstallESD.dmg in Install OS X Mountain Lion.app/Contents/SharedSupport

 

2.Restore InstallESD.dmg to the target partition that you want to use for installing OS X with Disk Utility.

(Drag the disk icon.)

 

0Jlau.jpg

 

3.Open invisibliX and press the magnifier to show hidden files.

 

4.Mount BaseSystem.dmg in Mac OS X Install ESD.

 

5.Convert BaseSystem.dmg to read/write dmg in Disk Utility.

 

p8wz0.jpg

 

4hbTm.jpg

 

6.Unmount the original compressed BaseSystem.dmg and mount the read/write BaseSystem.dmg.

 

7.Remove kexts which can cause boot problem. (e.g., AppleTyMCEDriver.kext, ATI6000Controler.kext, etc.)

Use terminal to remove kext in System/Library/Extensions in Mac OS X Base System with this code to prevent permission problem while deleting kext:


sudo rm -rf "drop all kexts you want to remove to here"

 

8.Convert the read/write BaseSystem.dmg back to compressed dmg.

 

SUGHb.jpg

 

9.Use terminal to replace BaseSystem.dmg in the USB install partition:


sudo cp "drop the modified compressed BaseSystem.dmg to here" "drop the USB install partition to here"

Before pressing Enter, drop the modified compressed BaseSystem.dmg to invisibliX and check Hidden. Now, you can press Enter in terminal.

 

Finish!

 

 

-Advance-

 

If you want to hide the install partition under OS X, you should convert the partition to Apple_boot just like Mac's Recovery HD:

 

In terminal:

1.Find your install partition which is diskXsY:


diskutil list

 

2.Get root permission and enter your password:


sudo -s

 

3.Unmount the partition before you convert it: (diskXsY is the install partition)


diskutil umount diskXsY

 

4.Convert the partition to Apple_boot. (diskXsY is the install partition)


asr adjust --target /dev/diskXsY -settype "Apple_Boot"

 

 

When you want to mount the install partition, use this code in terminal: (diskXsY is the install partition)


diskutil mount diskXsY

To unmount it:


diskutil umount diskXsY

Edited by shiecldk
Update

Share this post


Link to post
Share on other sites

Config.plist settings

 

Sometimes it is hard to find what values should be set in config.plist. Especial because most documentation is in Russian language. (Good their are online translators :P)
I have created this post about values that can be set in your config.plist, with help from Clover developers.
Remember that you only need listed settings in your config.plist, if you want to change their default values.

Useful Links:
config.plist example.
All strings in config.plist.

SystemParameters
prev-lang:kbd - (Language:keyboard-code, default: ru:0): Sets the Clover GUI language and keyboard type.
Languages available:
en - english
ru - russian
it - italian
es - spanish
pt - portuguese
pl - polish
de - german
id - indonesian
ko - korean
fr - french
ua - ukrainian
boot-args - -v (verbose mode) -x (safe mode) npci=0x2000 (PCI Configuration Fix) darkwake=0 (for setting the "Deep sleep" mode in Lion/ML) slide=0 (Only needed for ML): Sets boot-flags to be used for booting OS X. Not all flags may be needed: e.g. safe mode
LegacyBoot - (set to: PBR): But could also be LegacyBiosDefault or PBRtest. It's just the method of legacy booting, it probably won't make a difference. For some users using another method could fix legacy booting. (info by apianti)
BacklightLevel - (default: 0xFFFF): Changes the luminosity of the back light of a laptop display. 0x0 is none, 0xFFFF is full back lighting. (info by apianti)
CustomUUID - You have to boot OS X with Chameleon to set this value. After booting with Chameleon, open System Report, copy the Hardware UUID and paste it here. But see InjectSystemID first!
InjectSystemID - (Yes/No, default: No): See this postby dmazar.
iCloudFix - (Yes/No, default: Yes): May be enabled to get iCloud to work. Dropped

Pointer
Enable - (Yes/No, default: Yes): Enables or disables the mouse-pointer in the Clover-GUI.
Speed - (default: 8): If enabled, sets the mouse-pointer movement speed.
DoubleClickTime - (default: 500): Set the double-click reaction time.
Mirror - (Yes/No, default: No): Rotate the mouse-pointer direction. (?)

Graphics
GraphicsInjector - (Yes/No): Needed for unsupported GPU's to get full resolution/QE. If set to Yes, e.g. nVidia GeForce 450 GTS becomes EVGA nVidia GeForce 450 GTS (if supported).
VRAM - (auto) Set the given GPU RAM value (MB-format), e.g. 1024.
LoadVBios - (Yes/No, default: No): Also available in Chameleon. You will have the ability to load a custom VBIOS for the GPU.
VideoPorts - (auto): Number of video outputs to map.
FBName - (auto): Has something to do with ATI Radeon cards.
NVCAP - (auto): Option for nVidia-cards. Don't know what it does exactly (something to do wich (output)-port to be used).
display-cfg - (auto): See this topic for information about this key.
DualLink - (auto?):
InjectEDID - (Yes/No, default: Yes): See Wikipedia about EDID. Try to use Yes, if you get a blank screen while booting.
CustomEDID - (auto): Set a CustomEDID if non-DDC monitor. See this post for more information about this key.
PatchVBios - (Yes/No, default: No): Set to Yes, to auto patch Clover-GUI video resolution. Using PatchVBiosBytes is the recommend method.
PatchVBiosBytes - (custom): See this post for using this with nVidia GPU.

More information how to get your GPU to work (Radeon, etc.), see this post.

PCI
PCIRootUID - (Number, default: 0): If OS X can't find the GPU PCI-UID location. A patched DSDT is recommend to fix this problem. If a custom DSDT.aml cannot be used set the correct PCI-UID here. (More Info)
StringInjector - (Yes/No, default: No): Inject EFI-strings for GPU, ethernet, audio, etc. See key DeviceProperties.
DeviceProperties - (auto): If StringInjector it set to Yes, paste the generated EFI-string here.
LpcTune - (Yes/No, default: No): I believe that LpcTune actually doesn't have a purpose now as it was abandoned by Slice cause it didn't work correctly or something, Idk there's a conversation about it we had earlier. InjectClockId is needed to recover USB devices from sleep. (info by apianti)
HDAInjection - (Yes/No/Hex.., default: Detect): See this post for more info. Set to No, if using a patched DSDT.aml and AppleHDA.kext.
USBInjection - (Yes/No, default: Yes): Needed to get resume by keyboard to work. But if it is not working for you, set to No.
InjectClockID - (Yes/No, default: No): InjectClockId is needed to recover USB devices from sleep. (info by apianti)
USBFixOwnership - (Yes/No, default: Yes): Fixes USB-ownership problems in UEFI-mode.

ACPI
See information from here, here and here to set the correct ACPI-settings.
DsdtName - Filename to be used for a generated DSDT-file or set to BIOS.aml if Clover needs to generate one for you. (See FixDsdtMask)
DropOemSSDT - (Yes/No, default: No): DropOemSSDT should only be used if you are injecting a patched SSDT or if you enabled GenerateCStates/GeneratePStates.
I recommend to generate a last SSDT-7/SSDT-8.aml file with freq/power-values that matches the system's CPU. Place it in the /ACPI/Patched folder to solve the hanging CPU-freq issue. A way to generate this file, is by using Revogirl's ssdtPRGen.sh. To terminate the last SSDT-number, dump to origin tables in Clover with the F4-key.
DropDMAR - (Yes/No, default: No): Needs to be enabled to fix the AppleACPIPlatform.kext boot problem in 10.8.2.
DropBGRT - See post from =)(=
GenerateCStates - (Yes/No, default: No): Set to Yes, if booting gives you weird ACPI_SMC_PlatformPlugin errors.
GeneratePStates - (Yes/No, default: No): Same note as GenerateCStates.
PLimitDict - (Number, default: 0): Limit the maximum CPU P-state, by number.
UnderVoltStep - (Number, default: 0): Limit the maximum CPU Voltage, by number.
DoubleFirstState - (Yes/No, default: No): ??
ResetAddress - (should be: 0x64): Restart address
ResetValue - (should be: 0xFE): Restart address
EnableC6 - (Yes/No, default: No): Enable/disable CPU C6 reporting. (CPU-power saving)
EnableC4 - (Yes/No, default: No): Enable/disable CPU C4 reporting. (CPU-power saving)
EnableC2 - (Yes/No, default: No): Enable/disable CPU C2 reporting. (CPU-power saving)
C3Latency - (should be: 0x03e9): If CPU supports Turbo, you may set to 0x00FA.
EnableISS - (Yes/No, default: No): This should be Enabled to fix ACPI_SMC_PlatformPlugin console errors.
smartUPS - (Yes/No, default: No): For MacPro - cosmetic.
PatchAPIC - (Yes/No, default: No): ??
FixDsdtMask - (Mask): See this topic. If you want to disable DSDT fixing: 0x0000 FixDsdtMask should be avoided for actual DSDT patches. (info by apianti)
RememberBIOS - (Yes/No, default: No): See this post

SMBIOS
Set a custom iModel. Clover will set the model that matches your system. But you can provide custom data here. (Chameleon Wizard, champlist can be used to get SMBios information)

CPU
Users should dissuade from using any of the CPU keys besides Turbo, as they should be set automatically. I believe it's also set automatically to whether the cpu supports turbo in the first place though. (info by apianti)
Read this post for CPU-values that can be set.

KernelAndKextPatches
Debug - (Yes/No, default: No): Needed to debug Clover at boot.
KernelCpu - (Yes/No, default: No): Enable to patch the kernel for unsupported CPU's. (Atom, Ivy, Pentium 4)
AsusAICPUPM - (Yes/No, default: No): AppleIntelCPUPowerManagement.kext patch. No needed if using a patched BIOS.
AppleRTC - (Yes/No, default: No): Patch that fixes AppleRTC.kext boot problem. Needed for 10.6 and above.
KextsToPatch - (custom): See this post and this post.

Volumes
See this post and this post.

Thanks goes out the developers. Just try to help new users. :)

Edited by Slice
Change ge -> de for german

Share this post


Link to post
Share on other sites

Using extra kexts and skipping kernelcache

 

© dmazar

Rev 1351 - Changes regarding kext injection once again. FSInject is also changed and needs to be updated.

 

- big change: no kext injection of extra kexts by default any more (extra kexts are kexts from kexts/10.8 or kext/other or kexts/xxx)

- removed NoKexts and added WithKexts

- if you want to boot OSX (or installer or Recovery) with additional kexts from kexts/xxx then you must specify WithKexts option in boot-args (config.plist or type it in Clover GUI) or just choose "Boot Mac OS X with extra kexts" in OSX submenu (press SPACE in main GUI to get it)

- changed FSInject so that is allows some kext patching when boot.efi refuses to load kernelcache for some reason

- fixed RemoveLoadOption() function which was not working

- fixed debugging of kext patching (config.plist: KernelAndKextPatches/Debug=Yes) when refit.conf "quiet" option is used

 

So, once more about kext injection ...

There are two methods of injection:

 

1. in-memory injection - can inject kexts into kernelcache (ML, Lion) and also when booting kernel+kexts. it's built into CloverX64.efi. it patches kernel on-the-fly to enable kext injection into kernelcache. that depends on kernel version and boot args, meaning: it can stop working in some future OSX version until somebody fixes it again

 

2. file system level injection - requires FSInject.efi driver which fools boot.efi into thinking that kexts/xxx/*.kext are inside /S/L/E. works only when booting kernel+kexts. works with any OSX version, but requires blocking caches (kernelcache or mkext). this FSInject driver additionally can force loading of certain kexts by changing their OSBundleRequired=Safe Boot into OSBundleRequired=Root on the fly when those kexts are needed for patching.

 

You can control this injection process and blocking of caches (kernelcache, mkext) by adding WithKext and/or NoCaches into boot args (config.plist or editing in Clover GUI), or by pressing SPACE in Clover GUI and selecting appropriate subentry booting option.

 

Works like this:

- if WithKext and NoCaches are not specified (default) - kexts from kexts/xxx/ will not be injected and kernelcache will normally be used

- if WithKexts is specified (or "Boot Mac OS X with extra kexts" subentry is selected) - then kexts from kexts/xxx/ will be injected. either in-memory injection into kernelcache or file system level injection, depending on how boot.efi will load the system

- if NoCaches is specified (or "Boot Mac OS X without caches" is selected) - FSInject driver will be used to block kernelcache (or mkext) and will force boot.efi to load kernel+kexts. kexts from kexts/xxx/ will not be injected.

- if NoCaches and WithKexts are specified - then it's the same as above (NoCache), but kexts from kexts/xxx/ will be injected

 

Once more, but in a different way:

 

Put your extra kexts needed for booting OSX into kexts/other for example (/efi/clover/kexts/other).

 

Case 1: users who have all needed kexts installed into /S/L/E

- do not put WithKext and NoCaches into config.plist boot args, because you normally do not need extra kext injection

- if you need to boot installer or recovery partition, then select it in Clover GUI, press SPACE to get additional options and choose "Boot Mac OS X with extra kexts" to boot them - this will inject extra kexts

 

Case 2: users who prefer not to install extra kexts into /S/L/E

- add WithKexts into config.plist boot-args and your extra kexts will always be injected

- you can boot installer and recovery with this same option

Edited by ErmaC
Update

Share this post


Link to post
Share on other sites

Choosing EFI drivers


Folder drivers64UEFI  may contains files at user's choice:

CsmVideoDxe-64.efi
Driver video for Clover GUI allowing to choose more resolutions. It based on CSM module in UEFI BIOS and required CSM will be enabled.
The driver is dangerous. Clover may not started with it and you may have wake problem in system. Use with precautions.

DataHubDxe-64.efi
This is DataHub protocol support obligatory for MacOSX. Usually it is already present but sometime it may be missed, in this case you should see warning on screen.
The presence of the file is always safe.

EmuVariableUefi-64.efi
This is support for NVRAM variables needed for MacOSX . Mostly UEFI boot uses hardware NVRAM but in some rare cases this driver is needed.
Use it only if you have a problem without it!

OsxAptioFixDrv-64.efi
Memory fix for UEFI such as AMI Aptio

OsxLowMemFixDrv-64.efi
The simplified version of OsxAptioFixDrv. Don't use them together!

PartitionDxe-64.efi
This is support for non-usual partition maps such as: hybrid GPT/MBR or Apple Partition Map.
The presence of the file is always safe.
 
 
NvmExpressDxe-64.efi
Support for SSD connected to NVM Express bus
 
VBoxExt2.efi or VBoxExt4.efi
Support for Linux file system to be able to boot UEFI Linux.
 
XhciDxe.efi
Support for USB3 bus , mostly Intel controllers.

Share this post


Link to post
Share on other sites

Configuration files


Since revision 1650+ there are no more refit.conf and settings.conf,
Now the common file config.plist and each theme contains own file theme.plist

Locations:
For CloverEFI we have /EFI/CLOVER/OEM/Z77X-UD5H/config.plist

But for UEFI there is a different place /EFI/CLOVER/OEM/Z77X-UD5H/UEFI/config.plist

If OEM place is not found then there is a common place
/EFI/CLOVER/config.plist

For theme each folder contains the file as in the example
/EFI/CLOVER/themes/black_green/theme.plist

A sample theme.plist

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>Author</key>
	<string>Slice</string>
	<key>Year</key>
	<string>2012</string>
	<key>Description</key>
	<string>Main metallic looking theme</string>
	<key>Theme</key>
	<dict>
		<key>Badges</key>
		<dict>
			<key>Show</key>
			<true/>
			<key>Inline</key>
			<false/>
			<key>Swap</key>
			<false/>
		</dict>
		<key>Background</key>
		<dict>
			<key>Path</key>
			<string>MetalDragon.png</string>
			<key>Type</key>
			<string>Scale</string>
			<key>Dark</key>
			<false/>
			<key>Sharp</key>
			<string>0x80</string>
		</dict>
		<key>Banner</key>
		<string>logo-trans.png</string>
		<key>Font</key>
		<dict>
			<key>CharWidth</key>
			<integer>10</integer>
			<key>Path</key>
			<string>BoG_LucidaConsole_10W_NA.png</string>
			<key>Type</key>
			<string>Load</string>
		</dict>
		<key>Selection</key>
		<dict>
			<key>Big</key>
			<string>Select_trans_big.png</string>
			<key>Color</key>
			<string>0xF3F3F380</string>
			<key>Small</key>
			<string>Select_trans_small.png</string>
			<key>OnTop</key>
			<false/>
		</dict>
		<key>Anime</key>
		<array>
			<dict>
				<key>ID</key>
				<integer>1</integer>
				<key>Path</key>
				<string>logo_3D</string>
				<key>Frames</key>
				<integer>15</integer>
				<key>FrameTime</key>
				<integer>200</integer>
			</dict>
		</array>
	</dict>
</dict>
</plist>

 
 

Config.plist contains hundreds parameters described in own sections and contains in /doc section of installed Clover.
New section GUI is intended to replace refit.conf

	<key>GUI</key>
	<dict>
		<key>Custom</key>
		<dict>
			<key>Entries</key>
			<array>
				<dict>
					<key>AddArguments</key>
					<string>-v</string>
					<key>Arguments</key>
					<string>Kernel=mach_kernel</string>
					<key>Disabled</key>
					<true/>
					<key>Hidden</key>
					<false/>
					<key>Hotkey</key>
					<string>M</string>
					<key>InjectKexts</key>
					<false/>
					<key>NoCaches</key>
					<false/>
					<key>Path</key>
					<string>\EFI\BOOT\BOOTX64.efi</string>
					<key>Title</key>
					<string>MyCustomEntry</string>
					<key>Type</key>
					<string>OSXRecovery</string>
					<key>Volume</key>
					<string>D68F1885-571C-4441-8DD5-F14803EFEF54</string>
				</dict>
				<dict>
					<key>Hidden</key>
					<false/>
					<key>InjectKexts</key>
					<false/>
					<key>NoCaches</key>
					<false/>
					<key>SubEntries</key>
					<array>
						<dict>
							<key>AddArguments</key>
							<string>-v</string>
							<key>Title</key>
							<string>Boot OS X 10.8.5 (12F36) Mountain Lion in Verbose Mode</string>
						</dict>
					</array>
					<key>Title</key>
					<string>OS X 10.8.5 (12F36) Mountain Lion</string>
					<key>Type</key>
					<string>OSX</string>
					<key>Volume</key>
					<string>454794AC-760D-46E8-8F77-D6EB23D2FD32</string>
				</dict>
			</array>
			<key>Legacy</key>
			<array>
				<dict>
					<key>Disabled</key>
					<true/>
					<key>Hidden</key>
					<false/>
					<key>Hotkey</key>
					<string>L</string>
					<key>Title</key>
					<string>MyLegacyEntry</string>
					<key>Type</key>
					<string>Windows</string>
					<key>Volume</key>
					<string>89433CD3-21F2-4D3C-95FC-722C48066D3A</string>
				</dict>
			</array>
			<key>Tool</key>
			<array>
				<dict>
					<key>Arguments</key>
					<string>-b</string>
					<key>Disabled</key>
					<false/>
					<key>Hidden</key>
					<false/>
					<key>Hotkey</key>
					<string>S</string>
					<key>Path</key>
					<string>\EFI\CLOVER\TOOLS\Shell64-v1.efi</string>
					<key>Title</key>
					<string>MyCustomShell</string>
					<key>Volume</key>
					<string>D68F1885-571C-4441-8DD5-F14803EFEF54</string>
				</dict>
			</array>
		</dict>
		<key>CustomIcons</key>
		<false/>
		<key>Hide</key>
		<array>
			<string>Windows</string>
			<string>\EFI\BOOT\BOOTX64.EFI</string>
		</array>
		<key>Language</key>
		<string>ru:0</string>
		<key>Mouse</key>
		<dict>
			<key>DoubleClick</key>
			<integer>500</integer>
			<key>Enabled</key>
			<true/>
			<key>Mirror</key>
			<false/>
			<key>Speed</key>
			<integer>2</integer>
		</dict>
		<key>Scan</key>
		<dict>
			<key>Entries</key>
			<true/>
			<key>Legacy</key>
			<false/>
			<key>Tool</key>
			<true/>
		</dict>
		<key>ScreenResolution</key>
		<string>1024x768</string>
		<key>ConsoleMode</key>
		<string>0</string>
		<key>TextOnly</key>
		<false/>
		<key>Theme</key>
		<string>metal</string>
	</dict>

config-sample.plist.zip

Share this post


Link to post
Share on other sites

Automatic config.plist creating


The method is follow:
1. use some simple config.plist. DSDT name set to BIOS.aml and mask to 0xFFFF
2. try to boot and see result. If not success then look for resolving your problem somewhere in the net.
3. change parameters using Options menu.
4. Repeat 2, 3 until success.
5. As you booted into OS then you can launch Terminal and call the utility
./clover-genconfig >config.plist
Compare this new file with your old one and apply changes.
Voila! You have working config.plist.

Binary and sources attached. Also sources sent to sf.net for future update.

The utility depends on Clover revision so always use current version from sf.net. It also installed by the Clover installer.

You must be started with Clover rev.2652+. 

clover-genconfig.zip

Share this post


Link to post
Share on other sites

Custom DSDT patches


Revision 1915

You can apply a set of arbitrary patches to DSDT.
Find and Replace data may have different length. Replace string may be zero.

	<key>ACPI</key>
	<dict>
		<key>PatchesDSDT</key>
		<array>
			<dict>
				<key>Find</key>
				<data>W4IeQkFUMQhfSElEDEHQDAoIX1VJRAEUCF9TVEEApAA=</data>
				<key>Replace</key>
				<data></data>
			</dict>
			<dict>
				<key>Find</key>
				<data>UFhTWAhfQURSAAhfUFJXEgYC</data>
				<key>Replace</key>
				<data>UFhTWAhfQURSAAhfU1VOCgQIX1BSVxIGAg==</data>
			</dict>
		</array>
	</dict>

Results:
First patch is deleting Device (BAT1) because my desktop has no batteries.
Diff looks like the follow

@@ -10835,16 +10830,6 @@ DefinitionBlock ("DSDT-B1FF.aml", "DSDT"
				 }
			 }
 
-			Device (BAT1)
-			{
-				Name (_HID, EisaId ("PNP0C0A"))  // _HID: Hardware ID
-				Name (_UID, One)  // _UID: Unique ID
-				Method (_STA, 0, NotSerialized)  // _STA: Status
-				{
-					Return (Zero)
-				}
-			}
-
			 Scope (\)
			 {

Second patch is adding a string

@@ -5038,6 +5048,7 @@ DefinitionBlock ("DSDT-B1FF.aml", "DSDT"
				 Device (GIGE)
				 {
					 Name (_ADR, Zero)  // _ADR: Address
+					Name (_SUN, 0x04)  // _SUN: Slot User Number
					 Name (_PRW, Package (0x02)  // _PRW: Power Resources for Wake
					 {
						 0x09, 
@@ -5063,7 +5074,7 @@ DefinitionBlock ("DSDT-B1FF.aml", "DSDT"

Next I expected guru to invent some set of useful patches.

See samples at Applelife.ru #6458 and next posts. Comments on russian but samples are digital.

 

New format for Clover-2k

<key>ACPI</key>
<dict>
	<key>DSDT</key>
	<dict>
		<key>Patches</key>
		<array>
			<dict>
				<key>Comment</key>
				<string>Remove battery device from desktop</string>
				<key>Find</key>
				<data>W4IeQkFUMQhfSElEDEHQDAoIX1VJRAEUCF9TVEEApAA=</data>
				<key>Replace</key>
				<data></data>
			</dict>
			<dict>
				<key>Find</key>
				<data>UFhTWAhfQURSAAhfUFJXEgYC</data>
				<key>Replace</key>
				<data>UFhTWAhfQURSAAhfU1VOCgQIX1BSVxIGAg==</data>
			</dict>
		</array>
	</dict>

Share this post


Link to post
Share on other sites

How to do sleep/wake working with UEFI BOOT.

 
It was problem #1 with UEFI BOOT.
Users usually claim that sleep-wake is not working with Clover while working with Chameleon. This is wrong claim.
There is a problem with UEFI BOOT which is possible only with Clover but all is good with LEGACY BOOT with Clover, Chameleon and other bootloaders.
 
Now I may said exactly that for working sleep/wake in the case of UEFI boot you need a videocard with UEFI BIOS. I reflashed my Radeon HD6670 with custom-made UEFI BIOS, 
set the follow in mother bios
Full LOGO = Disabled
OS = Windows 8
CSM support = never
130712183332.png
 
And now I have only UEFI boot (no legacy is possible).
I have native resolution in Clover GUI 1920x1080 without additional UEFI drivers.
I have full working sleep and wake.
New ACPI table VFCT.
 
No custom DSDT, just Clover provided fixes for BIOS.aml
FixDSDTMask=0x30DF
 
 
RESOLVED.
With Clover rev 1942+ sleep/wake works fine without any conditions. In UEFI mode you need OsxAptioFixDrv new revision.

Share this post


Link to post
Share on other sites

PCI DeviceID substitution

 

In the case you have a device with unsupported DeviceID but near with supported you may

- use DSDT patch

- make LegacyXXX.kext

- correct xxx.kext/Contents/Info.plist to contain your DeviceID.

But now you can just write into Clover's config.plist some of follow settings

	<key>PCI</key>
	<dict>
		<key>FakeID</key>
		<dict>
			<key>ATI</key>
			<string>0x68181002</string>
			<key>IntelGFX</key>
			<string>0x01268086</string>
			<key>LAN</key>
			<string>0x436311ab</string>
			<key>NVidia</key>
			<string>0x0fe010de</string>
			<key>SATA</key>
			<string>0x25628086</string>
			<key>WIFI</key>
			<string>0x431214e4</string>
			<key>XHCI</key>
			<string>0x0</string>
		</dict>

Then these new device-id will be assigned to corresponding devices during DSDT patch.

In the example above you may see the follow tricks:

- AMDRadeonHD7850 has unsupported DeviceID=0x6819. We change here to 0x6818.

- NVidia GTX660 has DID=0x1183 while for AGPM we change it to 0fe0.

- Intel HD3000 DID=0x0122 works if we change it to 0x0126

- Dell Wireless 1595, DeviceID=0x4315 is not supported. FakeID=0x431214E4 in 10.6.8

- Marvell Yukon 8056, DeviceID=0x4353 is not supported. FakeID=0x436311ab

 

New format for Clover-2k

	<key>Devices</key>
	<dict>
		<key>FakeID</key>
		<dict>
			<key>ATI</key>
			<string>0x68181002</string>
			<key>IntelGFX</key>
			<string>0x01268086</string>
			<key>LAN</key>
			<string>0x436311ab</string>
			<key>NVidia</key>
			<string>0x0fe010de</string>
			<key>SATA</key>
			<string>0x25628086</string>
			<key>WIFI</key>
			<string>0x431214e4</string>
			<key>XHCI</key>
			<string>0x0</string>
		</dict>

Share this post


Link to post
Share on other sites

Using Custom OS Icons

 

Since rev 2232 you may assign own icons to all your volumes even with the same OS.

Write  into config.plist

	<key>GUI</key>
	<dict>
		<key>CustomIcons</key>
		<true/>

Then place an image by copy-paste on volume info

Screen shot 2013-10-10 at 15.26.27.png

And see the image in CloverGUI

Screen shot 2013-10-10 at 15.14.46.png

Share this post


Link to post
Share on other sites

Hibernation

 
Since revision 2514 we have working hibernation sleep/wake.
Conditions:
Clover rev2513+, recommended 2516+
Legacy booting. So we have working hibernation with CloverEFI but not with UEFI.
System 10.9.1+
We have a few successful reports with UEFI boot and with system 10.7.5. So may be, for your testing.
 
You have to set
sudo pmset -a hibernatemode 29
Also success with mode 21. Other numbers are waiting for further investigations.
Put computer to sleep. After a one minute it will switch off at all.
Switch on. Looks like ordinary boot and enter Clover GUI
screenshot2.png
See the volume is hibernated.
Default boot by timeout or press enter.
You see progress bar at the bottom and voila! You are in system! It requires about 10 seconds that is much faster the usual login.
 
If you have a problem then you can press SPACE and choose "Cancel hibernate wake".
Or you can write into config.plist

	<key>Boot</key>
	<dict>
		<key>NeverHibernate</key>
		<true/>
	</dict>

Edited:

Since rev.2915 dmazar made a driver OsxAptioFix2Drv that allows hibernation with UEFI boot to OSX 10.9.5

#209

Share this post


Link to post
Share on other sites

Floating regions

 

The task is follow:

Some modern BIOSes tend to change addresses of OperatingRegions at every BIOS setting change as well as many BIOSes change regions at hardware change/

Example my desktop (look into BIOS DSDT)

September 23

OperationRegion (GNVS, SystemMemory, 0xDE6A5E18, 0x01CD)

September 30

OperationRegion (GNVS, SystemMemory, 0xDE6A4E18, 0x01CD)

February 5

OperationRegion (GNVS, SystemMemory, 0xDE4C7E18, 0x01CD)

See differences.

This is Floating Region. It may depends on how many setting in my NVRAM.

So, in this case using of fixed custom DSDT.aml is not possible. You will loose sleep/wake at least. Or some other dangerous problems.

A solution will be using always BIOS.aml+DSDT fix mask. But there are two problems:

1. Algorithm of DSDT fixing is not perfect.

2. You may want to add your custom features into DSDT. ACPImonitor, for example.

 

I propose new solution for that. Revision 2570+, preferred 2577+. 

You created your best custom DSDT.aml and place it into /EFI/CLOVER/ACPI/patched as usual.

Write into config.plist

	<key>ACPI</key>
	<dict>
		<key>DSDT</key>
		<dict>
			<key>Name</key>
			<string>DSDT.aml</string>
			<key>Fixes</key>
			<dict>
				<key>NewWay_80000000</key>
				<true/>
				<key>FixRegions_10000000</key>
				<true/>
			</dict>

And you will see in the boot.log something like

70:891  0:000  OperationRegion (GNVS...) corrected to addr=0xDE4C7E18

Enjoy!

 

One note.

If original region is 32bits value then your dsdt must contains also 32bit values. Do not mix 16 and 32 bits!

Share this post


Link to post
Share on other sites

Property List Editor

 

It is helpful for config.plist editing.

This is utility from old Xcode, looks and works better then new version.

Unpack the archive, copy these frameworks into /Library/Frameworks/

The application may be placed in your convenient folder.

PListEditor.zip

Screen Shot 2014-04-28 at 7.58.06.png

 

 

UPDATE.

It's a pity this program is not working in Sierra. RIP!

Share this post


Link to post
Share on other sites

Blocking Bad Kext

 
I encounter a bad situation when I installed a kext (it is GeforceSensor) that caused KP. I install it into SLE without checking if it works.
Then I can't boot even with -x, -v, -s. It always loaded and panics.
So I created a revision of Clover that is able to block one kext in /S/L/E.
Test with NVClockX.kext. It is not vital for system so I can experiment with it.

BlockKext.png

Ordinary boot

zone leak detection enabled
standard timeslicing quantum is 10000 us
mig_table_max_displ = 73
NVClockX: NVClock Darwin port by alphamerik (C) 2010
NVClockX: usr-sse2 (C) 2010
AppleACPICPU: ProcessorId=0 LocalApicId=0 Enabled
AppleACPICPU: ProcessorId=1 LocalApicId=1 Enabled

With BlockKext

zone leak detection enabled
standard timeslicing quantum is 10000 us
mig_table_max_displ = 73
HWInfo: [Debug] Initialising...
HWInfo: HWInfo get information from Clover bootloader, (c)Slice 2013
IntelCPUMonitor: Based on code by mercurysquad, superhai (C)2008. Turbostates measurement added by Navi
User defined TjMax=0
AppleACPICPU: ProcessorId=0 LocalApicId=0 Enabled
AppleACPICPU: ProcessorId=1 LocalApicId=1 Enabled

So yes, the kext is not loaded by boot.efi. Don't forget to boot without cache!

But then surprise!!!
 

slice$ sudo kextstat | grep -v apple
Password:
Index Refs Address    Size       Wired      Name (Version) <Linked Against>
   18    4 0x566db000 0xa000     0x9000     org.netkas.FakeSMC (3.3.1) <13 7 5 4 3>
   19    0 0x56236000 0x4000     0x3000     org.slice.HWInfo (1) <18 7 4 3>
   20    0 0x566e5000 0x6000     0x5000     org.slice.IntelCPUMonitor (1.1) <18 7 5 4 3>
   23    0 0x56763000 0x7000     0x6000     org.mozodojo.ITEIT87x (1.0.3) <18 7 5 4 3>
   36    0 0x56746000 0x5000     0x4000     com.yourcompany.driver.AppleACPIPS2Nub (1.0.0d1) <13 7 5 4 3 1>
   38    0 0x564b4000 0x3000     0x2000     net.osrom.kext.Disabler (1.0.1) <4 3>
   79    0 0x5d46b000 0x14000    0x13000    org.usrsse2.NVClockX (1.0.1d1) <18 14 7 5 4 3>
   85    0 0x564b7000 0x23000    0x22000    org.voodoo.driver.VoodooHDA (2.8.4) <84 14 7 5 4 3>
Sergeys-iMac:Clover slice$

It is loaded! Why? I think it is loaded by kernel that is not affected by FSInject.efi
But it is loaded much later and give me an ability to boot with -s before the KP will occur.
Yes, this is workaround in the case above.

 

Since rev.2665

Share this post


Link to post
Share on other sites

AAPL,slot-name

 
This is a property that usually injected by DSDT or property strings but this is a wrong way to go.
Actually this property appeared by AppleSMBIOS.kext (see sources if you want).
So in revision 2673 I made more vanilla way to assign this property.
1. DSDT must contain Name (_SUN, 0x05). Or other number. The number must be one byte and avoid 0 and 1 because of stupid optimization. Sample:

                Device (GIGE)
                {
                    Name (_ADR, 0x00050000)  // _ADR: Address
                    Name (_SUN, 0x02)  // _SUN: Slot User Number

You may write nothing but set DSDT Fix Mask bits for those devices
Screen Shot 2014-05-20 at 10.25.26.png
2. SMBIOS must contains tables type 9 for each named device. To do this write into config.plist like here
Screen Shot 2014-05-20 at 10.23.37.png
Here 
- Slots->Device is a one of devices {ATI, NVidia, LAN, WIFI, Firewire}. That's all for now. I can accept more propositions.
- Slots->ID must be the same number as you set into DSDT in _SUN.
- Slots->Name will be a string that you want to assign to AAPL,slot-name
- Slot->Type is intended to be a type of slot. There is a number 0,1,2,4,8,16 means PCI, PCIe 1x, PCIe 2x etc.
3. Clover must be revision 2673+
 
See the result
Screen Shot 2014-05-20 at 10.32.56.png
 
07.02.2017
New computer Skylake-based with AMI UEFI BIOS has a function to automatically detect hardware and produces Smbios table type 9 for each inserted cards. So you have to just look your SMBIOS, check all table type 9 and write _SUN properties into each device.
Example:

Handle 0x0901, DMI type 9, 17 bytes
0000: 09 11 01 09 01 aa 08 03 03 01 00 04 02 00 00 01 
0010: 00 

System Slot Information
	Designation: PCI Slot 0
	Type: x1 PCI Express x16
	Current Usage: Available
	Length: Short
	ID: 1
	Characteristics:
		3.3 V is provided
		Hot-plug devices are supported
	Bus Address: 0000:01:00.0

Handle 0x0905, DMI type 9, 17 bytes
0000: 09 11 05 09 01 a6 08 03 03 02 00 04 02 00 00 00 
0010: fe 

System Slot Information
	Designation: Ethernet
	Type: x1 PCI Express x1
	Current Usage: Available
	Length: Short
	ID: 2
	Characteristics:
		3.3 V is provided
		Hot-plug devices are supported
	Bus Address: 0000:00:1f.6

Handle 0x090C, DMI type 9, 17 bytes
0000: 09 11 0c 09 01 a8 08 03 03 03 00 04 02 00 00 07 
0010: 00 

System Slot Information
	Designation: Firewire
	Type: x1 PCI Express x4
	Current Usage: Available
	Length: Short
	ID: 3
	Characteristics:
		3.3 V is provided
		Hot-plug devices are supported
	Bus Address: 0000:07:00.0


See ID: and Bus Address.
So we have to compare with boot.log

0:100  0:000  PCI (00|00:01.00) : 8086 1901 class=060400
0:100  0:000  PCI (00|01:00.00) : 10DE 17C8 class=030000 

0:100  0:000  PCI (00|00:1F.06) : 8086 15B8 class=020000

0:100  0:000  PCI (00|00:1C.02) : 8086 A112 class=060400
0:100  0:000  PCI (00|07:00.00) : 104C 823F class=0C0010

See logic. if device has address like 07:00.00 then search a nearest bridge before it
Search these devices in DSDT and add _SUN properties according to SMBIOS.

            Device (PEG0)
            {
                Name (_ADR, 0x00010000)  // _ADR: Address
                Device (PEGP)
                {
                    Name (_ADR, Zero)  // _ADR: Address
                    Name (_SUN, One)
                }
...

        Device (GLAN)
        {
            Name (_ADR, 0x001F0006)  // _ADR: Address
            Name (_SUN, 0x02)
...
            Device (RP03)
            {
                Name (_ADR, 0x001C0002)  // _ADR: Address
                Device (PXSX)
                {
                    Name (_ADR, Zero)  // _ADR: Address
                    Name (_SUN, 0x03)

Attention! Don't do this for HDMI Audio device (HDAU).

System Profiler doesn't like it and will tell you "error gathering information about PCI devices"

Share this post


Link to post
Share on other sites

Fake CPUID

 

What to do if your OSX is not supported your CPU?

See table what CPUs supported by different OS versions

CPU name	CPUID	10.4.11	10.5.8	10.6.3	10.6.8	10.7.2	10.7.5	10.8.5	10.9.2
Yonah	      0x0006E6	1	1	1	1	1	1	0	0
Conroe	      0x0006F2	1	1	1	1	1	1	1	1
Penryn	      0x010676	0	1	1	1	1	1	1	1
Nehalem	      0x0106A2	0	1	1	1	1	1	1	1
Atom	      0x0106C2	0	0	0	0	0	0	0	0
XeonMP	      0x0106D0	0	0	0	1	0	0	0	0
Linnfield     0x0106E0	0	0	1	1	1	1	1	1
Havendale     0x0106F0	0	0	1	1	1	1	1	1
Clarkdale     0x020650	0	0	0	1	1	1	1	1
AtomSandy     0x020660	0	0	0	0	0	0	0	0
Lincroft      0x020670	0	0	0	0	0	0	0	0
SandyBridge   0x0206A0	0	0	0	1	1	1	1	1
Westmere      0x0206C0	0	0	0	1	1	1	1	1
Jaketown      0x0206D0	0	0	0	1	1	1	1	1
NehalemEx     0x0206E0	0	0	1	1	1	1	1	1
WestmereEx    0x0206F0	0	0	0	1	1	1	1	1
Atom2000      0x030660	0	0	0	0	0	0	0	0
IvyBridge     0x0306A0	0	0	0	0	0	1	1	1
Haswell	      0x0306C0	0	0	0	0	0	0	1	1
IvyBridgeE5   0x0306E0	0	0	0	0	0	0	0	1
HaswellMB     0x0306F0	0	0	0	0	0	0	1	1
HaswellULT    0x040650	0	0	0	0	0	0	1	1
CrystalWell   0x040660	0	0	0	0	0	0	1	1

If you want to install OSX on Atom CPU then you may see it is not supported.

As well IvyBridge is not supported by 10.7.2 while it will be supported by 10.7.5 after SoftwareUpdate.

 

For these cases Clover-rev2748+ proposes you to set FakeCPUID in config.plist or even in GUI -> Binaries patching menu

	<key>KernelAndKextPatches</key>
	<dict>
		<key>FakeCPUID</key>
		<string>0x010676</string>

In this example we tell that the CPU is Penryn supported by all OS versions 10.5+

 

To illustrate I set for my CPU FakeID=0x0106C2 that is unsupported Atom and as expected I got KP while IntelCPUMonitor sees real CPU - Penryn :)

03072014202.jpg

 

And vice versa. If you set good model for bad CPU you may successfully start system.

 

Download a version CLOVERX64.efi-rev2749.zip

Share this post


Link to post
Share on other sites

 Multiple boot options.

Rev 2948+
Briefly, Clover writes Boot#### options for each entry in MainMenu and set BootCurrent to last booted entry if all correct.

Requirements: UEFI boot with real NVRAM present.

Usage:
Enter CloverGUI, navigate to "Clover Boot Options" in the tools row of main menu and press "Add Clover boot options for all entries".
screenshot5.png
If you once do this no need to repeat. It will be saved in NVRAM forever.
When you change the main menu by adding new volume, new partition, new OS then you should 
first remove old options: "Remove all Clover boot options"
second add all options again.
Print them into boot.log to see what you have.

When you started an OS by some entry in the Menu then this entry will be saved as "BootCurrent" and next boot will happen with Clover knowing DefaultVolume and DefaultLoader as in last boot.

Advantages
1. It will remember last boot to Windows or even to legacy boot (not checked but I hope it is).
2. Bios menu will contain these entries.
141008204117.png


I tested with QEMU+Ovmf and have the follow debug.log after tuning:

Boot options:
-------------
48:487  0:051  BootOrder: 7: Boot0005, Boot0006, Boot0000, Boot0001, Boot0002, Boot0003, Boot0004
49:388  0:901   0) Boot0005: Clover start boot.efi at Macintosh, Attr: 0x1
49:442  0:053      HD(1,GPT,065C30D9-992D-4C4C-8965-A266108C7D0F,0x800,0x60000)\EFI\CLOVER\CLOVERX64.EFI
49:495  0:053      Size: 222 (Attr:4 + FPl:2 + Desc:70 + FP:102 + Opt:44 = 222 -> OK)
49:550  0:054   1) Boot0006: Clover start (null) at EFI, Attr: 0x1
49:604  0:054      HD(1,GPT,065C30D9-992D-4C4C-8965-A266108C7D0F,0x800,0x60000)\EFI\CLOVER\CLOVERX64.EFI
49:697  0:093      Size: 176 (Attr:4 + FPl:2 + Desc:54 + FP:102 + Opt:14 = 176 -> OK)
49:751  0:053   2) Boot0000: EFI Floppy, Attr: 0x1
49:805  0:053      PciRoot(0x0)\Pci(0x1,0x0)\Floppy(0x0)
49:860  0:054      Size: 62 (Attr:4 + FPl:2 + Desc:22 + FP:34 + Opt:0 = 62 -> OK)
49:914  0:054   3) Boot0001: EFI Floppy 1, Attr: 0x1
49:967  0:053      PciRoot(0x0)\Pci(0x1,0x0)\Floppy(0x1)
50:021  0:053      Size: 66 (Attr:4 + FPl:2 + Desc:26 + FP:34 + Opt:0 = 66 -> OK)
50:114  0:093   4) Boot0002: EFI Hard Drive, Attr: 0x1
50:168  0:053      PciRoot(0x0)\Pci(0x1,0x1)\Ata(0x0)
50:225  0:056      Size: 66 (Attr:4 + FPl:2 + Desc:30 + FP:30 + Opt:0 = 66 -> OK)
50:279  0:054   5) Boot0003: EFI Network, Attr: 0x1
50:334  0:054      PciRoot(0x0)\Pci(0x3,0x0)\MAC(525400123456,0x1)
50:387  0:053      Size: 89 (Attr:4 + FPl:2 + Desc:24 + FP:59 + Opt:0 = 89 -> OK)
50:441  0:054   6) Boot0004: EFI Internal Shell, Attr: 0x1
50:536  0:094      MemoryMapped(0xB,0x900000,0x10FFFFF)\FvFile(C57AD6B7-0515-40A8-9D21-551652854E37)
50:590  0:054      Size: 92 (Attr:4 + FPl:2 + Desc:38 + FP:48 + Opt:0 = 92 -> OK)
50:643  0:053  -------------
...
0:109  0:000  Clover revision: 2947  running on Standard PC (i440FX + PIIX, 1996)
0:109  0:000  ... with board 
0:109  0:000  Clover load options size = 44 bytes
0:109  0:000  Clover started with option to boot boot.efi from Macintosh

Share this post


Link to post
Share on other sites

How to install Windows in EFI mode on legacy BIOS based PC

using legacy Clover

 

It is a way to go away from legacy systems even if you have old BIOS based computer.

 

First, you should realize that there are requirement for partition table:

1. OSX requires GPT. It can be installed into MBR with special patch.

2. Legacy Windows requires MBR and can't be installed into GPT.

3. UEFI Windows requires GPT and can't be installed into MBR. Moreover, check with fdisk, it must be as follow:

fdisk: 1> p
Disk: /dev/rdisk0	geometry: 19457/255/63 [312579695 sectors]
Offset: 0	Signature: 0xAA55
         Starting       Ending
 #: id  cyl  hd sec -  cyl  hd sec [     start -       size]
------------------------------------------------------------------------
 1: EE    0   0   2 - 1023 254  63 [         1 -         34] <Unknown ID>
 2: 00    0   0   0 -    0   0   0 [         0 -          0] unused      
 3: 00    0   0   0 -    0   0   0 [         0 -          0] unused      
 4: 00    0   0   0 -    0   0   0 [         0 -          0] unused      
fdisk: 1> 

I mean there must be no Hybrid MBR! Attention! Only one partition and it is with EE sign. Check and zero all other entries if found.

 

Second.

Minimum Windows version is Windows 7-64bit. So your computer must have 64-bit CPU.

 

Installation order.

1. Install Mac OSX first. In the installer format your drive to GPT and reserve a space for Windows at least 60Gb.

2. Install Clover into EFI partition created during the formatting. It must be boot6 (Clover SATA)

3. Insert DVD with Windows-7-64bit. It must be ISO9660+Joilet format. Not UDF because Clover is not ready for this.  GrubUDF.efi works!

4. Start the windows EFI-install from this DVD by Clover

screenshot4.jpg

5. This installation kill the Clover so you have to restart during installation to Clover on USB stick and choose boot Windows from HDD to continue installation. No! Clover is still in place and we can continue!

6. After complete Windows installation you have to start from the USB stick into OSX and then reinstall Clover.

 

Final result.

/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *160.0 GB   disk0
   1:                        EFI                         209.7 MB   disk0s1
   2:       Microsoft Basic Data Windows                 46.0 GB    disk0s2
   3:                  Apple_HFS MacHD                   113.7 GB   disk0s3
   4:         Microsoft Reserved                         133.2 MB   disk0s4

Screen Shot 2014-11-05 at 14.41.19.png

 

main.png

Share this post


Link to post
Share on other sites

How to speedup Clover boot

 

There is usual claim from novices that Clover is too slow (or hang). Let us consider this question carefully.

If you try Clover first time then it is logically that you install it onto USB stick and set debug-log to be created. This is the reason of slowness #1.

	<key>Boot</key>
	<dict>
		<key>Log</key>
		<false/>

This is wrong key name, I will change the key to "Debug" (since rev3064) that will reflect its appointment. Boot.log will be created even with "False", it just be in memory and accessible in system if booted.

When "true" the "debug.log" will be Open-Write-Close on every line guarantying you will found the file even after hard-reset.

The file will be saved in /clover-partition/EFI/CLOVER/misc/ folder is the partition is FAT32 to help you understand what is the reason of hang is any. The process ve-e-ery slo-o-ow. With my USB stick I have to wait about 10 minutes to enter GUI.

Set "false" here!

I also will kindly recommend to install Clover on HDD that times faster then USB. Why not? You want to keep Chameleon here? Yes, it is possible. Clover and Chameleon can live on the same partition with the same boot sectors. Boot sectors from Clover distribution are able to boot Chameleon as they are comes from them. But not vice versa. Chameleon's boot1h is not able to boot Clover because of its restriction.

OK. The partition will looked like this

total 22487
drwxrwxrwx  1 slice  staff     2560 18 дек 17:17 .
drwxrwxrwt@ 8 root   admin      272 19 дек 10:54 ..
drwxrwxrwx  1 slice  staff     1024 29 окт 11:17 EFI
drwxrwxrwx  1 slice  staff     2048  4 апр  2014 Extra
-rwxrwxrwx  1 slice  staff   482816  3 дек 15:54 boot
-rwxrwxrwx  1 slice  staff   268256  6 авг  2011 boot2
-rwxrwxrwx  1 slice  staff   367589  4 апр  2014 boot3
-rwxrwxrwx  1 slice  staff   383562 14 июл  2009 boot4
-rwxrwxrwx  1 slice  staff   450048 17 дек 17:37 boot5
-rwxrwxrwx  1 slice  staff   482816 28 окт 13:34 boot6

Where

EFI/ - a folder for Clover's files

Extra/ - a folder for Chameleon files

boot is current bootloader. For my case it is Clover BiosBlockIO, renamed from boot7.

boot2 is Chameleon

boot3 is Clover-32bits

boot5 is Clover with low-ebda (rev3061+)

At the computer start when I see "Booting from hard drive..." I can press a digit 2,3,5 to choose a bootloader.

I just want to say you can install Clover on HDD even if there is Chameleon presents here.

 

Reason #2.

Less feature - faster boot, more features - slower boot. What do you want, powerful bootloader or fast bootloader?

The compromise should be found when you study all Clover's features.

For the first time I may propose minimal setting to boot into system.

Do you want to see all possible systems and entries in main menu? And you have four drives with tens partitions each.

Scanning all partitions will take a time. I even saw 80 seconds in real life.

	<key>GUI</key>
	<dict>
		<key>Scan</key>
		<dict>
			<key>Entries</key>
			<false/>
			<key>Legacy</key>
			<false/>
			<key>Tool</key>
			<false/>
		</dict>

Use custom entry to set only that entry that you want to see

	<key>GUI</key>
	<dict>
		<key>Custom</key>
		<dict>
			<key>Entries</key>
			<array>
				<dict>

See more instructions elsewhere.

 

If you have Windows with a couple of files then scanning it will be very slow. DIsable NTFS.efi driver to prevent it!

 

Reason #3.

Too many drivers in /EFI/CLOVER/drivers64*/ folder. Some third party driver may hang or slow respond. Test it separately when needed.

 

Reason #4.

Big theme chosen. More graphics, more animations - slow boot. But very nice looking!

For first start you may choose Theme=embedded. This is fastest theme.

 

Reason #5.

Mouse slow response. Clover GUI can be controlled by a mouse. But the driver can understand only part of market. Good mice: Logitech, KYE systems, Microsoft. Bad mice: noname.

Disable mouse in config.plist

		<key>Mouse</key>
		<dict>
			<key>Enabled</key>
			<false/>
			<key>Speed</key>
			<integer>0</integer>
		</dict>

Reason #6. Slow HFS+ driver.

Official release of Clover contains VBoxHFS.efi driver. It is very good, it understand links sft and hard, it understand aliases, but slow.

Apple's driver HFSplus.efi is much faster but we have no license to distribute it. Take it somewhere (here #3 ) and place it into /EFI/CLOVER/drivers64*/ folder. And it will works instead embedded driver. (since rev 3043).

 

Since Clover revision 3063 you may see boot process on the screen to understand why it is soo slow.

boot-process.png

Share this post


Link to post
Share on other sites

InfoPlist Patching

 

There is interesting Clover ability to perform an Info.plist patching on the fly.

Since rev.3154 I should set more strict rules to have a success.

Write into config.plist the follow as example

	<key>KernelAndKextPatches</key>
	<dict>
		<key>KextsToPatch</key>
		<array>
			<dict>
				<key>Comment</key>
				<string>Power state 1 - 0</string>
				<key>Name</key>
				<string>AppleIntelHDGraphicsFB</string>
				<key>InfoPlistPatch</key>
				<true/>
				<key>Find</key>
				<data>PGtleT5Qb3dlclN0YXRlczwva2V5PjxpbnRlZ2VyPjE8L2ludGVnZXI+</data>
				<key>Replace</key>
				<data>PGtleT5Qb3dlclN0YXRlczwva2V5PjxpbnRlZ2VyPjA8L2ludGVnZXI+</data>
			</dict>
		</array>
	</dict>

It corresponds to replace in kext AppleIntelHDGraphicsFB.kext, in its Info.plist the lines

				<key>PowerStates</key>
				<integer>1</integer>

by lines

				<key>PowerStates</key>
				<integer>0</integer>

but original pattern contains symbols "", "/", LF, TAB, SPACES that impossible to correctly write into config.plist.

So

1. You have to erase all invisible characters from pattern search.

2. Convert to .

The result looks like

Screen Shot 2015-02-02 at 17.19.48.png

This is only way to do search and replace will be success.

 

Next problem.

If you want to replace DeviceID into IOPCIMatch the you can use this InfoPlistPatch

For example inject unsupported ATI Radeon ID into AMDRadeonX3000.kext. But the kext is not present in kernelcache and the patch will not occur.

In this case you have to boot without caches and Clover will Force load this kext for patching.

 

The patching method is updated in rev 3256. Now it should work fine.

Share this post


Link to post
Share on other sites

Arbitrary device injection.

 

Since rev 3262 I propose new method for device properties injection. It excluded old method and is not compatible with it.

For backward compatibility old method will also work if new method is not used. Vice versa.

 

First you should look your boot.log or preboot.log (obtained by press F2 in Clover GUI). There is a list of your PCI devices.

4:432  0:000  PCI (00|00:00.00) : 8086 2E30 class=060000
4:432  0:000  PCI (00|00:02.00) : 8086 2E32 class=030000
4:432  0:000  Found GFX model=Unknown
4:432  0:000  PCI (00|00:02.01) : 8086 2E33 class=038000
4:432  0:000  PCI (00|00:1B.00) : 8086 27D8 class=040300
4:432  0:000  PCI (00|00:1C.00) : 8086 27D0 class=060400
4:432  0:000  PCI (00|01:00.00) : 10DE 01D1 class=030000
4:432  0:000  Found NVidia model=Gigabyte GeForce 7300 LE
4:432  0:000  PCI (00|00:1D.00) : 8086 27C8 class=0C0300
4:432  0:000  PCI (00|00:1D.01) : 8086 27C9 class=0C0300
4:432  0:000  PCI (00|00:1D.02) : 8086 27CA class=0C0300
4:432  0:000  PCI (00|00:1D.03) : 8086 27CB class=0C0300
4:432  0:000  PCI (00|00:1D.07) : 8086 27CC class=0C0320
4:432  0:000  PCI (00|00:1E.00) : 8086 244E class=060401
4:432  0:000  PCI (00|02:05.00) : 10EC 8167 class=020000
4:432  0:000  PCI (00|00:1F.00) : 8086 27B8 class=060100
4:432  0:000  PCI (00|00:1F.02) : 8086 27C0 class=01018F
4:432  0:000  PCI (00|00:1F.03) : 8086 27DA class=0C0500

Look, for example, line

4:432 0:000 PCI (00|02:05.00) : 10EC 8167 class=020000

This is LAN device

VendorID= 10EC - this is Realtek

DeviceID= 8167 - This is Realtek 8167/8169/8110 Gigabyte Ethernet Controller

It is located on the PCI bus (green digits)

Bus = 02

Device = 05 

Function = 00

This location will be unique for every device in your computer. You may have two equal graphics cards with the same IDs and same model. But their locations will be different.

 

We have to write into config.plist in section "Devices", array "Arbitrary" of items one per device you want to inject properties.

	<key>Devices</key>
	<dict>
		<key>Arbitrary</key>
		<array>
			<dict>
				<key>PciAddr</key>
				<string>02:05.00</string>
				<key>Comment</key>
				<string>Realtek LAN 8167</string>
				<key>CustomProperties</key>
				<array>
					<dict>
						<key>Key</key>
						<string>model</string>
						<key>Value</key>
						<string>Realtek 8169 Gigabit Ethernet Controller</string>
					</dict>
					<dict>
						<key>Key</key>
						<string>built-in</string>
						<key>Value</key>
						<data>AQAAAA==</data>
					</dict>
				</array>
			</dict>
			<dict>
				<key>PciAddr</key>
				<string>01:00.00</string>
				<key>Comment</key>
				<string>Nvidia Geforce card in PCIe slot</string>
				<key>CustomProperties</key>
				<array>
					<dict>
						<key>Key</key>
						<string>model</string>
						<key>Value</key>
						<string>Gigabyte GeForce 7300 LE</string>
					</dict>
					<dict>
						<key>Key</key>
						<string>AAPL,boot-device</string>
						<key>Value</key>
						<data>AQAAAA==</data>
					</dict>
				</array>
			</dict>
		</array>

This example for Nvidia injection is far from full working. You should look elsewhere how to do it for your case.

 

Key must be

Value can be , or .

 

This way for card injection suppose more work then usual Inject->Nvidia=true so it will be for advanced users.

But this way advanced used can inject two similar card and set AAPL,boot-device only for one of them.

They also can inject properties for non-standard devices.

Advanced used also may not agree with Clover's injection and use his own better properties. Here you go!

 

Using this way you may use FakeID old way but it will affect only DSDT patch. 

Inject->... will not work for all devices if one Arbitrary device implemented.

AddProperies also will not work.

New way is the presence of "Arbitrary" section will cancel all device injection old way.

If "Arbitrary" section is missing then old way will work as usual.

Share this post


Link to post
Share on other sites

Non-Standard Legacy Boot Files

 
I notice one problem: slow legacy boot. Analyzing boot.log I found a reason

7:689  0:025   6: 'Legacy HD4' no file system
7:689  0:000   7: 'Data'
22:601  14:912   8: ''
22:657  0:055   9: 'EFI'

15 seconds to look into partition "Data"! Why? 
This partition on my computer formatted into exFAT file system and new Clover supported it.
But in this case I don't need such support. So I just recompiled Clover with a flag -D NO_GRUB_DRIVERS and win this 15 seconds!
 
So there are flags to manually compile own version of Clover with explanation for a what.
Example ./ebuild.sh -mc -D NO_GRUB_DRIVERS -D ONLY_SATA0
 
-mc same as -D USE_BIOS_BLOCKIO
Use LegacyBios based HD drivers (Int 13h) instead of Uefi SATA driver. In most case it works better but it is not working with DVD because of sector size.
As well it is not working on my Dell Inspiron, don't know why.
 
-D NO_GRUB_DRIVERS

Don't compile GRUB drivers. Useful for windows compiler that can't compile such sources.

 

-D NO_GRUB_DRIVERS_EMBEDDED
Don't include driver for exFAT file system which included by default.
Including this driver needed for starting Clover from such drive, like USB stick.
But I see this driver may slow down the booting and mostly not needed.
 
-D ONLY_SATA_0
If you have several HDDs but you are sure to boot only from first one then you may speedup booting by not checking other drives.
 
-D DISABLE_UDMA_SUPPORT
Some SATA controllers reported unsupported UDMA nodes.
This flags allows you to boot slowly but stable.
 
-D ENABLE_VBIOS_PATCH_CLOVEREFI
If you are using config.plist settings PatchVBios=true then you may notice it occured only after CloverGUI is loaded. Because config.plist became available only at this stage.

If you compile clover with this flag then you can get the affect much early, at the time of boot file loaded.

For those who are brave to test.

 

-D DISABLE_USB_SUPPORT

Usually boot6 compiled with USB support while boot7 without it because HDD, keyboard and mouse will be controlled by legacy BIOS INTs.

But I found for QEMU it is better to compile boot7 with USB support. Mouse will work!

 

-D ENABLE_PS2MOUSE_LEGACYBOOT

It means saving PS2 mouse state during legacy boot from Clover to legacy Windows XP.

 

-D DEBUG_ON_SERIAL_PORT

If you want to debug clover using null-modem cable connected to other computer accepting RS232 protocol this is a way for you.

As well it works in QEMU outputting results into Terminal.

 

-D DISABLE_LTO

Stop LTO optimization. The boot file will be 483k instead of 450k and probable will work for you if standard (LTO) version is not.

 

-D ENABLE_SECURE_BOOT

It produces Clover that should work with secure boot.

Apianti was a developer of it and his last words were "should work now".

 

 

-D USE_ION

Attached specific ION.efi driver for ION chipset. This driver if private and is not freely distributed.

 

-D DISABLE_USB_MASS_STORAGE

Don't disable USB as whole but disable USB stick.

 

-D ENABLE_USB_OHCI

For those who have Nforce chipset

 

-D ENABLE_USB_XHCI

It will include USB3 drivers into legacy Clover.

 

-D REAL_NVRAM

This flag will probably add support for real NVRAM (hardware NVRAM) with legacy Clover if it works.

For developers and brave testers.

 

 

Standard Clover package contains boot6 without any of these flags and

boot7 as compiled as

./ebuild.sh -mc -D DISABLE_USB_SUPPORT

Share this post


Link to post
Share on other sites



  • Similar Content

    • By frankiee
      Hi there, time for my first guide after asking so many things
       
      Updated for newer Clover versions and with additional instructions for more apps: gdisk and RU.
       
      So what may be overlooked sometimes in the whole boot loader discussion is the ability of UEFI to do more than just loading an OS. This is why I see ".efi" files as "apps" because in fact they just are, built on a special kind of API: UEFI. So, you can actually do stuff like editing, diagnosing, testing certain stuff at the lowest possible system level without booting to any OS.
       
      DISCLAIMER: Use this guide at your own risk! For educational purposes only! Should do not any harm, but remember you are dealing with rather low level stuff. But at least for me everything went flawless.
       
      Prerequisites:
      Working clover installation Clover Configurator or some app to edit the config.plist  
      1) Memtest
       
      This is how to install the UEFI version of Memtest with Clover:
      Download memtest, I used this link: Image for creating boot-able USB Drive Open the archive by double clicking on it. Mount the file memtest86-usb.img within by double clicking again. Now, you should see a folder named EFI in this volume, containing a folder BOOT. Open it. The files containing it are the actual app, in 32 and 64 bit versions. Think in almost all cases we want to use the 64 bit version. Now, mount your EFI partition, using Clover configurator. Create a folder named MemTest86 in the EFI folder on your main drive. Copy all files in the EFI/BOOT folder from the mounted image to your newly created folder. That ends the basic setup! Now, we add the correct Menu entry to the clover boot menu, so that we can actually start this app.
       
      Get into clover configurator, open your standard config.plist from your boot drive and go to the GUI section. Under "Custom Entries", add an entry like this:
       

       
      Please note while the path you enter is not case sensitive, you must make sure you use the backslash "\" for entering paths, and not a slash. So basically what we do is tell clover where it can find the app, give it a name, and tell clover it is a "Windows" app. Note: with older Clover versions we had to set this to "Linux", but for now "Windows" is the setting that works.
       
      If you prefer to do a manual config, add this entry to your config.plist, under GUI/Custom/Entries:
      <dict> <key>CustomLogo</key> <true/> <key>Disabled</key> <false/> <key>FullTitle</key> <string>MemTest86</string> <key>Hidden</key> <false/> <key>Ignore</key> <false/> <key>Image</key> <string>\EFI\CLOVER\themes\Icons\os_mint.png</string> <key>Path</key> <string>\EFI\MemTest86\BOOTX64.efi</string> <key>Type</key> <string>Windows</string> <key>VolumeType</key> <string>Internal</string> </dict> Now, save and reboot and you should see the newly created entry. Note that I also used a custom Icon - this is optional - in case you don't you will just see a generic windows icon instead:
       

       
      And this is how it looks like:
       

       

       
      PS: also noticeably faster and you get also more features with this version than with the older version, for example it does now write a log file. For more Information, see: http://www.passmark.com/forum/showthread.php?4315-Memtest86-Version-5-Beta-%28Pure-UEFI%29
       
       
      2) gdisk
       
      Another app you can use is the UEFI version of gdisk (aka GPT fdisk), which you can use to edit and change your partitions.
       
      Warning! Install and use this app at your own risk! If you do something wrong here you might nuke your drive(s), so only use that if you know what you are doing.
       
      This is how to do it (even easier):
      Download here: https://sourceforge.net/projects/gptfdisk/files/gptfdisk/1.0.1/gdisk-binaries/gdisk-efi-1.0.1.zip/download Mount your EFI partition Unzip the file and copy the resulting folder to your EFI Folder, so your path goes like this "/Volumes/EFI/EFI/gdisk-efi" Get into clover configurator, open your standard config.plist from your boot drive and go to the GUI section. Add an entry like this:  
      If you prefer to do a manual config, add this entry to your config.plist, under GUI/Custom/Entries:
      <dict> <key>CustomLogo</key> <false/> <key>Disabled</key> <false/> <key>FullTitle</key> <string>GDisk</string> <key>Hidden</key> <false/> <key>Ignore</key> <false/> <key>Image</key> <string></string> <key>Path</key> <string>\EFI\gdisk-efi\gdisk_x64.efi</string> <key>Type</key> <string>Windows</string> <key>VolumeType</key> <string>Internal</string> </dict> When everything went OK you should see this after selecting the respective entry in Clover:
       

       
       
      3) RU
       
      I recently found one more app that might be interesting to some, and thats "Read Universal" or in short "RU". This is a tool that enables you to debug your BIOS and read (and modify!) every imaginable data, including UEFI variables, ACPI Tables etc.
       
      Warning, again! I think blindly messing around with this app is even more dangerous, but on the other hand it gives you access to a lot of potentially interesting stuff.
      Download here: http://ruexe.blogspot.de/ The next steps are basically the same as above so make a folder in your EFI partition, copy the .EFI files and make another custom entry in your config.plist Here are some screens:
       

       

       

       
       
      So this is what you also can do with UEFI and clover. I am curious which other useful applications might exist!
       
      Anybody who knows, maybe post it here?
    • By TimNeumann
      MB: Asus X99 A-II
      RAM: G.Skill Ripjaws V F4-3200C16D-32GVK (3200MHz, 4x 16GB DIMMs, so Total 64GB) in quad-channel configuration.
      CPU: i7 6800k @4.0Ghz
      GPUs: GTX 1080 Ti and GTX 1060 3GB
      (each one a monitor, because I can't get DVI to run parallel with DP on the 1080Ti, and my second monitor only has DVI/VGA)
      OS: High Sierra 10.13.2 (17C88) / Clover revision: 4392
       
      Hello everybody,
      I occasionally have system crashes and suspect that it is related to RAM. However, this RAM is completely new, and a run with MemTest86+ from the USB stick showed no errors. However, if I use Memtest on MacOS, I get a bunch of error messages, but sometimes none (I restart the computer between tests).  
      As I just discovered, my RAM is not on the recommended vendor list of my motherboard, nor is it on the manufacturer side of the RAM. I have read several times that the RAM may not have been tested by the manufacturer on this platform. Not a single X99 motherboard is listed for this RAM.
      So I also suspect that my RAM is not compatible.
      But if that were the case, how could it sometimes work completely error-free?
       
      During RAM tests in summer 2017 (a slightly different setup, 4x8GB but still G.Skill Ripjaws V) I had no errors at Memtest under MacOS, if I remember correctly. At that time it ran under Sierra 10.12.6. AptioMemoryFix.efi could also cause problems.
      I am appreciative for any help!
       
      Here is an excerpt from a faulty test.
      It is noticeable that it is always the same address during the test, but a different one after each test.
      Memtest version 4.22 (64-bit) Copyright (C) 2004 Charles Cazabon Copyright (C) 2004-2008 Tony Scaminaci (Macintosh port) Licensed under the GNU General Public License version 2 only Mac OS X 10.13.2 (17C88) running in multiuser mode Memory Page Size: 4096 System has 12 Intel core(s) with SSE Requested memory: 57232MB (60012990464 bytes) Available memory: 57232MB (60012990464 bytes) Allocated memory: 57232MB (60012990464 bytes) at local address 0x00000001033e1000 Attempting memory lock... locked successfully Partitioning memory into 2 comparison buffers... Buffer A: 28616MB (30006495232 bytes) starts at local address 0x00000001033e1000 Buffer B: 28616MB (30006495232 bytes) starts at local address 0x00000007ffc4d800 Running 1 test sequence... (CTRL-C to quit) Test sequence 1 of 1: Running tests on full 57232MB region... Stuck Address : ok Linear PRN : testing 7 of 16 FAILURE! Data mismatch at local address 0x0000000e88133d30 Expected Data: 0xc4c340079ac9a645, Actual Data: 0xc4c3400788468846 Running comparison tests using 28616MB buffers... Random Value : ok Compare XOR : ok Compare SUB : ok Compare MUL : ok Compare DIV : ok Compare OR : ok Compare AND : ok Sequential Increment: ok Solid Bits : ok Block Sequential : testing 80 of 256 FAILURE! Data mismatch at local BUFA address 0x000000078b8c7530, BUFB address 0x0000000e88133d30 BUFA Data: 0x4f4f4f4f4f4f4f4f, BUFB Data: 0x4f4f4f4f88468846 Checkerboard : testing 3 of 64 FAILURE! Data mismatch at local BUFA address 0x000000078b8c7530, BUFB address 0x0000000e88133d30 BUFA Data: 0x5555555555555555, BUFB Data: 0x5555555588468846 Bit Spread : testing 1 of 128 FAILURE! Data mismatch at local BUFA address 0x000000078b8c7530, BUFB address 0x0000000e88133d30 BUFA Data: 0x0000000000000005, BUFB Data: 0x0000000088468846 Bit Flip : testing 74 of 512 FAILURE! Data mismatch at local BUFA address 0x000000078b8c7530, BUFB address 0x0000000e88133d30 BUFA Data: 0x0000000000000200, BUFB Data: 0x0000000088468846 Walking Ones : testing 40 of 128 Clover Files attached
      config.plist
      drivers64UEFI.zip
      kexts.zip
      ACPI.zip
    • By BurpSuite
      screenshot:
       

       
      description:
      github: https://github.com/burpsuite/clover_theme
×