Jump to content

Clover General discussion


ErmaC
29,818 posts in this topic

Recommended Posts

Why deprecate MBR?  This is no effort in supporting it because EDK2 PartitionDxe must recognize it according to latest UEFI spec (2.6).

 

I've had LegacyBoot work in PBR mode with CloverEFI BiosBlockIO and SATA controller in 6-series chipset.  I think problems with LegacyBoot only arise if using native UEFI or protected-mode CloverEFI.

 

[The problem is if you start with protected-mode UEFI driver for SATA/USB and try to switch to LegacyBoot using Int 13 is not always possible.]

Edited by Zenith432
  • Like 2
Link to comment
Share on other sites

Hi Zenith432,

Not related to previous discussion, I found that Clover version > ~3500 can't boot 10.6.8. Always crash at AppleNVRAM.

The problem is in boot6 -> RuntimeServices -> GetVariable() and I think the problem began at clang compilation. Before 3471 we compiled by gcc-4.9.

The difference is EFI API which is not good supported by clang yet.

macOS expected that RS procedures will have EFI API. It uses registers RCX, RDX, R8, R9 for the first four args.

While clang compiles to UNIX API. RDI, RSI, RDX, RCX.

I don't know why new systems are not crashed but 10.6.8 seems less stable.

 

If I took boot6 3197 and CloverX64.efi rev 4003 all works fine.

Link to comment
Share on other sites

The difference is EFI API which is not good supported by clang yet.

macOS expected that RS procedures will have EFI API. It uses registers RCX, RDX, R8, R9 for the first four args.

While clang compiles to UNIX API. RDI, RSI, RDX, RCX.

CLANG38 defines "EFIAPI=__attribute__((ms_abi))".

Link to comment
Share on other sites

XCODE5 target uses "-target x86_64-pc-win32-macho" which has Microsoft Windows64 ABI by default on all functions (no need for __attribute__((ms_abi))). However, the handling of VA_LIST is tricky for this target.

  • In Apple clang ver >= 7.3 or Generic clang ver >= 3.7, using __builtin_ms_va_list works with above target.
  • Prior  to these versions of clang there is __builtin_va_list for above target which works in a semi-broken-way.

There is also a bug in __builtin_ms_va_list handling for above target in clang.  I don't know if this has been fixed, but edk2 code in MdePkg/Base/Include.h works around this bug by always jumping at least sizeof(UINTN) when iterating VA_LIST.

 

CLANG38 target uses "-target x86_64-pc-linux-gnu" which generates different code.  It needs __attribute__((ms_abi)) for Windows64 ABI functions, and relies on __builtin_ms_va_list for VA_LIST.  I haven't tested what kind of code this generates.

Link to comment
Share on other sites

I am newbie in CloverGrowerPro, i got error when I built Clover by Macbook Pro 10.12 with Xcode and Command line tool 8.2. Somebody show me how to fix that bug:

========= Translating Resources ========
/Users/mimotek/VNPT_CLOVER/CloverGrowerPro/edk2/Clover/CloverPackage/package/../../../../opt/local
GNU gettext utilities is mandatory to build Clover package.
Use the /Users/mimotek/VNPT_CLOVER/CloverGrowerPro/edk2/Clover/buildgettext.sh script to build them.
Done

Tks

Link to comment
Share on other sites

Ok, fixed and tested in 10.7.5, plus I've added the possibility of adding custom keys while dumping the nvram:

attachicon.gifbeta1.png

 

You can add what you like with Data, String and Number tags. Like a plist Data tag must contains a valid hex datas, Number means integers (floats/double are converted to max 32 bit int). String can be what you like. If you type invalid characters for Data/Numbers, the app will continue beebing until you fix it. Keys with lenght 0 will not be saved.

Actually there's no check for duplicate keys, so in the case, the higer index is what will finish to nvram.plist.

 

This is a new version and the first time will require to reinstall the helper tool, and you have to restart the app manually (later will be sutomatic). Before try this new one uncheck "run at login" from the old one, otherwise you will have two apps loaded..

Hi Micky1979, I tried your app, it tells me that my PC (Dell XPS 13 9360) has real NVRAM.

So I tried to delete EmuVariableUEFI driver, /nvram.plist and shutdown/boot rc clover scripts.

I also reset the NVRAM, which on this laptop is done by resetting BIOS settings.

I have two issues: Backlight is not saved/restored upon reboot and after wake from sleep BT and WIFI are permanently shutdown until next reboot.

I placed EmuVariableUEFI back and WIFI+BT issue disappeared.

Maybe I don't get the full picture, can you help me understand?

 

post-594729-0-70681600-1488289804_thumb.png

 

post-594729-0-53411900-1488289815_thumb.png

Link to comment
Share on other sites

Hi Zenith432,

Not related to previous discussion, I found that Clover version > ~3500 can't boot 10.6.8. Always crash at AppleNVRAM.

The problem is in boot6 -> RuntimeServices -> GetVariable() and I think the problem began at clang compilation. Before 3471 we compiled by gcc-4.9.

The difference is EFI API which is not good supported by clang yet.

macOS expected that RS procedures will have EFI API. It uses registers RCX, RDX, R8, R9 for the first four args.

While clang compiles to UNIX API. RDI, RSI, RDX, RCX.

I don't know why new systems are not crashed but 10.6.8 seems less stable.

 

If I took boot6 3197 and CloverX64.efi rev 4003 all works fine.

Bad Alarm!

Clover 4003 and up works fine.

Link to comment
Share on other sites

Hi Micky1979, I tried your app, it tells me that my PC (Dell XPS 13 9360) has real NVRAM.

So I tried to delete EmuVariableUEFI driver, /nvram.plist and shutdown/boot rc clover scripts.

I also reset the NVRAM, which on this laptop is done by resetting BIOS settings.

I have two issues: Backlight is not saved/restored upon reboot and after wake from sleep BT and WIFI are permanently shutdown until next reboot.

I placed EmuVariableUEFI back and WIFI+BT issue disappeared.

Maybe I don't get the full picture, can you help me understand?

 

attachicon.gifScreen Shot 2017-02-28 at 14.53.02.png

 

attachicon.gifScreen Shot 2017-02-28 at 14.53.11.png

What to say, no surprise if you deleted EmuVariable driver. ..... but if you have patience I have the right driver (kext) that populate the nvram with some of all the missing stuff that are in real macs :D ... under testing, stay tuned...

  • Like 5
Link to comment
Share on other sites

What to say, no surprise if you deleted EmuVariable driver. ..... but if you have patience I have the right driver (kext) that populate the nvram with some of all the missing stuff that are in real macs :D ... under testing, stay tuned...

I have xps 15 9550 and I hope to test the way with real nvram works.

 

Thanks.

 

 

从我的 iPhone 发送,使用 Tapatalk

Link to comment
Share on other sites

That's right.

@philip_petev: Sorry, i have question. Before Building Clover, what should i need to install, Xcode (version??) , command line tool (version??) or something else? Can you tell me exactly what I have to install application?

Tks!!

Link to comment
Share on other sites

@Slice

 

Hi. Slice. Nice to meet you again.

 

10.12.4 DP4 build 16E175b brings a lot of changes in platform data. And here is the updated platformdata.c  :)

Note: I don't know whether the newer data can be used in an earlier version of macOS. But I think so anyway.

 

EDIT

 

Confusing contents removed

Edited by PMheart
Link to comment
Share on other sites

Somebody help me, plzz!

My IMac is 10.12.3 OSX, i try install Xcode 7 and Xcode 8, command line tool to build CloverGrowerPro or Build_Clover.command, it still get error.

Somebody, Can tell me exactly what I have to install application before build Clover?

Tks!!

Link to comment
Share on other sites

Somebody help me, plzz!

My IMac is 10.12.3 OSX, i try install Xcode 7 and Xcode 8, command line tool to build CloverGrowerPro or Build_Clover.command, it still get error.

Somebody, Can tell me exactly what I have to install application before build Clover?

Tks!!

I guess you should make clear to your system which one do you want to use, as per what i read that conflict is caused by a promiscuous TOOLS installation googleing xcode-select should give you some hints on whats happening into your machine..   BTW , AS MANY HAVE ALREADY POINTED IT OUT  " CloverGrowerPro " is DEPRECATED, so using it make just more mess in your head, repair your xcode installation and you should be fine.

 

NOW

i've noticed a strange behaviour coming back in v4021 such as  any time i log out when back in, an EFI partition is mounted (why?), and its not the primary one (where the system resides), why is that? and is anybody else experiencing this? i saw it already on  another build but was gone with latest releases..

 

i'm going to try v4025 and will test it to see if it does it as well or not.

restart install and let you know ;)

 

*EDIT !!!    v4025

not working guys

...........................

Building ... /Users/labyone/src/edk2/Clover/OsxAptioFixDrv/OsxAptioFix2Drv.inf [X64]

[CC] FileLib

[CC] DataHub

[CC] OsxAptioFixDrv

In file included from /Users/labyone/src/edk2/Clover/rEFIt_UEFI/Platform/BdsConnect.c:15:

/Users/labyone/src/edk2/Clover/rEFIt_UEFI/Platform/Platform.h:1748:1: error: conflicting types for 'StrToGuid'

StrToGuid (

^

/Users/labyone/src/edk2/MdePkg/Include/Library/BaseLib.h:1712:1: note: previous declaration is here

StrToGuid (

^

1 error generated.

make: *** [/users/labyone/src/edk2/Build/Clover/RELEASE_XCODE5/X64/Clover/rEFIt_UEFI/refit/OUTPUT/Platform/BdsConnect.obj] Error 1

 

 

build.py...

 : error 7000: Failed to execute command

make tbuild [/users/labyone/src/edk2/Build/Clover/RELEASE_XCODE5/X64/Clover/rEFIt_UEFI/refit]

 

 

build.py...

 : error F002: Failed to build module

/Users/labyone/src/edk2/Clover/rEFIt_UEFI/refit.inf [X64, XCODE5, RELEASE]

 

- Failed -

Build end time: 13:04:55, Mar.01 2017

Build total time: 00:00:33

 

 

o_Ops, ./ebuild.sh exited with error(s), aborting..

logout

Saving session...

...copying shared history...

...saving history...truncating history files...

...completed.

 

 

[Process completed]

 

Well

  • Like 1
Link to comment
Share on other sites

I guess you should make clear to your system which one do you want to use, as per what i read that conflict is caused by a promiscuous TOOLS installation googleing xcode-select should give you some hints on whats happening into your machine..   BTW , AS MANY HAVE ALREADY POINTED IT OUT  " CloverGrowerPro " is DEPRECATED, so using it make just more mess in your head, repair your xcode installation and you should be fine.

 

NOW

i've noticed a strange behaviour coming back in v4021 such as  any time i log out when back in, an EFI partition is mounted (why?), and its not the primary one (where the system resides), why is that? and is anybody else experiencing this? i saw it already on  another build but was gone with latest releases..

 

i'm going to try v4025 and will test it to see if it does it as well or not.

restart install and let you know ;)

 

*EDIT !!!    v4025

not working guys

...........................

Building ... /Users/labyone/src/edk2/Clover/OsxAptioFixDrv/OsxAptioFix2Drv.inf [X64]

[CC] FileLib

[CC] DataHub

[CC] OsxAptioFixDrv

In file included from /Users/labyone/src/edk2/Clover/rEFIt_UEFI/Platform/BdsConnect.c:15:

/Users/labyone/src/edk2/Clover/rEFIt_UEFI/Platform/Platform.h:1748:1: error: conflicting types for 'StrToGuid'

StrToGuid (

^

/Users/labyone/src/edk2/MdePkg/Include/Library/BaseLib.h:1712:1: note: previous declaration is here

StrToGuid (

^

1 error generated.

make: *** [/users/labyone/src/edk2/Build/Clover/RELEASE_XCODE5/X64/Clover/rEFIt_UEFI/refit/OUTPUT/Platform/BdsConnect.obj] Error 1

 

 

build.py...

 : error 7000: Failed to execute command

make tbuild [/users/labyone/src/edk2/Build/Clover/RELEASE_XCODE5/X64/Clover/rEFIt_UEFI/refit]

 

 

build.py...

 : error F002: Failed to build module

/Users/labyone/src/edk2/Clover/rEFIt_UEFI/refit.inf [X64, XCODE5, RELEASE]

 

- Failed -

Build end time: 13:04:55, Mar.01 2017

Build total time: 00:00:33

 

 

o_Ops, ./ebuild.sh exited with error(s), aborting..

logout

Saving session...

...copying shared history...

...saving history...truncating history files...

...completed.

 

 

[Process completed]

 

Well

Same here. Seems to be something wrong with edk2.

  • Like 1
Link to comment
Share on other sites

@philip_petev: Sorry, i have question. Before Building Clover, what should i need to install, Xcode (version??) , command line tool (version??) or something else? Can you tell me exactly what I have to install application?

Tks!!

1. The latest version of Xcode should be sufficient.

or

2. If you don't want the whole Xcode app, you can install only the Xcode command line tools with the following command (in Terminal):

xcode-select --install

This one will download and install the latest command line tools for your macOS version.

  • Like 1
Link to comment
Share on other sites

×
×
  • Create New...