Sherlocks Posted January 24, 2017 Share Posted January 24, 2017 well that explains why you have some failures. maybe mount or unmount issue in my case when reboot or terminal. "Resource busy -- try 'diskutil unmount'" i did think ESP index problem like you said. but after test many times, exist fail case. its not good. FrodoKenny script always success make nvram by using -f. 100% success nvram file. you said "i was not happy with a force unmount of ESP - better to leave it mounted." before. but your script has fail case. 100% or has fail case. what is best? i discussed this with syscl. and found better solution. not sure. but syscl and me have good result in test script. sorry my english thank you Link to comment Share on other sites More sharing options...
tluck Posted January 24, 2017 Share Posted January 24, 2017 ok - i can i see this latest script? and better solution? what is the fail case? do you mean failure to unmount? Link to comment Share on other sites More sharing options...
Sherlocks Posted January 24, 2017 Share Posted January 24, 2017 ok - i can i see this latest script? and better solution? what is the fail case? do you mean failure to unmount? it's made by syscl. check. not sure include that you want case. it needs to confirm work. this script tested for week. and 100% success like FrodoKenny script when terminal and reboot. @Slice https://sourceforge.net/p/cloverefiboot/code/3978/tree//rEFIt_UEFI/Platform/kext_inject.c?diff=504c3833fd48f873331ebd05:3977 i want to tell r3978 commit // Sierra debug kernel 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 }; UINT8 KBESieDebugSearchSIP[] = { 0x31, 0xC9, 0x39, 0xC1, 0x0F, 0x85, 0x3C, 0x00, 0x00, 0x00, 0x48, 0x8B, 0x85, 0xF8, 0xFE, 0xFF }; UINT8 KBESieDebugReplaceSIP[] = { 0x31, 0xC9, 0x39, 0xC1, 0xEB, 0x80, 0x90, 0x90, 0x90, 0x90, 0x48, 0x8B, 0x85, 0xF8, 0xFE, 0xFF }; // Sierra develop kernel UINT8 KBESieDevelSearchEXT[] = { 0xE8, 0x47, 0x00, 0x00, 0x00, 0xE9, 0x09, 0x00, 0x00, 0x00, 0x48, 0x8B, 0x7D, 0xE8, 0xE8, 0xD9 }; UINT8 KBESieDevelReplaceEXT[] = { 0xE8, 0x47, 0x00, 0x00, 0x00, 0x90, 0x90, 0x00, 0x00, 0x00, 0x48, 0x8B, 0x7D, 0xE8, 0xE8, 0xD9 }; UINT8 KBESieDevelSearchSIP[] = { 0x31, 0xC9, 0x39, 0xC1, 0x0F, 0x85, 0x3C, 0x00, 0x00, 0x00, 0x48, 0x8B, 0x85, 0xF8, 0xFE, 0xFF }; UINT8 KBESieDevelReplaceSIP[] = { 0x31, 0xC9, 0x39, 0xC1, 0xEB, 0x80, 0x90, 0x90, 0x90, 0x90, 0x48, 0x8B, 0x85, 0xF8, 0xFE, 0xFF }; debug kernel patch and develop kernel patch is same value. no need both. only has need debug kernel or develop kernel reason. else if (NumSieDebug == 1) { Num = SearchAndReplace(Kernel, KERNEL_MAX_SIZE, KBESieDebugSearchEXT, sizeof(KBESieDebugSearchEXT), KBESieDebugReplaceEXT, 1) + SearchAndReplace(Kernel, KERNEL_MAX_SIZE, KBESieDebugSearchSIP, sizeof(KBESieDebugSearchSIP), KBESieDebugReplaceSIP, 1); DBG_RT(Entry, "==> kernel Sierra Debug: %d replaces done.\n", Num); } else if (NumSieDevel == 1) { Num = SearchAndReplace(Kernel, KERNEL_MAX_SIZE, KBESieDevelSearchEXT, sizeof(KBESieDevelSearchEXT), KBESieDevelReplaceEXT, 1) + SearchAndReplace(Kernel, KERNEL_MAX_SIZE, KBESieDevelSearchSIP, sizeof(KBESieDevelSearchSIP), KBESieDevelReplaceSIP, 1); DBG_RT(Entry, "==> kernel Sierra Development: %d replaces done.\n", Num); } clover alway enter " else if (NumSieDebug == 1) {" if we use sierra. never enter " else if (NumSieDevel == 1) {". we don't need " else if (NumSieDevel == 1) {" because it's same hex value like i said above. as result. we have to remain debug or develop kernel hex code. it's just name difference. choose debug or develop. i don't know better name. thank you. Archive (1).zip 1 Link to comment Share on other sites More sharing options...
tluck Posted January 24, 2017 Share Posted January 24, 2017 well my script and syscl script is very similar. 2 things i changed 1) rm -r of the mountpoint is very dangerous no need to remove the mount point and if you want to that better to use rmdir - so you dont remove the entire folder if it does not get mounted 2) unmount -f is not ideal - can leave the filesystem in corrupt mode. Link to comment Share on other sites More sharing options...
Sherlocks Posted January 24, 2017 Share Posted January 24, 2017 well my script and syscl script is very similar. 2 things i changed 1) rm -r of the mountpoint is very dangerous no need to remove the mount point and if you want to that better to use rmdir - so you dont remove the entire folder if it does not get mounted 2) unmount -f is not ideal - can leave the filesystem in corrupt mode. okay. i will discuss this with syscl i want to work script that make nvram 100% all cases. if you can, give me improved file. thank you Link to comment Share on other sites More sharing options...
tluck Posted January 24, 2017 Share Posted January 24, 2017 compare closely my 1.6 and syscl v1.6 removed some minor unnecessary calls and streamlined a few things no need read nvram multiple times - stuffed in variable also added logic to write to write to / of OS only if no separate ESP partition added check for: if [[ "${gEmuVariableLegacy}" == "true" || "${gEmuVariablePresent}" != "" ]]; fixed issues with legacy _toLower Case etc my logoutHook is CloverDaemon-stopservice see attached for 4 files - replaced nvram-save.zip Link to comment Share on other sites More sharing options...
Sherlocks Posted January 24, 2017 Share Posted January 24, 2017 compare closely my 1.6 and syscl v1.6 removed some minor unnecessary calls and streamlined a few things no need read nvram multiple times - stuffed in variable also added logic to write to write to / of OS only if no separate ESP partition added check for: if [[ "${gEmuVariableLegacy}" == "true" || "${gEmuVariablePresent}" != "" ]]; fixed issues with legacy _toLower Case etc my logoutHook is CloverDaemon-stopservice see attached for 4 files - replaced confirmed Last login: Tue Jan 24 10:53:35 on console Supreme-MBP:~ supreme$ sudo /etc/rc.shutdown.d/80.save_nvram_plist.local Password: umount(/Volumes/ESP-01): Resource busy -- try 'diskutil unmount' Supreme-MBP:~ supreme$ sudo cat /Library/Logs/CloverEFI/rc.shutdown.log v1.6 © 2017 syscl/lighting/Yating Zhou Found ESP on disk0s1 and found Clover in /Volumes/ESP-01/EFI/CLOVER Target path: /Volumes/ESP-01 saved new values to NVRAM Supreme-MBP:~ supreme$ i didn't change brightness or any nvram value. nvram always refresh when reboot or terminal in your script. syscl script reflect smart nvram value if change ex. brightness, nvram refresh. but if don't change brightness, nvram not refresh. in your script, although shown "Resource busy -- try 'diskutil unmount'", nvram file is refresh. maybe need to test more times. i don't know that touch CloverDaemon service better. thank you Link to comment Share on other sites More sharing options...
tluck Posted January 24, 2017 Share Posted January 24, 2017 " in your script, although shown "Resource busy -- try 'diskutil unmount'", nvram file is refresh." this message is not a real problem - just means umount failed to unmount the filesystem - as i prefer not to force unmount if busy yes it will write the nvram.plist only if the file contents changed from the last version on the filesystem. same logic. it checks the entire nvram.plist for changes - not just brightness run the script 2 or 3 times from command line to see if the file changes $ cat /Library/Logs/CloverEFI/rc.shutdown.log v1.6 (c) 2017 syscl/lighting/Yating Zhou Found ESP on disk0s1 and found Clover in /Volumes/ESP-01/EFI/CLOVER Found ESP on disk1s1 and found Clover in /Volumes/ESP-11/EFI/CLOVER Found ESP on disk2s1 Target path: /Volumes/ESP-01 no change in NVRAM Target path: /Volumes/ESP-11 no change in NVRAM Link to comment Share on other sites More sharing options...
Sherlocks Posted January 24, 2017 Share Posted January 24, 2017 " in your script, although shown "Resource busy -- try 'diskutil unmount'", nvram file is refresh." this message is not a real problem - just means umount failed to unmount the filesystem - as i prefer not to force unmount if busy yes it will write the nvram.plist only if the file contents changed from the last version on the filesystem. same logic. it checks the entire nvram.plist for changes - not just brightness run the script 2 or 3 times from command line to see if the file changes $ cat /Library/Logs/CloverEFI/rc.shutdown.log v1.6 (c) 2017 syscl/lighting/Yating Zhou Found ESP on disk0s1 and found Clover in /Volumes/ESP-01/EFI/CLOVER Found ESP on disk1s1 and found Clover in /Volumes/ESP-11/EFI/CLOVER Found ESP on disk2s1 Target path: /Volumes/ESP-01 no change in NVRAM Target path: /Volumes/ESP-11 no change in NVRAM Okay. I want to revert CloverDaemon orig. Can i use it? 나의 LG-F410S 의 Tapatalk에서 보냄 Link to comment Share on other sites More sharing options...
tluck Posted January 24, 2017 Share Posted January 24, 2017 well sure. CloverDeamon (orig) just waits in sleep loop to run the /etc/rc.shutdown.d/*.local scripts upon shutdown - when it is killed it runs StopService part of the daemon. so it is redundant with logoutHook (CloverDaemon-stopservice) my approach is not to worry about whether these shutdown scripts will complete - but run via logoutHook earlier. Link to comment Share on other sites More sharing options...
PMheart Posted January 24, 2017 Share Posted January 24, 2017 it's made by syscl. check. not sure include that you want case. it needs to confirm work. this script tested for week. and 100% success like FrodoKenny script when terminal and reboot. @Slice https://sourceforge.net/p/cloverefiboot/code/3978/tree//rEFIt_UEFI/Platform/kext_inject.c?diff=504c3833fd48f873331ebd05:3977 i want to tell r3978 commit debug kernel patch and develop kernel patch is same value. no need both. only has need debug kernel or develop kernel reason. clover alway enter " else if (NumSieDebug == 1) {" if we use sierra. never enter " else if (NumSieDevel == 1) {". we don't need " else if (NumSieDevel == 1) {" because it's same hex value like i said above. as result. we have to remain debug or develop kernel hex code. it's just name difference. choose debug or develop. i don't know better name. thank you. Hi. Sherlocks. Seems the new patch hex code don't exist. Both the two patches. Check http://www.insanelymac.com/forum/topic/284656-clover-general-discussion/page-609#entry235588 Link to comment Share on other sites More sharing options...
Sherlocks Posted January 24, 2017 Share Posted January 24, 2017 Hi. Sherlocks. Seems the new patch hex code don't exist. Both the two patches. Hello.In kernel? I didnt add this hex. Slice added it. I just report wrong code. I didnt check hex code in kernel. 나의 LG-F410S 의 Tapatalk에서 보냄 Link to comment Share on other sites More sharing options...
PMheart Posted January 24, 2017 Share Posted January 24, 2017 Hello. In kernel? I didnt add this hex. Slice added it. I just report wrong code. I didnt check hex code in kernel. 나의 LG-F410S 의 Tapatalk에서 보냄 Yes. In kernel. Have some looks and I'm almost sure the new patches may not work properly cuz no data can be found. 1 Link to comment Share on other sites More sharing options...
Sherlocks Posted January 24, 2017 Share Posted January 24, 2017 Yes. In kernel. Have some looks and I'm almost sure the new patches may not work properly cuz no data can be found. you're right. i checked hex code in kernel in 10.12.3 official. debug EXT and SIP hex code are not exist. i tried to find detail hex code. but not exist similar code for disable any features in kernel. as result, debug sierra kernel patch is not working now. or other new macos sierra for developer? cool information thank you:) 1 Link to comment Share on other sites More sharing options...
PMheart Posted January 24, 2017 Share Posted January 24, 2017 you're right. i checked hex code in kernel in 10.12.3 official. debug EXT and SIP hex code are not exist. i tried to find detail hex code. but not exist similar code for disable any features in kernel. as result, debug sierra kernel patch is not working now. or other new macos sierra for developer? cool information thank you:) Yes. Both of the new patches will not work. And no similar code too. So just comment them out. I think bypassing the loading path check and SIP is enough. Nothing more we should do. BTW. Normally how did you check a similar code based on the existing patch quickly? I wanna know. Thanks. Link to comment Share on other sites More sharing options...
Sherlocks Posted January 25, 2017 Share Posted January 25, 2017 @Slice i have boot problem. my laptop can't never boot. i tested r3984. i think edk2 issue when building clover. edk2 Checked out revision 23704. shown shortly osxaptiofix +++++++++++++++++++++++++++++++++++++ and force reboot. i never see boot process. here is preboot.log Link to comment Share on other sites More sharing options...
Slice Posted January 25, 2017 Share Posted January 25, 2017 Check EDK2 rev 23701. Link to comment Share on other sites More sharing options...
Sherlocks Posted January 25, 2017 Share Posted January 25, 2017 Check EDK2 rev 23701. confirmed. rev23701 i can boot. thank you. Link to comment Share on other sites More sharing options...
Slice Posted January 25, 2017 Share Posted January 25, 2017 confirmed. rev23701 i can boot. thank you. Can you determine what is the key difference between 23701 and 23702? I can't reproduce the bug. Link to comment Share on other sites More sharing options...
Sherlocks Posted January 25, 2017 Share Posted January 25, 2017 Can you determine what is the key difference between 23701 and 23702? I can't reproduce the bug. Since 23702, clover has problem? I will check work or not work in detail from any code. 나의 LG-F410S 의 Tapatalk에서 보냄 Link to comment Share on other sites More sharing options...
Slice Posted January 25, 2017 Share Posted January 25, 2017 Since 23702, clover has problem? I will check work or not work in detail from any code. 나의 LG-F410S 의 Tapatalk에서 보냄 Yes, up to KP after OS started. Nothing interesting in boot.log. Anyway, how many DSDT/kext/kernel patches do you use? Some of them crashed with EDK2 >= 23702 @Slice i have boot problem. my laptop can't never boot. i tested r3984. i think edk2 issue when building clover. edk2 Checked out revision 23704. shown shortly osxaptiofix +++++++++++++++++++++++++++++++++++++ and force reboot. i never see boot process. here is preboot.log What computer? Link to comment Share on other sites More sharing options...
Sherlocks Posted January 25, 2017 Share Posted January 25, 2017 Yes, up to KP after OS started. Nothing interesting in boot.log. Anyway, how many DSDT/kext/kernel patches do you use? Some of them crashed with EDK2 >= 23702 What computer? Good news. I found something.I will post here. 나의 LG-F410S 의 Tapatalk에서 보냄 Link to comment Share on other sites More sharing options...
Slice Posted January 25, 2017 Share Posted January 25, 2017 Test also, please, rev 3986 with latest EDK2 + Patches_to_EDK2. Link to comment Share on other sites More sharing options...
Matgen84 Posted January 25, 2017 Share Posted January 25, 2017 For me, rev 3986 with EDK2 23704: black screen on start. Thanks Link to comment Share on other sites More sharing options...
FredWst Posted January 25, 2017 Share Posted January 25, 2017 Hi, Rev 3986 with EDK2 23704 : black screen. Was ok with rev 3985 and 23704. Fred Link to comment Share on other sites More sharing options...
Recommended Posts