Jump to content

Clover Change Explanations

clover bootloader changelog

  • Please log in to reply
58 replies to this topic

#21
Slice

Slice

    InsanelyMac V.I.P.

  • Local Moderators
  • 6,017 posts
  • Gender:Male
  • Location:Moscow

Rev 3549

 

A task: I wanted to create USB stick with Windows UEFI installation. It is proposed to use on legacy PC BIOS-based so the stick is bootable by Clover.

So I took usual stick 4Gb OEM formatted to FAT32 one partition and install Clover 3543 on it. Full success! The stick is bootable and can start OSX on HDD.

There is a big problem to copy Windows distribution on it because it contains a folder BOOT/ while the stick contains file BOOT which is Clover itself. They can't live together.

 

The solution is to rename BOOT -> BOOT5 and replace boot sector boot1f32 by the new one boot1f5 which is the same but booting BOOT5 by default.

Installation instructions are old

 

Suppose your USB stick is disk3

 

sudo -s

dd if=/dev/rdisk3s1 count=1 bs=512 of=/tmp/origbs

cp boot1f5 /tmp/newbs
dd if=/tmp/origbs of=/tmp/newbs skip=3 seek=3 bs=1 count=87 conv=notrunc
dd of=/dev/rdisk3s1 count=1 bs=512 if=/tmp/newbs


#22
Slice

Slice

    InsanelyMac V.I.P.

  • Local Moderators
  • 6,017 posts
  • Gender:Male
  • Location:Moscow

Rev 3561 - first Sierra compatible revision

 

Rev 3577

Legacy boot improvements.

 

Legacy boot is a process to boot OSes through 16bit instructions in real mode like it did old PC BIOS-based computer before Clover, before UEFI.

It was needed to boot Windows XP or Windows 7-32bit, old Linux or modern systems if the drive formatted to MBR Partition Table.

But Clover is already 32/64bit program working in EFI environment in protected mode. It can't get back to real mode. To do this we made a trick with loading PBR boot sector and start it in real mode.

It's a pity it is not always work because devices like SATA controller occur in undefined state. :(

 

There was three methods for Legacy boot before "LegacyBiosDefault", "PBRtest", "PBR" set by config.plist

	<key>Boot</key>
	<dict>
		<key>Legacy</key>
		<string>PBRtest</string>

"LegacyBiosDefault" assumed UEFI BIOS with CSM module capable to do LegacyBoot.

"PBR" is the most commonly used method for legacy Clover. I have one computer with PATA drive working with this method.

"PBRtest" is somehow different. May be someone will be happy with it.

 

Now I propose one more method "PBRsata". It is the same as "PBR" but making a SATA reset before boot. AFAIK the SATA controller is a main reason why legacy boot is not working.

Hope someone will be happy.

 

PS. The version is released.



#23
Slice

Slice

    InsanelyMac V.I.P.

  • Local Moderators
  • 6,017 posts
  • Gender:Male
  • Location:Moscow

Rev 3580
make kext patches to be OS dependent, by Micky1979
 
Example


			<dict>
				<key>Find</key>
				<data>SGVhZHBob25lcwA=</data>
				<key>Name</key>
				<string>VoodooHDA</string>
				<key>Replace</key>
				<data>VGVsZXBob25lcwA=</data>
				<key>Disabled</key>
				<false/>
				<key>MatchOS</key>
				<string>10.11.6,10.12.x</string>
			</dict>

Author's post  #880 

and further discussions.

 

 

Rev 3586

Bootcamp style for Clover menu

implemented by Needy

initial post   #485  


Rev 3600

Theme list scroll support

Screens

Attached File  screenshot4.png   1002.37KB   24 downloads Attached File  screenshot5.png   1003.09KB   20 downloads

 

 

 



#24
Slice

Slice

    InsanelyMac V.I.P.

  • Local Moderators
  • 6,017 posts
  • Gender:Male
  • Location:Moscow

Rev 3603

Delayed preboot.log.

 

Before if we press F2 we immediately save preboot.log. It occured before many patches applied.

Since 3603 press F2 just remember that the log will be saved and this will occur at the OS started. Much more lines will be visible. Some lines we never saw starting Windows as full boot.log is not accessible in this operating system.

 

How it looks now

5:229  0:010  GUI ready
6:242  1:013  UpdateScroll on 0
9:525  3:282  ParseBootOption: invalid boot variable
9:525  0:000  BootOption of the entry is empty
9:525  0:000  StartLoader() start
9:525  0:000  Finally: Bus=200832kHz CPU=2400MHz
9:525  0:000  Loading bootmgfw.efi  status=Success
9:751  0:225  Closing events for Windows
9:751  0:000  OtherOS: Found Acpi 2.0 RSDP 0xCFB13000
9:751  0:000  RSDT at CFEE3040
9:751  0:000  XSDT at 0
9:751  0:000  FADT pointer = CFEE30C0
9:751  0:000  Removed efi-boot-device-data variable: Success
9:751  0:000  Closing log



#25
Slice

Slice

    InsanelyMac V.I.P.

  • Local Moderators
  • 6,017 posts
  • Gender:Male
  • Location:Moscow

Rev 3605

Use variable tools icons size as requested by wern apfel   #10837 



#26
cecekpawon

cecekpawon

    InsanelyMac Legend

  • Developers
  • 725 posts
  • Gender:Male

Rev 3661

 

Patches by BuildVersion:

 

Following Micky1979's idea about to be more strict/specific filtering patches by OS BuildVersion (MatchBuild) instead of OS ProductVersion (MatchOS). Since MatchBuild is an "unique" value, this will simply overwrites other unmatched BuildVersion even OS ProductVersion was matched. Applied to "KextsToPatch" & "KernelToPatch". From example below it will ignore other Sierra (10.12) BuildVersions (ex: 16A238m/16A239j) other than specified MatchBuild (16A254g):

 

Spoiler

 

KernelToPatch:

 

With "KernelToPatch" will give Clover users the ability to patch current kernel with their own patterns onthefly. For example: to propose some "new" kernel patches after big OS update (like OS Sierra introduced yesterday) without needing to wait for Clover updates, and maybe alot of other purposes. ** This may lead Clover cannot find internal kernel patch patterns if they already replaced by your custom patterns, so use with caution (or disable from GUI if anything goes wrong). Config examples:

 

Spoiler

 

Sample logs:

 

Spoiler

Attached Files


Edited by cecekpawon, 08 February 2017 - 01:59 PM.


#27
cecekpawon

cecekpawon

    InsanelyMac Legend

  • Developers
  • 725 posts
  • Gender:Male

Rev 3663

 

Prune long vertical scroll. Adjust the number of rows to prune from "theme.plist":

<key>Theme</key>
<dict>
  <key>Layout</key>
  <dict>
    <key>PruneScrollRows</key>
    <integer>5</integer>
  </dict>
</dict>

Attached Files

  • Attached File  1.png   54.81KB   28 downloads
  • Attached File  2.png   45.68KB   24 downloads


#28
Slice

Slice

    InsanelyMac V.I.P.

  • Local Moderators
  • 6,017 posts
  • Gender:Male
  • Location:Moscow

Rev 3669, 3670

Graphical checkbox in Clover menu (coded by Needy)

 

Attached File  Screen Shot 2016-08-01 at 12.57.57.png   600.3KB   29 downloads



#29
cecekpawon

cecekpawon

    InsanelyMac Legend

  • Developers
  • 725 posts
  • Gender:Male

Rev 3679

 

Experimental: Size matter, screenshot as PNG instead of BMP. Inspired by mr. Coderush "CrScreenshotDxe". Maybe useful for other PNG encoding purposes. Activate by "-D LODEPNG".

 

Rev 3681

 

Hover icons, for both 1st & 2nd row:

 

Clover will search any icons with suffix "_hover.(ext)" & use it as hovered state.
Applied to: os_*, func_*, tool_* icons. Ex: func_about_hover.png, os_mac_hover.png, tool_shell_hover.png.

 

Fixed icon format:

 

One extension for all. Ex: If user has specified an ext (Icon->Format) like "png", then Clover will ignore any other extensions including default "icns". Valid values: icns, png, bmp (untested).

<key>Theme</key>
<dict>
  <key>Badges</key>
  <dict>
    <key>Inline</key>
    <false/>
    <key>OffsetX</key>
    <integer>0</integer>
    <key>OffsetY</key>
    <integer>0</integer>
    <key>Scale</key>
    <integer>16</integer>
    <key>Show</key>
    <true/>
    <key>Swap</key>
    <false/>
  </dict>
  <key>Icon</key>
  <dict>
    <key>Format</key>
    <string>png</string>
  </dict>
</dict>

Example: based on blacktype theme by xenatt, vol icon taken from metal theme by Slice.

Attached Files


Edited by cecekpawon, 09 February 2017 - 12:12 PM.


#30
Slice

Slice

    InsanelyMac V.I.P.

  • Local Moderators
  • 6,017 posts
  • Gender:Male
  • Location:Moscow

Rev 3698

Exclude ICNS and BMP graphics format.

All artist have to use only PNG graphics. In fact this is true now and I can reduce Clover size.

 

Embedded refit font is replaced now by PNG font "hellfire-9W". Is there other propositions?



#31
Slice

Slice

    InsanelyMac V.I.P.

  • Local Moderators
  • 6,017 posts
  • Gender:Male
  • Location:Moscow

Rev 3706

Embedded font can be Black or White as set in theme.plist.

		<key>Font</key>
		<dict>
			<key>Type</key>
			<string>Black</string>
		</dict>



#32
Slice

Slice

    InsanelyMac V.I.P.

  • Local Moderators
  • 6,017 posts
  • Gender:Male
  • Location:Moscow

Rev 3712

Built with ./ebuild.sh -D CHECK_FLAGS

 

This feature change a method for Details menu called by press Space in main menu

Attached File  Screen Shot 2016-08-18 at 12.43.26.png   1014.15KB   38 downloads

 

I will accept propositions for other useful boot-args to be included here:

debug

npci

-alcbeta

...

after some discussion.



#33
Slice

Slice

    InsanelyMac V.I.P.

  • Local Moderators
  • 6,017 posts
  • Gender:Male
  • Location:Moscow

Rev 3729 by Needy

new submenu for CSR

scroll for Help
radio button for TextOnly

 

Now you can set SIP bits in additional menu in CloverGUI

Attached File  Screen Shot 2016-09-12 at 14.42.15.png   685.48KB   53 downloads

 

 

Rev 3733

It was my mistake setting nvda_drv=1 flag as boot-args. No! It is NVRAM variable nvda_drv that can have a value "1".

So I make new config value

	<key>SystemParameters</key>
	<dict>
		<key>NvidiaWeb</key>
		<true/>
	</dict>

This value will switch macOS to use Nvidia WEB drivers instead of system one.

There is also GUI switch

Attached File  Screen Shot 2016-09-12 at 14.46.20.png   565.2KB   68 downloads

Please test and report.

 

PS. For system <=10.11 there is a boot-args = "nvda_drv=1"

For system 10.12 (and up?) there is NVRAM variable  "nvda_drv" taking a symbolic value '1'.



#34
Slice

Slice

    InsanelyMac V.I.P.

  • Local Moderators
  • 6,017 posts
  • Gender:Male
  • Location:Moscow

Rev 3737
We can fake our EDID to be like Apple's one.
Also changes in config.plist (old config also supported)

	<key>Graphics</key>
	<dict>
		<key>EDID</key>
		<dict>
			<key>Custom</key>
			<data>AP///////wAGECGSAAAAAAASAQOAIRV4CunVmVlTjigmUFQAAAABAQEBAQEBAQEBAQEBAQEB3iGgcFCEHzAgIFYAS88QAAAY3iGgcFCEHzAgIFYAS88QAAAAAAAA/gBXNjU3RwAxNTRXUDEKAAAA/gAjMz1IZYSq/wIBCiAgAJo=</data>
			<key>Inject</key>
			<true/>
			<key>VendorID</key>
			<string>0x1006</string>
			<key>ProductID</key>
			<string>0x9221</string>
		</dict>

See, VendorID = 0x1006 is Apple



#35
Slice

Slice

    InsanelyMac V.I.P.

  • Local Moderators
  • 6,017 posts
  • Gender:Male
  • Location:Moscow

Rev 3744 -3748

New boot-args to choose in Details menu


CHAR16* ArgOptional[NUM_OPT] = {
  L"arch=i386",
  L"arch=x86_64",
  L"-v ",
  L"-s ",
  L"-x ",
  L"nv_disable=1",
  L"slide=0",
  L"darkwake=0",
  L"-xcpm",
  L"-gux_no_idle",
  L"-gux_nosleep",
  L"-gux_nomsi",
  L"-gux_defer_usb2",
  L"keepsyms=1",
  L"debug=0x100",
  L"kextlog=0xffff",
  L"-alcoff",
  L"-shikioff",
  L"nvda_drv=1"
};

Rev 3748

partially reverted commit 3733

 

We found that for systems up to ElCapitan 10.11.6 there was boot-args "nvda_drv=1" to switch on Nvidia WEB drivers. If absent then system drivers used.

But for Sierra there is NVRAM variable "nvda_drv" that take a value of string "1".

 

Since this revision you can check this point in Details menu and got both variable changed, for 10.x and for 10.12.



#36
Slice

Slice

    InsanelyMac V.I.P.

  • Local Moderators
  • 6,017 posts
  • Gender:Male
  • Location:Moscow

Rev 3755

New look for options menu.

It became possible because of previous commits

Attached File  Screen Shot 2016-09-16 at 13.21.11.png   529.62KB   109 downloads



#37
Slice

Slice

    InsanelyMac V.I.P.

  • Local Moderators
  • 6,017 posts
  • Gender:Male
  • Location:Moscow

Rev 3787

Introduce SMCHelper efi driver.

 

It is not a replacement for FakeSMC.kext, it is a helper for it.

It works as follow

1. FakeSMC (my version 3.4, I don't know if Kozlek wants to add same functionality) catches all system events like "SMC key write" and store them into NVRAM. Hardware or emulated.

2. After reboot Clover >=3787 will read NVRAM (or nvram.plist) and gather all SMC keys into own stack.

example

1:882  0:000  === [ Dump SMC keys from NVRAM ] ==========================
1:882  0:000  found AppleSMC protocol
1:886  0:003     fakesmc-key-LsBA-ui8:90 
1:886  0:000     fakesmc-key-NTOK-ui8:01 
1:886  0:000     fakesmc-key-NATi-ui16:00 00 
1:886  0:000     fakesmc-key-NATJ-ui8:00 
1:886  0:000     fakesmc-key-CLKH-{clh:00 00 70 80 00 01 19 40 
1:886  0:000     fakesmc-key-LSSS-ui16:02 00 
1:888  0:001     fakesmc-key-CLKT-ui32:00 01 3D 87 
1:889  0:000     fakesmc-key-MSDW-ui8:00 

3. When we start a system boot.efi may ask for the SMC protocol and keys

->LocateProtocol(gAppleSMCProtocolGuid, 0, 0/CB592D78) = Success

4. Those keys can be used by boot.efi for Hibernation wake or for FileVault or else.

5. I am not sure if those keys should be reported again for FakeSMC. At this moment no.

 

 

Rev 3791

Fix zero pointer dereferencing.

The bug was introduced in commit 3590  :shock: , so we have 200 non-working revisions from 3590 up to 3790.

Details

+    SelectionImages[4]->HasAlpha = TRUE;

But this image exists only with BootCampStyle else there is NULL.

So mov 1, @18h where there is legacy interrupt table.

My legacy computer worked but didn't sleep. My UEFI computer seems not affected.

I see many messages about Clover not working, black screen etc. 

I think in most cases 3791 should work again.



#38
Slice

Slice

    InsanelyMac V.I.P.

  • Local Moderators
  • 6,017 posts
  • Gender:Male
  • Location:Moscow

Rev 3850

Skip timeout on hibernate wake

Idea by Wastez at  #11507 



#39
ErmaC

ErmaC

    127.0.0.1

  • Supervisors
  • 5,187 posts
  • Gender:Male
  • Location:Canary Islands
Rev 3808
Added a new submenu into Clover GUI for suite related audio options.
- In this first commit can be handled boolean ResetHDA and AFGLowPowerState options

Rev 3847
Extends and update existing nVidia card list.

Rev 3848
- Extends recently created Audio tuning submenu with the ability to change the already provided
layout-id from config.plist
- The number of finded HDA Controller now are been showed with his Vendor and Device ID
- for both Audio and Graphics submenu a minus typo was correct using ternary logic
- GFX_MANUFACTERER has been renamed into HRDW_MANUFACTERER (the same manufacter struct is used for both Graphics and Audio)
Thx to Micky1979, Jolly and gengik84 for the test.
(more work is needed... the next step is move all the related HDA stuff from device_inject into a dedicated 'class', add harcoded name for the Controller and finally retrive the Codec values)

#40
Slice

Slice

    InsanelyMac V.I.P.

  • Local Moderators
  • 6,017 posts
  • Gender:Male
  • Location:Moscow

Rev 3876 and older

Making modules and settings for the FileVault2 possibility.

 

Rev 3877

Exclude AppleEvent, OSInfo, AppleGraphicsConfig as they are embedded into Clover.







Also tagged with one or more of these keywords: clover, bootloader, changelog

  Topic Stats Last Post Info

2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users

© 2016 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Mac Netbook  |   PHP hosting by CatN  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy