LockDown Posted August 20, 2018 Share Posted August 20, 2018 2 hours ago, zhangqq said: Open src/EDK2/MdePkg/Library/DxeServicesLib/DxeServicesLib.inf Change this line # VALID_ARCHITECTURES = IA32 X64 IPF EBC ARM AARCH64 To VALID_ARCHITECTURES = IA32 X64 IPF EBC ARM AARCH64 Now we can compile AppleSupportPkg. its is still missing Link to comment Share on other sites More sharing options...
Matgen84 Posted August 20, 2018 Share Posted August 20, 2018 26 minutes ago, ellaosx said: its is still missing Try to replace DxeServicesLib.inf of EDK2 by that of UDK2018 branche. It's work for me. DxeServicesLib.inf.zip Link to comment Share on other sites More sharing options...
SavageAUS Posted August 20, 2018 Share Posted August 20, 2018 How come the above “fix” hasn’t been pushed to the repo?Sent from my iPhone using Tapatalk 2 Link to comment Share on other sites More sharing options...
tluck Posted August 20, 2018 Share Posted August 20, 2018 hmm ... uncommenting the VALID ARCHITECTURE idea did not work for me. but commenting out the LIBRARY_CLASSES.X64 for HobLib did allow it to compile? Link to comment Share on other sites More sharing options...
zhangqq Posted August 20, 2018 Share Posted August 20, 2018 Sorry. Last time I fogot to clear the cache folder of XCode. This is the correct method. I have test it. 1) Keep src/EDK2/MdePkg/Library/DxeServicesLib/DxeServicesLib.inf untouched. 2) Clear the cache folder of XCode, every time you change a *.inf file. rm -rf ~/Library/Developer/Xcode/DerivedData/* 3) Open src/edk2/AppleSupportPkg/Platform/ApfsDriverLoader/ApfsDriverLoader.inf Change this line VALID_ARCHITECTURES = X64 to # VALID_ARCHITECTURES = X64 4) Choose "standard X64 only" to compile Clover. 1 Link to comment Share on other sites More sharing options...
Slice Posted August 21, 2018 Share Posted August 21, 2018 5 hours ago, zhangqq said: # VALID_ARCHITECTURES = X64 4) Choose "standard X64 only" to compile Clover. It means EDK2 is no more compatible with 32 bit compilation? 2 Link to comment Share on other sites More sharing options...
Matgen84 Posted August 21, 2018 Share Posted August 21, 2018 6 hours ago, zhangqq said: Sorry. Last time I fogot to clear the cache folder of XCode. This is the correct method. I have test it. 1) Keep src/EDK2/MdePkg/Library/DxeServicesLib/DxeServicesLib.inf untouched. 2) Clear the cache folder of XCode, every time you change a *.inf file. rm -rf ~/Library/Developer/Xcode/DerivedData/* 3) Open src/edk2/AppleSupportPkg/Platform/ApfsDriverLoader/ApfsDriverLoader.inf Change this line VALID_ARCHITECTURES = X64 to # VALID_ARCHITECTURES = X64 4) Choose "standard X64 only" to compile Clover. Good idea But I don't understand why is necessary to comment a line in ApfsDriverLoader.inf? ApfsDriverLoader.efi well build with the script. The problem is to add AppleImageLoader.efi Link to comment Share on other sites More sharing options...
zhangqq Posted August 21, 2018 Share Posted August 21, 2018 3 hours ago, Slice said: It means EDK2 is no more compatible with 32 bit compilation? I don't think so. 3 hours ago, Matgen84 said: Good idea But I don't understand why is necessary to comment a line in ApfsDriverLoader.inf? ApfsDriverLoader.efi well build with the script. The problem is to add AppleImageLoader.efi I can't build ApfsDriverLoader.efi without doing the change. 1 Link to comment Share on other sites More sharing options...
Matgen84 Posted August 21, 2018 Share Posted August 21, 2018 (edited) 23 minutes ago, zhangqq said: I don't think so. I can't build ApfsDriverLoader.efi without doing the change. You mean that this driver is not in /src/edk2/Build/AppleSupportPkg/RELEASE_XCODE8/X64; Or is not added to Clover. Do you use latest Build_Clover.command 4.9.1 (with or without clean src)? Here this version work fine to build ApfsDriverLoader.efi (without your change) Edited August 21, 2018 by Matgen84 Link to comment Share on other sites More sharing options...
zhangqq Posted August 21, 2018 Share Posted August 21, 2018 I found AppleImageLoader.efi. It is here. src/edk2/Build/AppleSupportPkg/RELEASE_XCODE8/X64/AppleImageLoader.efi It seems that it is not pack correctly. It is compiled. And for the old version ApfsDriverLoader package. src/edk2/Build/AppleSupportPkg/RELEASE_XCODE8/X64/AppleLoadImage.efi It is not pack correctly also. We can manually copy AppleImageLoader.efi to EFI/CLOVER/drivers64UEFI. 1 Link to comment Share on other sites More sharing options...
Matgen84 Posted August 21, 2018 Share Posted August 21, 2018 2 hours ago, zhangqq said: I don't think so. I can't build ApfsDriverLoader.efi without doing the change. 22 minutes ago, zhangqq said: I found AppleImageLoader.efi. It is here. src/edk2/Build/AppleSupportPkg/RELEASE_XCODE8/X64/AppleImageLoader.efi It seems that it is not pack correctly. It is compiled. And for the old version ApfsDriverLoader package. src/edk2/Build/AppleSupportPkg/RELEASE_XCODE8/X64/AppleLoadImage.efi It is not pack correctly also. We can manually copy AppleImageLoader.efi to EFI/CLOVER/drivers64UEFI. I don't understand: you can or you can't build ApfsDriverLoader.efi? You have or not ApfsDriverLoader.efi in Clover installer pkg? AppleLoadImage.efi is deprecated. Right, you can manually copy AppleImageLoader.efi to EFI/CLOVER/drivers64UEFI. Until the script is updated with the release of this driver Link to comment Share on other sites More sharing options...
Awesome Donkey Posted August 21, 2018 Share Posted August 21, 2018 16 minutes ago, Matgen84 said: AppleLoadImage.efi is deprecated. Right, you can manually copy AppleImageLoader.efi to EFI/CLOVER/drivers64UEFI. Until the script is updated with the release of this driver Wait, so you don't need to add AppleImageLoader.efi and it'll still work fine? Link to comment Share on other sites More sharing options...
LockDown Posted August 22, 2018 Share Posted August 22, 2018 AppleImageLoader.efi / ApfsDriverLoader.efi still can't compile Link to comment Share on other sites More sharing options...
tluck Posted August 22, 2018 Share Posted August 22, 2018 @ellaosxtry this to patch DxeServicesLib.inf mkdir -p ~/src/edk2/Clover/Patches_for_EDK2/MdePkg/Library/DxeServicesLib/ cat ~/src/edk2/MdePkg/Library/DxeServicesLib/DxeServicesLib.inf | sed -e 's/^.*HobLib/# HobLib/' > ~/src/edk2/Clover/Patches_for_EDK2/MdePkg/Library/DxeServicesLib/DxeServicesLib.inf then build 1 1 Link to comment Share on other sites More sharing options...
LockDown Posted August 22, 2018 Share Posted August 22, 2018 (edited) @tluck i now have AppleImageLoader.efi & ApfsDriverLoader.efi in ~/src/edk2/Build/AppleSupportPkg/RELEASE_XCODE8/X64 as per your instruction. Also, ~/src/edk2/Clover/CloverPackage/CloverV2/drivers-Off/drivers64UEFI/ApfsDriverLoader-64.efi. But AppleImageLoader.efi is not included in ~/src/edk2/Clover/CloverPackage/CloverV2/drivers-Off/drivers64UEFI. (probably a package build issue i guess) Do we need both? Edited August 22, 2018 by ellaosx 1 Link to comment Share on other sites More sharing options...
Matgen84 Posted August 22, 2018 Share Posted August 22, 2018 3 hours ago, tluck said: @ellaosxtry this to patch DxeServicesLib.inf mkdir -p ~/src/edk2/Clover/Patches_for_EDK2/MdePkg/Library/DxeServicesLib/ cat ~/src/edk2/MdePkg/Library/DxeServicesLib/DxeServicesLib.inf | sed -e 's/^.*HobLib/# HobLib/' > ~/src/edk2/Clover/Patches_for_EDK2/MdePkg/Library/DxeServicesLib/DxeServicesLib.inf then build Great Job This patch deserves to be included in the sources Link to comment Share on other sites More sharing options...
Matgen84 Posted August 22, 2018 Share Posted August 22, 2018 2 hours ago, ellaosx said: Do we need both? Some explanation from @fusion71au From the readme for ApfsDriverLoader, it is an Open source apfs.efi loader based on reverse-engineered Apple's ApfsJumpStart driver Loads apfs.efi from ApfsContainer located on block device. Apfs driver verbose logging suppressed. Version system: connects each apfs.efi to the device from which it was retrieved Supports AppleLoadImage protocol provides EfiBinary signature check WARNING: Please load AppleImageLoader.efi right before ApfsDriverLoader, or just put it inside drivers64uefi folder of your Clover bootloader In other words, it is chain loading the apfs.efi driver that is already embedded in the apfs volume, just like Apple's EFI firmware. Advantages include much smaller file size compared to including apfs.efi in the Clover.pkg, no verbose output and no need to update Clover.pkg with each macOS update (the driver always loads the correct version of apfs.efi that is appropriate to the macOS being loaded). @savvamitrofanov says AppleImageloader is not yet in release, maybe it's the reason why is not included automatcally in ~/src/edk2/Clover/CloverPackage/CloverV2/drivers-Off/drivers64UEFI 1 Link to comment Share on other sites More sharing options...
cecekpawon Posted August 22, 2018 Share Posted August 22, 2018 You may add some other modules including "AppleUiSupport" below this line on your local repo @Matgen84 1 1 Link to comment Share on other sites More sharing options...
Matgen84 Posted August 22, 2018 Share Posted August 22, 2018 5 minutes ago, cecekpawon said: You may add some other modules including "AppleUiSupport" below this line on your local repo @Matgen84 Thanks a lot Build_Clover.command don't use 'ext_packages' to build and add drivers. In interim solution, I inserted a simple 'copy' command for appleimageloader and now for appleUISupport. There is probably a better solution, but I do not have the skills. Any ideas Link to comment Share on other sites More sharing options...
KGP-iMacPro Posted August 22, 2018 Share Posted August 22, 2018 (edited) In contrary to both ApfsDriverLoader.efi and AppleLoadImage.efi are in my case in ~/src/edk2/Build/ApfsSupportPkg/RELEASE_XCODE8/X64/ and need to be copied manually to EFI/CLOVER/drivers64UEFI/... I am not able to find the new file AppleImageLoader.efi and there are no /AppleSupportPkg/RELEASE_XCODE8/X64/ directories under ~/src/edk2/Build/ There is only a /AppleSupportPkg/ in ~/src/edk2/.. but without /RELEASE_XCODE8/X64/ sub-directories.. Is it so difficult to update the Build_Clover.command to correctly implement ApfsDriverLoader.efi and AppleImageLoader.efi? Edited August 22, 2018 by KGP-iMacPro Link to comment Share on other sites More sharing options...
Matgen84 Posted August 22, 2018 Share Posted August 22, 2018 1 hour ago, cecekpawon said: You may add some other modules including "AppleUiSupport" below this line on your local repo @Matgen84 I test on existing UDK2018 src: I insert line in ebuild.sh but curiously don't add drivers to drivers64UEFI PKG. I don't understand why. Link to comment Share on other sites More sharing options...
cecekpawon Posted August 22, 2018 Share Posted August 22, 2018 0_o @Matgen84 sorry cant help you with those "pkg" problem man, but at least you have now complete AppleSupportPkg binaries in your drivers64UEFI folder right? o_0 1 1 Link to comment Share on other sites More sharing options...
Matgen84 Posted August 22, 2018 Share Posted August 22, 2018 1 hour ago, cecekpawon said: 0_o @Matgen84 sorry cant help you with those "pkg" problem man, but at least you have now complete AppleSupportPkg binaries in your drivers64UEFI folder right? o_0 Thanks I modified all the scripts (UDK2018 and EDK2) to add the drivers to Clover PKG. It seems work Link to comment Share on other sites More sharing options...
tluck Posted August 22, 2018 Share Posted August 22, 2018 @Matgen84 FYI, I didn't have to make any further mods to ebuild etc to include drivers in the .pkg -- this is the list of UEFI drivers I get for 4657 - drivers-Off of course means they are not installed by default but selectable via the custom mode. (note: i do add apfs.efi copied from my OS) $ find ~/src/edk2/Clover/CloverPackage/CloverV2 -name \*efi|grep UEFI|sort /Users/tluck/src/edk2/Clover/CloverPackage/CloverV2/EFI/CLOVER/drivers64UEFI/AppleImageCodec-64.efi /Users/tluck/src/edk2/Clover/CloverPackage/CloverV2/EFI/CLOVER/drivers64UEFI/AppleKeyAggregator-64.efi /Users/tluck/src/edk2/Clover/CloverPackage/CloverV2/EFI/CLOVER/drivers64UEFI/AppleUITheme-64.efi /Users/tluck/src/edk2/Clover/CloverPackage/CloverV2/EFI/CLOVER/drivers64UEFI/DataHubDxe-64.efi /Users/tluck/src/edk2/Clover/CloverPackage/CloverV2/EFI/CLOVER/drivers64UEFI/FSInject-64.efi /Users/tluck/src/edk2/Clover/CloverPackage/CloverV2/EFI/CLOVER/drivers64UEFI/FirmwareVolume-64.efi /Users/tluck/src/edk2/Clover/CloverPackage/CloverV2/EFI/CLOVER/drivers64UEFI/SMCHelper-64.efi /Users/tluck/src/edk2/Clover/CloverPackage/CloverV2/EFI/CLOVER/drivers64UEFI/VBoxHfs-64.efi /Users/tluck/src/edk2/Clover/CloverPackage/CloverV2/drivers-Off/drivers64UEFI/ApfsDriverLoader-64.efi /Users/tluck/src/edk2/Clover/CloverPackage/CloverV2/drivers-Off/drivers64UEFI/AptioInputFix-64.efi /Users/tluck/src/edk2/Clover/CloverPackage/CloverV2/drivers-Off/drivers64UEFI/AptioMemoryFix-64.efi /Users/tluck/src/edk2/Clover/CloverPackage/CloverV2/drivers-Off/drivers64UEFI/CsmVideoDxe-64.efi /Users/tluck/src/edk2/Clover/CloverPackage/CloverV2/drivers-Off/drivers64UEFI/EmuVariableUefi-64.efi /Users/tluck/src/edk2/Clover/CloverPackage/CloverV2/drivers-Off/drivers64UEFI/EnglishDxe-64.efi /Users/tluck/src/edk2/Clover/CloverPackage/CloverV2/drivers-Off/drivers64UEFI/Fat-64.efi /Users/tluck/src/edk2/Clover/CloverPackage/CloverV2/drivers-Off/drivers64UEFI/HashServiceFix-64.efi /Users/tluck/src/edk2/Clover/CloverPackage/CloverV2/drivers-Off/drivers64UEFI/NvmExpressDxe-64.efi /Users/tluck/src/edk2/Clover/CloverPackage/CloverV2/drivers-Off/drivers64UEFI/OsxAptioFix3Drv-64.efi /Users/tluck/src/edk2/Clover/CloverPackage/CloverV2/drivers-Off/drivers64UEFI/OsxAptioFixDrv-64.efi /Users/tluck/src/edk2/Clover/CloverPackage/CloverV2/drivers-Off/drivers64UEFI/OsxFatBinaryDrv-64.efi /Users/tluck/src/edk2/Clover/CloverPackage/CloverV2/drivers-Off/drivers64UEFI/OsxLowMemFixDrv-64.efi /Users/tluck/src/edk2/Clover/CloverPackage/CloverV2/drivers-Off/drivers64UEFI/PartitionDxe-64.efi /Users/tluck/src/edk2/Clover/CloverPackage/CloverV2/drivers-Off/drivers64UEFI/Ps2MouseDxe-64.efi /Users/tluck/src/edk2/Clover/CloverPackage/CloverV2/drivers-Off/drivers64UEFI/UsbKbDxe-64.efi /Users/tluck/src/edk2/Clover/CloverPackage/CloverV2/drivers-Off/drivers64UEFI/UsbMouseDxe-64.efi /Users/tluck/src/edk2/Clover/CloverPackage/CloverV2/drivers-Off/drivers64UEFI/VBoxExt2-64.efi /Users/tluck/src/edk2/Clover/CloverPackage/CloverV2/drivers-Off/drivers64UEFI/VBoxExt4-64.efi /Users/tluck/src/edk2/Clover/CloverPackage/CloverV2/drivers-Off/drivers64UEFI/VBoxIso9600-64.efi /Users/tluck/src/edk2/Clover/CloverPackage/CloverV2/drivers-Off/drivers64UEFI/apfs.efi 1 Link to comment Share on other sites More sharing options...
Matgen84 Posted August 22, 2018 Share Posted August 22, 2018 5 minutes ago, tluck said: @Matgen84 FYI, I didn't have to make any further mods to ebuild etc to include drivers in the .pkg -- this is the list of UEFI drivers I get for 4657 - drivers-Off of course means they are not installed by default but selectable via the custom mode. (note: i do add apfs.efi copied from my OS) I have the same list. Take a look AppleImageLoader.efi is missing and now AppleUiSupport.efi ( latest commit of AppleSupportPkg) in the .pkg Link to comment Share on other sites More sharing options...
Recommended Posts