Jump to content
30960 posts in this topic

Recommended Posts

Hi Guys,

 

I am having little problem here. i have installed Sierra on XEON E2683 V3 14Core machine successfully and is working fine except two issues. sleep won't working and about mac shows" 2.0Ghz unknown " I haven't added any fake id or enabled kernel patching, actually it is not necessary I believe. I have tried several values in clover "CPU type"  but none of them are working..still shows Unknow Cpu. but my XEON E5 12core CPU shows correctly in about mac section. 

Is anybody knows what may be the issue??

 

Thank you,

Yes. There were 2 problems with edk2 commit dc4c77

  • Get error "global macro arch is not permitted' in refit.inf.  This is result of change in MetaFileParser.py.  Can fix this by either using reversion checked in by Slice, or as Fritz suggested - edit refit.inf and change CLOVER$(ARCH) to just CLOVER.
  • The change in WorkspaceDatabase.py caused unfixable breakdown - a regression in edk2 build process.  It was fixed by edk2 commit 1d8ceb.  So after 1d8ceb, it is possible to use WorkspaceDatabase.py from edk2 tree or the reversion checked in by Slice.

Hope this clarifies.

 

This is my fault, I was trying to get them to fix this problem with macro expansion and instead just emits an error now...

  • Like 2

@greatcornholio

 

"nvram save" has been a topic of discussion debate and progress over the last month or so. btw, Clover 3974 is a bit old by the way! :)

there is a new proposed script and method recently posted above (v.1.16.1) . but this new model is not yet incorporated into the Clover tree (or package installer).

 

Note:

1) saves NVRAM to ESP vs /

2) uses LogoutHook vs shutdown

3) needs some tools/scripts in /etc (rc.clover.lib, rc.shutdown.d) etc)

 

So either way to your point, the old (your script) or new method does not handle the OS installer scenario very well. 

So yes, If there is extra stuff on the Installer - and if that somehow gets run, then the USB could provide the nvram.plist file on next boot presuming that is boot disk. 

perhaps you can expand on your idea to maintain variables from the install session ( are these really needed?)

  • Like 1

@greatcornholio

 

"nvram save" has been a topic of discussion debate and progress over the last month or so. btw, Clover 3974 is a bit old by the way! :)

there is a new proposed script and method recently posted above (v.1.16.1) . but this new model is not yet incorporated into the Clover tree (or package installer).

 

Note:

1) saves NVRAM to ESP vs /

2) uses LogoutHook vs shutdown

3) needs some tools/scripts in /etc (rc.clover.lib, rc.shutdown.d) etc)

 

So either way to your point, the old (your script) or new method does not handle the OS installer scenario very well. 

So yes, If there is extra stuff on the Installer - and if that somehow gets run, then the USB could provide the nvram.plist file on next boot presuming that is boot disk. 

perhaps you can expand on your idea to maintain variables from the install session ( are these really needed?)

 

we have to add "CloverDaemon-stopservice" file?

 

 

 
trap StopService SIGTERM # SIGTERM @ shutdown
while true; do
    sleep 86400 &  # Start the sleep process in background
    wait $!        # and wait to finish
done

 

above code, you did disabled to prevent failure case when shutdown in CloverDaemon. Is not that enough?

 

actually CloverDaemon-stopservice file work? "CloverDaemon" file run with com.projectosx.clover.daemon.plist.

 

but i can't see something to run CloverDaemon-stopservice.

 

why you add CloverDaemon-stopservice this file?

 

add. if there is no CloverDaemon-stopservice file, nvram can't gernerate when shutdown or restart. need CloverDaemon-stopservice file.

 

anyways 1.16.1 is working without problem for 1 weeks. i checked log and location everyday

@sherlocks 

 

if you installed nvram save script v1.16.1 by the installation script included the zip, then i believe you are launching the /etc/rc.shutdown.d/80*local script by LogoutHook - but not directly.

 

The LogoutHook script is /Library/A S/Clover/CloverDaemon-stopservice

- which runs then "shutdown scripts" in /etc/rc.shutdown.d

 

i will try to explain rationale again: 

 

I split the original CloverDaemon into 2 parts

- to avoid trying to running the "shutdown scripts" during shutdown which is not reliable.

- Changing the method to run these scripts by LogoutHook is reliable.

 

CloverDaemon

- runs all startup scripts /etc/rc.boot.d/

- run by launchd, set by /Library/LaunchDaemons/com.projectosx.clover.daemon.plist

 

CloverDaemon-stopservices 

- runs all shutdown scripts in /etc/rc.shutdown.d

- run by LogoutHook, set by installation script

  • Like 1

@sherlocks

 

if you installed nvram save script v1.16.1 by the installation script included the zip, then i believe you are launching the /etc/rc.shutdown.d/80*local script by LogoutHook - but not directly.

 

The LogoutHook script is /Library/A S/Clover/CloverDaemon-stopservice

- which runs then "shutdown scripts" in /etc/rc.shutdown.d

 

i will try to explain rationale again:

 

I split the original CloverDaemon into 2 parts

- to avoid trying to running the "shutdown scripts" during shutdown which is not reliable.

- Changing the method to run these scripts by LogoutHook is reliable.

 

CloverDaemon

- runs all startup scripts /etc/rc.boot.d/

- run by launchd, set by /Library/LaunchDaemons/com.projectosx.clover.daemon.plist

 

CloverDaemon-stopservices

- runs all shutdown scripts in /etc/rc.shutdown.d

- run by LogoutHook, set by installation script

Thank you. I understand it now.

 

 

나의 LG-F410S 의 Tapatalk에서 보냄

@Sherlocks

 

- on the Pkg for nvram save

- i think you need to add a post install command to define LogoutHook.

 

can i use uncomment this line in 20.mount_ESP.local? only have to add in postinstall?

you did comment this line blow

 

 

#gLogoutHookLog="${CLOVER_LOG_LOCATION}/rc.syscl.addlogoutHook.log"

#gLogoutHookf="/etc/rc.shutdown.d/80.save_nvram_plist.local"
#if [ -f "${gLogoutHookf}" ]; then
#    #
#    # file exist, need to logoutHook
#    #
#    echo "v${gScriptVersion} © 2017 syscl/lighting/Yating Zhou" >${gLogoutHookLog}
#    echo "Found ${gLogoutHookf}, register logoutHook"            >>${gLogoutHookLog}
#    defaults write com.apple.loginwindow LogoutHook ${gLogoutHookf}
#fi
 

can i use uncomment this line in 20.mount_ESP.local? only have to add in postinstall?

you did comment this line blow

 

well one can either define the LogoutHook by the Clover pkg installer - or some other way

If you use this start up script it will need some better logic

1) this does not need happen everytime it is run. 

2) the LogoutHook script should be general - so i chose to use /Library/A S/Clover/CloverDaemon-stopservice - since it can run multiple scripts as needed.

well one can either define the LogoutHook by the Clover pkg installer - or some other way

If you use this start up script it will need some better logic

1) this does not need happen everytime it is run. 

2) the LogoutHook script should be general - so i chose to use /Library/A S/Clover/CloverDaemon-stopservice - since it can run multiple scripts as needed.

 

1) this does not need happen everytime it is run. 

is it important? i want to know

 

2) how about this one?

 

gLogoutHookf="/Library/Application Support/Clover/CloverDaemon-stopservice"

if [ -f "${gLogoutHookf}" ]; then
    #
    # file exist, need to logoutHook
    #
    echo "v${gScriptVersion} © 2017 syscl/lighting/Yating Zhou" >${gLogoutHookLog}
    echo "Found ${gLogoutHookf}, register logoutHook"            >>${gLogoutHookLog}
    defaults write com.apple.loginwindow LogoutHook ${gLogoutHookf}
fi

 

 

add. it works

 

Supreme-MBP:~ supreme$ sudo cat /Library/Logs/CloverEFI/rc.shutdown.log

Password:

-------------------------------

DATE: 2017-03-11 TIME: 05:38:30

-------------------------------

>> Begin Script: /etc/rc.shutdown.d/80.save_nvram_plist.local

v1.16.1 © 2017 syscl/lighting/Yating Zhou/tluck/Sherlocks

2017-03-11-05:38:30  disk0: ESP -- Target  -- /Volumes/ESP-01/EFI/CLOVER

2017-03-11-05:38:30  NVRAM: No change since last update in /Volumes/ESP-01/nvram.plist

>> End Script: /etc/rc.shutdown.d/80.save_nvram_plist.local

 

Supreme-MBP:~ supreme$ 

 

and

 

v1.16.1 © 2017 syscl/lighting/Yating Zhou

Found /Library/Application Support/Clover/CloverDaemon-stopservice, register logoutHook
 

@sherlocks - 

 

try this version for 20.mount_ESP.local

 

added some logic to make sure should even add the LogoutHook etc.

 

okay. i see good code. 

 

normal process

boot, clover-daemon load, when restart or shutdown, disable clover-daemon(by CloverDaemon-stopservice). it's no problem.

 

i want to know one case whether problem or not

case is 

if logout and login again or wakeup. clover-daemon never work again? no need sudo defaults write com.apple.loginwindow LoginHook?

like "defaults write com.apple.loginwindow LoginHook /Library/Application Support/Clover/CloverDaemon"

 

add. New ESP script no problem


>> Begin Script: /private/etc/rc.boot.d/10.save_and_rotate_boot_log.local
Clover boot messages saved in /Library/Logs/CloverEFI/boot.log
>> End Script: /private/etc/rc.boot.d/10.save_and_rotate_boot_log.local

>> Begin Script: /private/etc/rc.boot.d/20.mount_ESP.local
Not auto mounting EFI partition
v1.16.1 (c) 2017 syscl/lighting/Yating Zhou/tluck
Registering LogoutHook as /Library/Application Support/Clover/CloverDaemon-stopservice
>> End Script: /private/etc/rc.boot.d/20.mount_ESP.local

@Slice

i made new v3 pkg file. completed all

1.16.1 update pkg v3.zip

Thanks for your answer.

 

"nvram save" has been a topic of discussion debate and progress over the last month or so. btw, Clover 3974 is a bit old by the way! :)

I know, this is why I was mentioning it. ;)

 

So either way to your point, the old (your script) or new method does not handle the OS installer scenario very well. 

So yes, If there is extra stuff on the Installer - and if that somehow gets run, then the USB could provide the nvram.plist file on next boot presuming that is boot disk. 

perhaps you can expand on your idea to maintain variables from the install session ( are these really needed?)

I know if I start the installer from my actual OS partition (which is setup to save nvram plist) some values are set to assist the reboot which completes the install. I assume the installer removes those. When emerging from the update in the real OS disk, these new key-values are still present. These are "install-product-url" and "rc_imgsrc_info". I had to manually remove them. Weather these are crucial or not I don't know.

 

Again, with the goal to keep the OS disk perfectly vanilla (rescue, install or real disk), since clover does kext injection, it would assume a kext could be written. This kext would grab all variables when asked to unload at shutdown and dump them in binary form to a storage device (maybe straight to device in a reserved area).

 

In fact, why is that not in FakeSMC.kext? Isn't the SMC responsible for saving nvram on real macs?

 

I'll keep digging.

Hi. I think there's a typo in kext_inject.c:

UINT8   KBESieDebugSearchEXT[]   = { 0xE8, 0x47, 0x00, 0x00, 0x00, 0xE9, 0x09, 0x00, 0x00, 0x00, 0x48, 0x8B, 0x7D, 0xE8, 0xE8, 0xD9 };
UINT8   KBESieDebugReplaceEXT[]  = { 0xE8, 0x47, 0x00, 0x00, 0x00, 0x90, 0x90, 0x00, 0x00, 0x00, 0x48, 0x8B, 0x7D, 0xE8, 0xE8, 0xD9 };

Note that now we don't NOP out the jmpq fully. (E9 09 00 00 00 -> 90 90 00 00 00 , should be 5x NOP actually.)

 

And fixed here... (Also with a minor variable renaming, don't care about that. ;))

 

new_kext_inject.c.zip

  • Like 1

You all are going to think I'm nuts, but it would be wonderful if when the system boots to the Clover main load screen (the one that lists your drives and systems with icons), it would be great if there was a way to have some kind of screen saver turn on after some minutes.

 

I don't suppose there's any way to do that, but it would be a nice to have feature!

Just out of curiosity, why in the world would one need such a "nice to have feature", if you don't mind me asking?

Prevent monitor burnout, just in case you forget, and don't auto-load the OS, or prefer not to auto-load the OS.   If you load Windows and Mac and even a Linux distro (like we do at work) that screen is a nice stopping point, but if you forget, and leave the computer on that screen, you'll suffer screen burn-out.  A simple screen-off (or have the screen just go black) would be plenty.   Some systems we use we prefer to leave on to save time loading the system.

On what kind of system are you using Clover and forget such long time to burnout a monitor?

 

Edit: More elegant solution would be, as original macOS boot loader does (at least when FileVault 2 is active) shutdown the computer after x second timeout.

  • Like 1

Error of new compilation of clover4034 and above.

 

Clover 4033 is compiled successfully. And if after that I update the clover, 

then everything also ends successfully. But there is a problem when 
I perform a new compilation (not an update) of the clover 4034 and above.
 
iMac-Droplets-2:Clover droplets$ svn up -r 4034
Updating '.':
U    Clover.dsc
U    Patches_for_EDK2/Conf/tools_def.txt
U    buildExtras.sh
U    build_gcc6.sh
U    buildnasm.sh
U    ebuild.sh
Updated to revision 4034.

 

 

Generating BootSectors
[NASM] boot0af.s -> /Users/droplets/src/edk2/Clover/CloverPackage/CloverV2/BootSectors/boot0af
[NASM] boot0ss.s -> /Users/droplets/src/edk2/Clover/CloverPackage/CloverV2/BootSectors/boot0ss
[NASM] boot0md.s -> /Users/droplets/src/edk2/Clover/CloverPackage/CloverV2/BootSectors/boot0md
[NASM] boot1h.s -> /Users/droplets/src/edk2/Clover/CloverPackage/CloverV2/BootSectors/boot1h
[NASM] boot1h2.s -> /Users/droplets/src/edk2/Clover/CloverPackage/CloverV2/BootSectors/boot1h2
[NASM] boot1f32.s -> /Users/droplets/src/edk2/Clover/CloverPackage/CloverV2/BootSectors/boot1f32
[NASM] boot1f32alt.s -> /Users/droplets/src/edk2/Clover/CloverPackage/CloverV2/BootSectors/boot1f32alt
[NASM] boot1x.s -> /Users/droplets/src/edk2/Clover/CloverPackage/CloverV2/BootSectors/boot1x
boot1x.s:188: error: short jump is out of range
boot1x.s:193: error: short jump is out of range
boot1x.s:204: error: short jump is out of range
boot1x.s:233: error: short jump is out of range
make: *** [/Users/droplets/src/edk2/Clover/CloverPackage/CloverV2/BootSectors/boot1x] Error 1

 

 

But if I do not update ebuild.sh then the compilation is successful.

  • Like 1

Zenith432, thank you!

Clover4038 compiles without problems.

iMac-Droplets-2:Clover droplets$ svn up
Updating '.':
U    Patches_for_EDK2/MdePkg/Include/IndustryStandard/Pci22.h
U    buildExtras.sh
C    ebuild.sh
.....
Restored 'CloverPackage/CloverV2/BootSectors'
Restored 'CloverPackage/CloverV2/BootSectors/lzma'
Restored 'CloverPackage/CloverV2/BootSectors/BootSectImage.exe'
Restored 'CloverPackage/CloverV2/BootSectors/usbs32.bin'
Restored 'CloverPackage/CloverV2/BootSectors/cdboot'
Restored 'CloverPackage/CloverV2/BootSectors/makeusb.bat'
Restored 'CloverPackage/CloverV2/BootSectors/GenBootSector.exe'
Updated to revision 4038.

 

 

iMac-Droplets-2:Clover droplets$ ./ebuild.sh -fr
TOOLCHAIN_DIR: /Users/droplets/src/edk2/Clover/../../opt/local
NASM_PREFIX: /Users/droplets/src/edk2/Clover/../../opt/local/bin/
NASM_VER: 2.12.02
Initializing workspace
Loading previous configuration from /Users/droplets/src/edk2/Conf/BuildEnv.sh
WORKSPACE: /Users/droplets/src/edk2
EDK_TOOLS_PATH: /Users/droplets/src/edk2/BaseTools
CONF_PATH: /Users/droplets/src/edk2/Conf

Running edk2 build for CloverX64 using the command:
build  -D USE_LOW_EBDA -p Clover/Clover.dsc  -a X64 -b RELEASE -t XCODE5 -n 9 

Build environment: Darwin-16.5.0-x86_64-i386-64bit
Build start time: 17:46:25, Mar.14 2017

WORKSPACE        = /Users/droplets/src/edk2
ECP_SOURCE       = /Users/droplets/src/edk2/EdkCompatibilityPkg
EDK_SOURCE       = /Users/droplets/src/edk2/EdkCompatibilityPkg
EFI_SOURCE       = /Users/droplets/src/edk2/EdkCompatibilityPkg
EDK_TOOLS_PATH   = /Users/droplets/src/edk2/BaseTools
CONF_PATH        = /Users/droplets/src/edk2/Conf


Architecture(s)  = X64
Build target     = RELEASE
Toolchain        = XCODE5

Active Platform          = /Users/droplets/src/edk2/Clover/Clover.dsc
Flash Image Definition   = /Users/droplets/src/edk2/Clover/Clover.fdf

Processing meta-data ....... done!
Building ... /Users/droplets/src/edk2/MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf [X64]
Building ... /Users/droplets/src/edk2/MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf [X64]
Building ... /Users/droplets/src/edk2/MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf [X64]
Building ... /Users/droplets/src/edk2/MdePkg/Library/BaseLib/BaseLib.inf [X64]
[CC] PcdLib
[SLINK] BasePcdLibNull
Building ... /Users/droplets/src/edk2/MdePkg/Library/BasePrintLib/BasePrintLib.inf [X64]
[CC] DebugLib

............
............
  -> Fat-64.efi
Copy Applications:
  -> bdmesg.efi
Done!

Generating BootSectors
[NASM] boot0af.s -> /Users/droplets/src/edk2/Clover/CloverPackage/CloverV2/BootSectors/boot0af
[NASM] boot0ss.s -> /Users/droplets/src/edk2/Clover/CloverPackage/CloverV2/BootSectors/boot0ss
[NASM] boot0md.s -> /Users/droplets/src/edk2/Clover/CloverPackage/CloverV2/BootSectors/boot0md
[NASM] boot1h.s -> /Users/droplets/src/edk2/Clover/CloverPackage/CloverV2/BootSectors/boot1h
[NASM] boot1h2.s -> /Users/droplets/src/edk2/Clover/CloverPackage/CloverV2/BootSectors/boot1h2
[NASM] boot1f32.s -> /Users/droplets/src/edk2/Clover/CloverPackage/CloverV2/BootSectors/boot1f32
[NASM] boot1f32alt.s -> /Users/droplets/src/edk2/Clover/CloverPackage/CloverV2/BootSectors/boot1f32alt
[NASM] boot1x.s -> /Users/droplets/src/edk2/Clover/CloverPackage/CloverV2/BootSectors/boot1x
[NASM] boot1xalt.s -> /Users/droplets/src/edk2/Clover/CloverPackage/CloverV2/BootSectors/boot1xalt
Description.txt -> /Users/droplets/src/edk2/Clover/CloverPackage/CloverV2/BootSectors/Description.txt
Installation.txt -> /Users/droplets/src/edk2/Clover/CloverPackage/CloverV2/BootSectors/Installation.txt
Done!

 

 

EDIT

This could be SF website problems. Thanks to @philip_petev !

 

Hi. Could someone tell me what's wrong... I could just get nothing in SF.net, when I went to https://sourceforge.net/p/cloverefiboot/code/HEAD and it showed nothing like this.

 

post-1579222-0-15220600-1489496682_thumb.png

 

Have I done anything wrong? But run this in Terminal, everything seemed fine.

Vanillas-MacBook:~ vanilla$ svn info svn://svn.code.sf.net/p/cloverefiboot/code
Path: code
URL: svn://svn.code.sf.net/p/cloverefiboot/code
Relative URL: ^/
Repository Root: svn://svn.code.sf.net/p/cloverefiboot/code
Repository UUID: 52d7a1c0-eba5-4e63-a9d7-e3186cd7c462
Revision: 4038
Node Kind: directory
Last Changed Author: zenith432
Last Changed Rev: 4038
Last Changed Date: 2017-03-14 18:57:46 +0800 (Tue, 14 Mar 2017)

Vanillas-MacBook:~ vanilla$ 

Edited by PMheart
  • Like 1
×
×
  • Create New...