Jump to content

Clover on real mac


Jief_Machak
 Share

132 posts in this topic

Recommended Posts

  • 2 weeks later...

Yesterday, I discover that :

 

1) I can boot clover in EFI mode and get full screen on my PC graphic card flashed with GOP. I can't boot Windows in that mode.

2) With Clover, I can boot rEFInd. Because the screen is initialized by Clover, it works. I still can't boot Windows in that mode.

3) With rEFInd, I can boot Clover Legacy. I CAN boot Windows in that mode !!!

 

What a mess, but I can boot everything I want.

 

So today, I've added the screen initialisation that Clover does to rEFInd. Great, I can directly boot to rEFInd, thus eliminating the first step.

 

Now, I'd like to add the possibility, to Clover or to rEFInd, to boot an UEFI os with CSM for video... and I may be able to eliminate the third step.

Any build instructions for your modified rEFInd?

 

I tried to build on Linux with GNU-efi 3.0.2 but got this error:

main.c:2079:43: error: ‘gST’ undeclared (first use in this function)
     MsgLog("Starting rEFInd on %s EFI\n", gST->FirmwareVendor);

Link to comment
Share on other sites

@nvflash : did you try to follow this : https://github.com/jief666/refind-edk2

I just tried (on Yosemite) and it compiled.

If it doesn't for you, give more details (os verseion, log, etc.) 

Thanks, I tried to build with the latest Xcode and nasm installed with brew, on High Sierra 10.13.1, but when I try the ./ebuild it fails with:

 

I'm assuming it's failing because I'm using Xcode 9 not Xcode 5?

 

I have access to all the old versions of Xcode, so let me know what version you used on Yosemite, and I'll try and figure out how to point the build to the older version of Xcode.

Building ... /Users/jam/edk2/MdePkg/Library/UefiLib/UefiLib.inf [X64]
"clang" -target x86_64-pc-win32-macho -c -g -Os -Wall -Werror -Wextra -include AutoGen.h -funsigned-char -fno-ms-extensions -fno-stack-protector -fno-builtin -fshort-wchar -mno-implicit-float -mms-bitfields -Wno-unused-parameter -Wno-missing-braces -Wno-missing-field-initializers -Wno-tautological-compare -Wno-sign-compare -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang -D NO_MSABI_VA_FUNCS  -o /Users/jam/edk2/Build/Refind/DEBUG_XCODE5/X64/MdePkg/Library/UefiLib/UefiLib/OUTPUT/./UefiLib.obj -I/Users/jam/edk2/MdePkg/Library/UefiLib -I/Users/jam/edk2/Build/Refind/DEBUG_XCODE5/X64/MdePkg/Library/UefiLib/UefiLib/DEBUG -I/Users/jam/edk2/MdePkg -I/Users/jam/edk2/MdePkg/Include -I/Users/jam/edk2/MdePkg/Include/X64 /Users/jam/edk2/MdePkg/Library/UefiLib/UefiLib.c
/Users/jam/edk2/MdePkg/Library/UefiLib/UefiLib.c:1530:19: error: passing an object that undergoes default argument promotion to 'va_start' has undefined behavior [-Werror,-Wvarargs]
  VA_START (Args, Iso639Language);
                  ^
/Users/jam/edk2/MdePkg/Library/UefiLib/UefiLib.c:1517:19: note: parameter of type 'BOOLEAN' (aka 'unsigned char') is declared here
  IN BOOLEAN      Iso639Language,
                  ^
1 error generated.
make: *** [/Users/jam/edk2/Build/Refind/DEBUG_XCODE5/X64/MdePkg/Library/UefiLib/UefiLib/OUTPUT/UefiLib.obj] Error 1


build.py...
 : error 7000: Failed to execute command
	make tbuild [/Users/jam/edk2/Build/Refind/DEBUG_XCODE5/X64/MdePkg/Library/UefiLib/UefiLib]


build.py...
 : error F002: Failed to build module
	/Users/jam/edk2/MdePkg/Library/UefiLib/UefiLib.inf [X64, XCODE5, DEBUG]

- Failed -
Build end time: 05:14:14, Nov.17 2017
Build total time: 00:00:03
Link to comment
Share on other sites

Jief, I was able to boot Windows 10 from within the rEFind menu of your build, but I have Windows installed in UEFI mode. I'm not sure if you had Windows installed via BootCamp on a real Mac, as I can see how that won't work with rEFInd?

 

I don't have a MacPro to test with, I'm just using Qemu with the OVMF.fd containing EDK2.

Link to comment
Share on other sites

@Jief_Machak, I noted you added some print() debugging to the screen.c, any chance we can get that to dump to the reifnd.log?

 

Had a users report blackscreen on a Mac Pro with GTX 1080, and a Samsung CHG90, 3840x1080 ultra wide display, tho he didn't try it in 1080p mode yet.

 

Just a quick look at the screen.c shows some polling for the max resolution of the display, tho this non standard res may not even be supported in nVidia's GOP. I was just wondering if I could find the point the code is breaking.

 

Also, after rereading the thread, I noted you said you booted Clover Legacy on your Mac Pro, I always though Clover Legacy was the combination of the first stage bootloader written to block 0 of the HD that then loaded the "boot" file from the EFI or HFS partition, however it seems you were loading Clover's Bootx64.efi?

 

I'm a little confuse by this, is there a legacy version of Clover's Bootx64 file? 

Link to comment
Share on other sites

 

 

I noted you added some print() debugging to the screen.c, any chance we can get that to dump to the reifnd.log?

Sorry, can't remember. I'm leaving for 3 months in 2 weeks and have no time to go back to code now. I won't have my dev computer for 3 months.

 

Legacy boot : 

When the mac boot the first sector, it hides "shadow" all the efi and load a BIOS. That is what I called Legacy boot.

It loads the first sector boot0 that load 2 sectors at the beginning of a partition (I always use a dedicated FAT32 partition, but could anything, I think) that load the file named 'boot' that load CloverX64.efi. UEFI 2 layer is in the "boot" file. It's not Clover, it's Tianacore DUET.

Basically you are right. Just add the fact that "boot" file load CloverX64.efi.

 

Efi boot : the firmware directly load BOOTX64.efi which is the exact same as CLOVERX64.efi.

 

In short : Clover is always an EFI app. DUET is loaded on BIOS machine.

 

The thing to remember is : for an EFI boot, you need a graphic card with GOP to see something. I needed to flash mine to have GOP.

Link to comment
Share on other sites

Sorry, can't remember. I'm leaving for 3 months in 2 weeks and have no time to go back to code now. I won't have my dev computer for 3 months.

 

Legacy boot : 

When the mac boot the first sector, it hides "shadow" all the efi and load a BIOS. That is what I called Legacy boot.

It loads the first sector boot0 that load 2 sectors at the beginning of a partition (I always use a dedicated FAT32 partition, but could anything, I think) that load the file named 'boot' that load CloverX64.efi. UEFI 2 layer is in the "boot" file. It's not Clover, it's Tianacore DUET.

Basically you are right. Just add the fact that "boot" file load CloverX64.efi.

 

Efi boot : the firmware directly load BOOTX64.efi which is the exact same as CLOVERX64.efi.

 

In short : Clover is always an EFI app. DUET is loaded on BIOS machine.

 

The thing to remember is : for an EFI boot, you need a graphic card with GOP to see something. I needed to flash mine to have GOP.

 

 

How did you bless the disk you installed clover legacy too?

Link to comment
Share on other sites

One way to do it is to start Apple Bootloader and then option-click the volume.

 

another is :

  sudo bless --folder=/Volumes/xxx/ --file=/Volumes/xxx/EFI/BOOT/BOOTX64.efi --setBoot --nextonly     for EFI boot

  sudo bless --mount /Volumes/xxx/ --setboot --legacy --nextonly    for legacy boot

Link to comment
Share on other sites

One way to do it is to start Apple Bootloader and then option-click the volume.

 

another is :

  sudo bless --folder=/Volumes/xxx/ --file=/Volumes/xxx/EFI/BOOT/BOOTX64.efi --setBoot --nextonly     for EFI boot

  sudo bless --mount /Volumes/xxx/ --setboot --legacy --nextonly    for legacy boot

 

Thanks Jief, that always confuse me, I think you go it straight for me now.

Link to comment
Share on other sites

Good evening at all!  :) I'm new to the forum and unfortunately I'm not very practical to compile. I also like "Coder" and many others I have a mac pro 3.1 with Pc graphics card (Nvidia GeForce gtx 660 ti) and I can not view the native start up of apple, so I folded back on the clover, hoping to replace it completely the apple boot manager, but above all to allow me to see the boot choices, having an independent graphics. I have followed all your conversation and I understand that the situation is more contorted than expected and different from the statements of the official clover site, where it is proclaimed as a universal bootloader ... This deeply dispels me.

 
I have two main questions for you:
 
1: Clover automatically recognizes the usb to boot from them?
2: I would like to install windows 10 directly on a ssd mounted on a "Sonnet tempo Pro Plus" and I could boot from usb but as you know I can not view the apple boot manager to select it.
I was hoping to solve with the clover.
 
Previously I tried bootrunner 2.1 and I have to say that it is a great program for mac (10 $ fee) but to activate the USB ports needs a script that if you do not buy the program will not tell you, logically!
 
Can you help me correctly install clover and configure it or top bootmanager or other valid solutions to work around the mac's start up manager vision barrier?
 
Thank you and I congratulate you for your technical skills!
Link to comment
Share on other sites

@Jey-bit

I need a GOP firmware for you video card. Be sure f that before anything else.

 

Then, booting MacOs is prefered with rEFInd than Clover.

 

I answered a lot of question and it takes me a lot of time. So I'll ask you to dig into rEFInd website and you'll find how to install. I can still answer difficult question but please, spend some time reading before asking.

 

1: you tell Mac what to boot by blessing an efi file. See my post.

2: no idea what's a  "Sonnet tempo Pro Plus".

 

Cheers.

Link to comment
Share on other sites

Hi jief! Thank you for having responded! I will contact EVGA support for the video card Gop and I will try to re-install ReFind on Yosemite 10.10.5 boot, I will try to better understand the bless command and the procedure you wrote earlier! The "Sonnet tempo pro plus" is a PCI-and / sata 3 card, but unfortunately in the Mac Pro 3.1 the SSDs that are hosted are seen as external devices and therefore "BootCamp" does not allow it to install Windows! It is only allowed on disks or internal SSDs. I have tried installing it on an internal SSD successfully, but as I move it on the PCI-cards and it fails to see it in selecting the boot option of the Mac in system preferences, but it could be started directly from the Apple startup manager that I I can not see this graphics card. Thanks again and good day!

Chiedo scusa per l'inglese, ma sto usando il traduttore di google ?

Chiedo scusa per l'inglese, ma sto usando il traduttore di google ?

I apologize for English, but as you have noticed I'm Italian and I'm using Google Translator! ?

Link to comment
Share on other sites

Yes ! The board is recognized automatically by both windows and mac and the version I have, it has the latest firmware updated by the factory. I contacted the "Sonnet" support and replied that OSD SSDs can be started in raid 0 (already tried and running, and is also seen in (system preferences, startup disc selection) while i have answered that windows installation can only be done from the single SSD, not in raid 0 because they say that Windows does not support startup in Raid 0. But I'm puzzled about what I was told about windows because in its configuration log you can activate rumor and raid entries. Now I would not know if only for SSD or hard disk data management or if for booting.

But I think it should start regardless of raid 0, because the system sees it (Raid 0) as a single disk. "Sonnet" support has concluded that however, osx and win systems can be selected directly from the apple startup manager, a shame they can not see it.
So I can not select booting usbs for direct win installation on the ssd housed on the "Sonnet" card, clearly first manually creating its classic partition to host it.

Sorry the translator was wrong: rumor= ahci 

Link to comment
Share on other sites

from what I've read on the official website in the chips the card has double firmware, both for win and for mac stored. I tried to install the clover boot in legacy mode but it jumps and goes straight to loading yosemite. seeing the posts you wrote I noticed that I did not rename the boot of cloverX64 in bootX64 and did not replace the original file!

Link to comment
Share on other sites

 Share

×
×
  • Create New...