Jump to content

Build_Clover.command, another Script to build standard Clover (or customized)


Micky1979
2,126 posts in this topic

Recommended Posts

1 hour 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)

 


/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

 

 

I removed ~/src.. executed Build_Clover.command 4.9.1.. before building the package with (5) and x64 only, I patched DxeServicesLib.inf with your above commands 

 

Result: absolutely no change.. no ApsfDriverLoader-64.efi in ~/src/edk2/Clover/CloverPackage/CloverV2/drivers-Off/drivers64UEFI/

 

AptioInputFix-64.efi	NvmExpressDxe-64.efi	UsbKbDxe-64.efi
AptioMemoryFix-64.efi	OsxAptioFix3Drv-64.efi	UsbMouseDxe-64.efi
CsmVideoDxe-64.efi	OsxAptioFixDrv-64.efi	VBoxExt2-64.efi
EmuVariableUefi-64.efi	OsxFatBinaryDrv-64.efi	VBoxExt4-64.efi
EnglishDxe-64.efi	OsxLowMemFixDrv-64.efi	VBoxIso9600-64.efi
Fat-64.efi		PartitionDxe-64.efi
HashServiceFix-64.efi	Ps2MouseDxe-64.efi

 

am I missing something? That issue is driving me slightly mad.. any help appreciated!

 

I am compiling with Xcode 10 under Mojave 10.14 PB7.. 

Edited by KGP-iMacPro
Link to comment
Share on other sites

Ah right i see! - there are now 3 efi drivers as part of AppleSupportPkg 

ebuild.sh does need help! -- this section looks something like this now - but you already figured that out :)

      case "$EXT_DOWNLOAD" in
        1)
          downloadExtDriver "acidanthera/AptioFixPkg" AptioFix "AptioFix-" "-RELEASE"
          downloadExtDriver "acidanthera/AppleSupportPkg" AppleSupport "AppleSupport-v" "-RELEASE"
        ;;
        0 | 2 | 3)
          copyBin "$APTIO_BUILD_DIR_ARCH"/AptioMemoryFix.efi "$CLOVER_PKG_DIR"/drivers-Off/drivers64UEFI/AptioMemoryFix-64.efi
          copyBin "$APTIO_BUILD_DIR_ARCH"/AptioInputFix.efi "$CLOVER_PKG_DIR"/drivers-Off/drivers64UEFI/AptioInputFix-64.efi
            binArray=( ApfsDriverLoader AppleImageLoader AppleUISupport )
            for efi in "${binArray[@]}"
            do
                copyBin "$APFS_BUILD_DIR_ARCH"/$efi.efi "$CLOVER_PKG_DIR"/drivers-Off/drivers64UEFI/$efi-64.efi
                copyBin "$APFS_BUILD_DIR_ARCH"/$efi.efi "$CLOVER_PKG_DIR"/drivers-Off/drivers64/$efi-64.efi 
            done
        ;;

      esac

 

 

 

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

On 8/22/2018 at 9:59 PM, tluck said:

Ah right i see! - there are now 3 efi drivers as part of AppleSupportPkg 

ebuild.sh does need help! -- this section looks something like this now - but you already figured that out :)

 

You made my day :thumbsup_anim:...

 

Thus, the correct procedure seems to be the following:

 

1.)  Download, unzip and copy DxeServicesLib.inf attached to the post linked below to  ~/src/edk2/MdePkg/Library/DxeResetSystemLib/. This will overwrite the DxeServicesLib.inf of EDK2 with the one of UDK2018.

2.) Execute the following terminal commands implemented in the post below:

 

3.) insert code marked by red rectangle in line 1115 of ~/src/edk2/Clover/ebuild.sh:

 

1347078351_Screenshot2018-08-23at08_07_40.thumb.png.2484b734ce258bcbd28fceabaa862dc4.png

 

Code snippet can be copied from post linked below. Note that I had to delete and manually implement the ";;" between "done" and "esac", as else after copy & paste of the respective code snippet the compilation of Build_Clover.command would reveal errors.. 

 

e vola! 

 

2099269500_Screenshot2018-08-22at22_51_06.png.d23ba7fe8e82cb0b319e65aeac20e18c.png

 

Thanks guys!! :wink_anim:

 

@Philip Petev, could you please fix and update Build_Clover.command accordingly? 

Edited by KGP-iMacPro
  • Like 1
Link to comment
Share on other sites

10 hours ago, tluck said:

Ah right i see! - there are now 3 efi drivers as part of AppleSupportPkg 

ebuild.sh does need help! -- this section looks something like this now - but you already figured that out :)


      case "$EXT_DOWNLOAD" in
        1)
          downloadExtDriver "acidanthera/AptioFixPkg" AptioFix "AptioFix-" "-RELEASE"
          downloadExtDriver "acidanthera/AppleSupportPkg" AppleSupport "AppleSupport-v" "-RELEASE"
        ;;
        0 | 2 | 3)
          copyBin "$APTIO_BUILD_DIR_ARCH"/AptioMemoryFix.efi "$CLOVER_PKG_DIR"/drivers-Off/drivers64UEFI/AptioMemoryFix-64.efi
          copyBin "$APTIO_BUILD_DIR_ARCH"/AptioInputFix.efi "$CLOVER_PKG_DIR"/drivers-Off/drivers64UEFI/AptioInputFix-64.efi
            binArray=( ApfsDriverLoader AppleImageLoader AppleUISupport )
            for efi in "${binArray[@]}"
            do
                copyBin "$APFS_BUILD_DIR_ARCH"/$efi.efi "$CLOVER_PKG_DIR"/drivers-Off/drivers64UEFI/$efi-64.efi
                copyBin "$APFS_BUILD_DIR_ARCH"/$efi.efi "$CLOVER_PKG_DIR"/drivers-Off/drivers64/$efi-64.efi 
            done
        ;;

      esac

 

 

 

 

Great Job :) I don't understand well, I think that Build_Clover.command don't download these external drivers, but it build them directly. It don't use ./ebuild.sh --ext-co (for example).  Before Philip's update script, where to insert equivalents lines? Witch lines to comment in actual script?

 

Please

Edited by Matgen84
Link to comment
Share on other sites

8 minutes ago, Matgen84 said:

 

Great Job :) I don't understand well, I think that Build_Clover.command don't download these external drivers, but it build them directly. Before Philip's update script, where to insert these lines? With lines to comment in actual script?

 

Please

 

~/src/edk2/Clover/ebuild.sh, insert code marked by red rectangle in line 1115

 

1347078351_Screenshot2018-08-23at08_07_40.thumb.png.2484b734ce258bcbd28fceabaa862dc4.png

 

  • Thanks 1
Link to comment
Share on other sites

6 minutes ago, KGP-iMacPro said:

 

~/src/edk2/Clover/ebuild.sh, insert code marked by red rectangle in line 1115

 

1347078351_Screenshot2018-08-23at08_07_40.thumb.png.2484b734ce258bcbd28fceabaa862dc4.png

 

 

Thanks a lot :) I understand ebuild.sh modification. Build_Clover.command build directly apfssupportpkg efi files without ebuild.sh --ext-co args. Also, I wonder if the script will take into account changes to the ebuild.sh file

 

Is that I meant

  • Like 1
Link to comment
Share on other sites

5 minutes ago, Matgen84 said:

 

Thanks a lot :) I understand ebuild.sh modification. Build_Clover.command build directly apfssupportpkg efi files without ebuild.sh --ext-co args. Also, I wonder if the script will take into account changes to the ebuild.sh file

 

Is that I meant

 

Build_Clover.command won't build directly ApfsSupportPkg without modifications 1.) and 2.) outlined in post 

 

 

One of these important modifications is yours :wink_anim::thumbsup_anim:

Link to comment
Share on other sites

13 minutes ago, KGP-iMacPro said:

 

Build_Clover.command won't build directly ApfsSupportPkg without modifications 1.) and 2.) outlined in post 

 

 

One of these important modifications is yours :wink_anim::thumbsup_anim:

 

Actually, Build_Clover.command build and add apfsdriverloader.efi correctly here. The problem is appleImageLoader and recently appleUisupport: they need DxeServicesLib.inf (patched or copy from UDK2018) to be build. I search any solution to add them to Clover pkg. :thumbsup_anim:

 

Personally, I prefer to modify the script that a Source file myself

 

Edited by Matgen84
Link to comment
Share on other sites

6 minutes ago, Matgen84 said:

 

Actually, Build_Clover.command build and add apfsdriverloader.efi correctly here. The problem is appleImageLoader and recently appleUisupport: they need DxeServicesLib.inf (patched or copy from UDK2018) to be build. I search any solution to add them to Clover pkg. :thumbsup_anim:

 

 

 

actually in my case (clean install of 10.14 and Build_Clover.command) not even  ApfsDriverLoader.efi would be build without modification 1.) and 2.) ... I guess all 3 modifications are deemed necessary.. 

Edited by KGP-iMacPro
  • Like 1
Link to comment
Share on other sites

5 minutes ago, KGP-iMacPro said:

 

actually in my case (clean install of 10.14 and Build_Clover.command) not even  ApfsDriverLoader.efi would be build without modification 1.) and 2.) ... I guess all 3 modifications are deemed necessary.. 

 

1) and 2) modification are necessary, for me too. As I said before.

  • Like 1
Link to comment
Share on other sites

22 hours ago, tluck said:

Ah right i see! - there are now 3 efi drivers as part of AppleSupportPkg 

ebuild.sh does need help! -- this section looks something like this now - but you already figured that out :)


      case "$EXT_DOWNLOAD" in
        1)
          downloadExtDriver "acidanthera/AptioFixPkg" AptioFix "AptioFix-" "-RELEASE"
          downloadExtDriver "acidanthera/AppleSupportPkg" AppleSupport "AppleSupport-v" "-RELEASE"
        ;;
        0 | 2 | 3)
          copyBin "$APTIO_BUILD_DIR_ARCH"/AptioMemoryFix.efi "$CLOVER_PKG_DIR"/drivers-Off/drivers64UEFI/AptioMemoryFix-64.efi
          copyBin "$APTIO_BUILD_DIR_ARCH"/AptioInputFix.efi "$CLOVER_PKG_DIR"/drivers-Off/drivers64UEFI/AptioInputFix-64.efi
            binArray=( ApfsDriverLoader AppleImageLoader AppleUISupport )
            for efi in "${binArray[@]}"
            do
                copyBin "$APFS_BUILD_DIR_ARCH"/$efi.efi "$CLOVER_PKG_DIR"/drivers-Off/drivers64UEFI/$efi-64.efi
                copyBin "$APFS_BUILD_DIR_ARCH"/$efi.efi "$CLOVER_PKG_DIR"/drivers-Off/drivers64/$efi-64.efi 
            done
        ;;

      esac

 

 

 

Thanks, accepted!

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

197871680_2018-08-241_03_18.png.f929547381757d4cf4b46600d3ed7380.png

still failed.

 

[SLINK] AptioMemoryFix
[DLINK1] AptioMemoryFix
[MTOC] AptioMemoryFix
[GENFW] AptioMemoryFix

- Done -
Build end time: 12:51:35, Aug.24 2018
Build total time: 00:00:14

Build environment: Darwin-18.0.0-x86_64-i386-64bit
Build start time: 12:51:36, Aug.24 2018

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


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

Active Platform          = /Users/sherlocks/src/edk2/AppleSupportPkg/AppleSupportPkg.dsc

Processing meta-data .

build.py...
/Users/sherlocks/src/edk2/AppleSupportPkg/AppleSupportPkg.dsc(...): error 4000: Instance of library class [HobLib] is not found
    in [/Users/sherlocks/src/edk2/MdePkg/Library/DxeServicesLib/DxeServicesLib.inf] [X64]
    consumed by module [/Users/sherlocks/src/edk2/AppleSupportPkg/Platform/AppleImageLoader/AppleImageLoader.inf]
 

- Failed -
Build end time: 12:51:41, Aug.24 2018
Build total time: 00:00:05
 

Link to comment
Share on other sites

4 hours ago, Sherlocks said:

 

still failed.

 

[SLINK] AptioMemoryFix
[DLINK1] AptioMemoryFix
[MTOC] AptioMemoryFix
[GENFW] AptioMemoryFix

- Done -
Build end time: 12:51:35, Aug.24 2018
Build total time: 00:00:14

Build environment: Darwin-18.0.0-x86_64-i386-64bit
Build start time: 12:51:36, Aug.24 2018

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


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

Active Platform          = /Users/sherlocks/src/edk2/AppleSupportPkg/AppleSupportPkg.dsc

Processing meta-data .

build.py...
/Users/sherlocks/src/edk2/AppleSupportPkg/AppleSupportPkg.dsc(...): error 4000: Instance of library class [HobLib] is not found
    in [/Users/sherlocks/src/edk2/MdePkg/Library/DxeServicesLib/DxeServicesLib.inf] [X64]
    consumed by module [/Users/sherlocks/src/edk2/AppleSupportPkg/Platform/AppleImageLoader/AppleImageLoader.inf]
 

- Failed -
Build end time: 12:51:41, Aug.24 2018
Build total time: 00:00:05
 

 

Beside the slice suggestion: " Open file AppleSupportPkg.dsc and erase word "-flto" when found." For those use EDK2 and Build_Clover.command, there is a patch proposed by tltuck that maybe could be added to the patch for eDK2 in sources. It solved DxeServicesLib.inf issue.

 

tltuck patch posted wednesday on this topic

 

Sorry for my bad english

Edited by Matgen84
Link to comment
Share on other sites

 
Beside the slice suggestion: " Open file AppleSupportPkg.dsc and erase word "-flto" when found." For those use EDK2 and Build_Clover.command, there is a patch proposed by tltuck that maybe could be added to the patch for eDK2 in sources. It solved DxeServicesLib.inf issue.
 
tltuck patch posted wednesday on this topic
 
Sorry for my bad english
okay. thanks
I compiled with UDK2018.
yes. UDK2018 is good. Dids's script also is using it. now i'm using his script.

나의 LG-F800S 의 Tapatalk에서 보냄

  • Like 1
Link to comment
Share on other sites

42 minutes ago, bronxteck said:

running the script with a fresh src download on osx mojave beta 8 you do not get APFSdriverloader option during clover install

DxeServicesLib.inf issue: the solution has been found on this topic. Read previous posts and Here

Edited by Matgen84
  • Like 1
Link to comment
Share on other sites

  • 4 weeks later...

not sure if this right place to post ... I tested out Xcode 10 GM ....

 

FYI, the basic build went fine  - but to make the pkg, had to make a few minor changes to CloverUpdater and CloverPrefpane to get them to build.

 

4 files in total

install-updater.sh - has a syntax error on the 2nd declare .

CloverPrefpane.m - need a one line code fix on a casting issue

project.pbxproj - just set DEPLOYMENT TARGET to 10.13 vs 10.6 

 

this was just my quick and dirty way to get it done!

Edited by tluck
Link to comment
Share on other sites

16 hours ago, tluck said:

not sure if this right place to post ... I tested out Xcode 10 GM ....

 

FYI, the basic build went fine  - but to make the pkg, had to make a few minor changes to CloverUpdater and CloverPrefpane to get them to build.

 

4 files in total

install-updater.sh - has a syntax error on the 2nd declare .

CloverPrefpane.m - need a one line code fix on a casting issue

project.pbxproj - just set DEPLOYMENT TARGET to 10.13 vs 10.6 

 

this was just my quick and dirty way to get it done!

Hi Sir, install-updater.sh is unused to build the package (or to install the updater with the package), and not sure why is there or who ever used it...probably some old tests about installing for-one-user instead of for-all-users. About setting the deployment target to 10.13 this just disallow old OSes to run or compile the program and there is no one warning produced by the actual CloverPrefpane.xcodeproj in Xcode 10 GM unless you decide to upgrade the settings proposed by Xcode to use ARC (which would eventually require some changes)  instead of the actual manual memory  retain/release cycles which is still perfectly fine, more the linker is still supporting snow leopard.

  • Like 2
Link to comment
Share on other sites

×
×
  • Create New...