Jump to content
Micky1979

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

2,126 posts in this topic

Recommended Posts

Awesome, thank you! One additional feature/option I'd like to see is to force it to update everything first, then run a build, which is how I currently have it setup, by simply enabling both UPDATE_FLAG=YES and BUILD_FLAG=YES.

This way it's easy to build an always up to date version, but again entirely non-interactively.

Yes, with both UPDATE_FLAG and BUILD_FLAG, set to YES, the script will always try to update the Clover (and edk2, if there's a new recommended version) source before building it. In addition, I've added the ForceEDK2Update option to the config, which set to non-zero, will force the edk2 source update and rebuild the edk2 Basetools.

Share this post


Link to post
Share on other sites
Advertisement
It seems that the current script is always designed to only receive the latest version.

Can not you get a specific revision?

Currently, there is only a way to temporarily build a specific version by putting it into the Clover folder.

If you insert the revision file, the script will not correctly recognize the revision.

 

EDIT1.

this SUGGESTED_CLOVER_REV is solution.

 

thanks

Share this post


Link to post
Share on other sites

Hi,

 

 I add any theme manually in CloverV2/Themespkg. After compile, there are  this extension "_title". Can you explain why? Please.

post-1110743-0-55935800-1511418931_thumb.png

Share this post


Link to post
Share on other sites

That's probably something with the buildpkg.sh script, not with this one. Will take a look into it, when I find some time.

Thanks

Share this post


Link to post
Share on other sites

is there a possibility since your script can add APFS to clover that the script can have an option to run this script http://www.insanelymac.com/forum/topic/327584-apfsefi-without-verbose-boot/?p=2532527to quite apfs verbosity on the transferred to clover folder apfs file.

 

Can be done... but the "patch" as is, is not dynamic... I mean "looks like it works".... until now (APFS.efi from latest 10.13.2 beta bla-bla-bla)... can we be sure about this for the next releases?

 

Other way (not automatic way) is patch it before the package process...

 

ErmaC

Share this post


Link to post
Share on other sites

I figured it could be optional not automatic something we can trigger from BuildCloverConfig.txt but yeah I see your point it would have to probably parse apfs kext version to known working versions as it might not be a "fix for all" it's your script you would know better then I :)

Share this post


Link to post
Share on other sites

I figured it could be optional not automatic something we can trigger from BuildCloverConfig.txt

 

Anyway could be a good options... let's see what other say..

 

ErmaC

Share this post


Link to post
Share on other sites

Just updated the script. It now supports those changes. To ensure you have the latest nasm binary, just remove the current one with

rm -f ~/src/opt/local/bin/nasm

To ensure you have the GCC7 toolchain, it's recommended to remove the following two folders:

~/src/opt

~/src/tools

Note that you should set the toolchain as default (Build_Tool=GNU in BuildCloverConfig.txt) in order to download and build it.

I've also merged the other changes from the work branch such as the non-interactive mode, so it's recommended to remove your settings file and let the script create a new one.

Share this post


Link to post
Share on other sites

Just updated the script. It now supports those changes. To ensure you have the latest nasm binary, just remove the current one with

rm -f ~/src/opt/local/bin/nasm

To ensure you have the GCC7 toolchain, it's recommended to remove the following two folders:

~/src/opt

~/src/tools

Note that you should set the toolchain as default (Build_Tool=GNU in BuildCloverConfig.txt) in order to download and build it.

I've also merged the other changes from the work branch such as the non-interactive mode, so it's recommended to remove your settings file and let the script create a new one.

Thanks a lot

Share this post


Link to post
Share on other sites

Since lately i'm having trouble to build Clover, it ends with following

 

 

build.py...

/Users/Xabbu/src/edk2/MdePkg/Library/BaseLib/BaseLib.inf(452): error 000E: File/directory not found in workspace

/Users/Xabbu/src/edk2/MdePkg/Library/BaseLib/X64/WriteTr.nasm

 

 

- Failed -

Build end time: 19:00:32, Dec.11 2017

Build total time: 00:00:03

 

 

 

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

 

can anyone shed some light plz ?!

 

EDIT: SOLVED

Share this post


Link to post
Share on other sites

Sorry for asking;

I read as noted by the script, it requires at least 16.04 for Ubuntu version, but I've installed Ubuntu 17.10 on my mach.

I then tried to run the script and get these:

BOOTX64.efi && CLOVERX64.efi @1,1KB (instead of 7xxKB if using Ubuntu 16.04 or XCode toolchain under macOS).

(I also remember that on prev 16.04 the script forced to use gcc53 as buildtool, as same as on 17.10 which is gcc72)

 

Any idea to make the script becomes compatible under Ubuntu 17.10? Thanks.  :)

Well, the good news is now Build_Clover script v4.6.1, EDK2 r25909 with Ubuntu 17.10 x64 (kernel: 4.13.0-19) is able to build Clover and no longer get 1KB *.efi. Considering this Ubuntu version for a compatible OS?

 

I have a question; is it normal that GCC built produces smaller boot binary and *.efi compared to XCode does?

Thanks for your great efforts.

r4359_GCC72_Ub1710.zip

Built_r4359_GCC72_Ub17.10_EDK25909.txt.zip

preboot.log_a43sj_10.13.3_r4359.txt.zip

Share this post


Link to post
Share on other sites

Sorry, but with latest Build_Clover script v4.6.2 i get the following error when building with XCode 9.2:

Attempting to detect HOST_ARCH from 'uname -m': x86_64
Detected HOST_ARCH of X64 using uname.
mkdir -p .
make -C Common
gcc  -c -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-self-assign -Wno-unused-result -nostdlib -c -g  -I .. -I ../Include/Common -I ../Include/ -I ../Include/IndustryStandard -I ../Common/ -I .. -I . -I ../Include/X64/  -O2 PcdValueCommon.c -o PcdValueCommon.o
PcdValueCommon.c:270:47: error: format specifies type 'unsigned long' but the argument has
      type 'UINT64' (aka 'unsigned long long') [-Werror,-Wformat]
    sprintf(PcdList[Index].Value, "0x%016lx", Value);
                                     ~~~~~~   ^~~~~
                                     %016llx
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/secure/_stdio.h:47:56: note: 
      expanded from macro 'sprintf'
  __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__)
                                                       ^~~~~~~~~~~
1 error generated.
make[2]: *** [PcdValueCommon.o] Error 1
make[1]: *** [Common] Error 2
make: *** [Source/C] Error 2

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

any help is appreciated. Thx. in advance

 

PS: maybe i have to mention the following:

================================================================================
Build_Clover script v4.6.2                                  No update available.
                             <--------------------------------------------------
================================================================================
By Micky1979 based on Slice, Zenith432, STLVNUB, JrCs, cecekpawon, Needy,
cvad, Rehabman, philip_petev, ErmaC

Supported OSes: macOS X, Ubuntu (16.04/16.10), Debian Jessie and Stretch
                             <--------------------------------------------------
CLOVER	Remote revision: 4360	Local revision: 4360
EDK2	Remote revision: 26006	Local revision: 26006

The current local EDK2 revision is the suggested one (26006). 
Used settings: /Users/md/BuildCloverConfig.txt 

Share this post


Link to post
Share on other sites

PS: maybe i have to mention the following:

================================================================================
Build_Clover script v4.6.2                                  No update available.
                             <--------------------------------------------------
================================================================================
By Micky1979 based on Slice, Zenith432, STLVNUB, JrCs, cecekpawon, Needy,
cvad, Rehabman, philip_petev, ErmaC

Supported OSes: macOS X, Ubuntu (16.04/16.10), Debian Jessie and Stretch
                             <--------------------------------------------------
CLOVER	Remote revision: 4360	Local revision: 4360
EDK2	Remote revision: 26006	Local revision: 26006

The current local EDK2 revision is the suggested one (26006). 
Used settings: /Users/md/BuildCloverConfig.txt 

Already try to restore the suggested EDK2 revision? 25909 (for 4.6.2)

 

ErmaC

Share this post


Link to post
Share on other sites

Hi all and Merry Christmas holidays to all.

Two days ago I see a new option show up about clover configurator pro, so I decide to take a look, really good. Anyone knows how to contact Mickey1979?

As a developer I'm interested in its job about that plist editor, but I notice only now is marked as retired and did not even read my private message (email nowhere  :mad: ). Let me know in pm, thanks and sorry for the OT.

Share this post


Link to post
Share on other sites

Hi all and Merry Christmas holidays to all.

Two days ago I see a new option show up about clover configurator pro, so I decide to take a look, really good. Anyone knows how to contact Mickey1979?

As a developer I'm interested in its job about that plist editor, but I notice only now is marked as retired and did not even read my private message (email nowhere  :mad: ). Let me know in pm, thanks and sorry for the OT.

 

You can contact him throw github...

https://github.com/Micky1979

 

ErmaC

Share this post


Link to post
Share on other sites

Sorry, but with latest Build_Clover script v4.6.2 i get the following error when building with XCode 9.2:

 

 

Attempting to detect HOST_ARCH from 'uname -m': x86_64
Detected HOST_ARCH of X64 using uname.
mkdir -p .
make -C Common
gcc  -c -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-self-assign -Wno-unused-result -nostdlib -c -g  -I .. -I ../Include/Common -I ../Include/ -I ../Include/IndustryStandard -I ../Common/ -I .. -I . -I ../Include/X64/  -O2 PcdValueCommon.c -o PcdValueCommon.o
PcdValueCommon.c:270:47: error: format specifies type 'unsigned long' but the argument has
      type 'UINT64' (aka 'unsigned long long') [-Werror,-Wformat]
    sprintf(PcdList[Index].Value, "0x%016lx", Value);
                                     ~~~~~~   ^~~~~
                                     %016llx
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/secure/_stdio.h:47:56: note: 
      expanded from macro 'sprintf'
  __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__)
                                                       ^~~~~~~~~~~
1 error generated.
make[2]: *** [PcdValueCommon.o] Error 1
make[1]: *** [Common] Error 2
make: *** [Source/C] Error 2

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

 

 

 

Also confirmed by me, I can't build new BaseTools with latest edk revision atm.

Share this post


Link to post
Share on other sites

This issue was introduced in edk2 r25984 and I'm pretty sure it has something to do with lines 269-273 in edk2/BaseTools/Source/C/Common/PcdValueCommon.c:

#ifdef __GNUC__
    sprintf(PcdList[Index].Value, "0x%016lx", Value);
#else
    sprintf(PcdList[Index].Value, "0x%016llx", Value);
#endif

Whatever defines that GNUC macro, it also breaks the Basetools build. Enforcing the "else" part solves (maybe?!?) the build problem.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Simon's InsaneMac
      Hi, I'm kind of lost when scrolling to Clover Configurator, so I decided to use an EFI from the web and just configure the most basic stuff. But that sadly didn't work, im always getting the attached screen IMG_0054.HEIC (and I don't know whether all the errors are listed, as I can't scroll). 
      Anyways I thought it'd be better to do a custom setup. Can anyone give me some help with what to choose in the settings? Here's my rig:
      i7 8700k
      Asus z370-G (Rog Strix)
      gtx 1060 6gb
      samsung ssd (SATA)
      WD hard drive
       
      Your help would be much appreciated!
    • By kylon
      A big thanks to wegface for teaching me a lot of things.
       
       
      Tested on Catalina 10.15.4 and Clover EFI 5104 (Catalina Patcher)
       
      Not Working:
      - realtek sd card reader (pm me if you have a fix)
       
      Notes:
      **CPU patches are disabled, if you are using a locked BIOS you must enable them**
       
      Clover EFI:
      - Install it in UEFI Mode and change your hdd partition table to GPT.
      - You will be able to install ANY OS in EFI mode, even if this pc does not support EFI at all! (No guide available for this)
       
      You will need:
      My unlocked BIOS (OPTIONAL) (here) Latest Clover config from CCE Bank (here) (asus k53sj-kylon) Rehabman Voodoo PS2 Controller (here) acidanthera AppleALC (here) acidanthera Lilu (here) acidanthera VirtualSMC (here) acidanthera SMCBatteryManager (here) acidanthera SMCLightSensor (here) acidanthera WhateverGreen (here) Mieze Realtek RTL8111 (here)
    • By Rohan20
      Opencore is running really really slow on Catalina 10.15.4. So It was running perfectly before I put the ssdt-pnlf for enabling Brightness control. it is running really slow and I verified my config with the sanity checker and its all correct. can someone please help. I am attaching my oc folder.

       
      https://www.dropbox.com/s/drkek0eaz19ina5/OC.zip?dl=0
       
    • By y010204025
      Disclaimer: All files of this article are from itpwd.com and rehabman ’s github.com

       
      After Testing:
       
      Graphics card: NVIDIA K1000M / K2000M / K2100M / K3000M / K3100M / K4000M / M1000M (ordinary TN1600x900 or 1920x1080), AMD W5170M / W7170M (DC2 or 4K), Intel HD4000 (ordinary TN1600x900 or 1920x1080) can be driven normally, but NVIDIA graphics card Brightness adjustment is disabled. AMD W5170m and w7170m are the best choices on 8570W and 8770W. The brightness can be adjusted normally and the graphics performance is very good. For WX7100m and WX4170m, the graphics card fans cannot be controlled, and other methods are required to control the fans. CPU: 3rd generation Intel Core i3, i5 and i7 (Ivy Bridge architecture, including all dual-core and quad-core. Celeron and Pentium are not supported), frequency conversion is normal. In general: If you have 8570W, 8770W, and hope you can get the best Hackintosh experience, it is recommended to replace the CPU with i7-3840QM / i7-3940XM, 8570W is recommended to choose W5170M, 8770W, and it is recommended to choose W7170M. In addition: If you want to have a 4K experience or perfect HIDPI, W5170m / W7170M supports 4K output, you can choose a suitable 4K screen to replace, but because 4K screens are mostly edp interface, and 8570W / 8770W motherboard is lvds interface, This requires a custom screen cable, which seems to be a difficult choice, but you can choose to do it yourself or buy it separately. In China, taobao.com is almighty and may be more suitable for you than eBay.
       
      EFI features:
      out of the box, the relevant hardware can be driven after the OS is installed, and it is easy to use without code operation.
      Supported models: HP EliteBook 8470p, 8570p, 8570w, 8770w (click the model for official specifications)
      Wireless network card: Recommended: BCM94360cd (requires ipex4 to ipex1,3 antenna 1300mbps), BCM94352HMB / DW1550 (2 antennas, 867mbps)
      Wireless characteristics: no white list, wireless network card with Bluetooth does not support the Bluetooth function of the wireless network card (also does not need to shield the pins), but the wireless normal use, you need the Bluetooth function to use this machine comes with Bluetooth:
      Clover version: 5103, keyboard mapping has been added Command key = Alt key, Option key = Win key
      Supported systems: macOS Mojave 10.14.6 (18G103)-macOS Catalina 10.15.x,
       
      Notes on known issues:
      1. The touchpad and the left and right keys under the touchpad are normal, the pointing stick and the left and right keys above the touchpad are temporarily unavailable (recommended to use the second generation of Apple Magic Trackpad)
      2. Indicator display problem (can be ignored, function is normal): Caps light is sometimes not switched in time, mute / wireless key may be yellow
      3.AMD graphics card / Intel nuclear display has supported sleep and 15 levels of brightness adjustment, NVIDIA has no
      4. If the AMD graphics card enters Huaping, refer to editing the Clover startup parameters, and add the Boot parameter radpg = 15 (the EFI file that has been configured with this parameter has been uploaded, refer to the following EFI-guided download link)
      5. Using the above NVIDIA graphics card with a normal TN screen 1600x900 or 1920x1080 can not enter the installation interface, please check whether the VBiOS of the graphics card is exclusively for HP, thank you for your test face K1000M
      6. Due to product design defects, the MSata positions of 8570w and 8770w cannot be used as boot disks, so EFI boot can only be placed on the main hard disk (turn the machine over and open the hard disk in the lower left corner of the cover, which is the main hard disk). Put on msata plate
      +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
      Hardware requirements:
      Model: 8470p, 8570p, 8570W, 8770W 1 or more, it is recommended to use another notebook for emergency Hard disk: It is recommended to choose an SSD hard disk of 240g or more. Samsung or Intel SATA hard disk is a good choice. Wireless card: BCM94352HMB, DW1550, BCM94360CD, miniPCIe slot U disk: 1 for 16g and above, another winPE emergency USB disk is recommended If you use a rescue USB flash drive, it means that you read this post carefully
       
      Make and install a USB flash drive:
      Get the mirror: please do it your way Making and installing a USB flash drive: macOS command line production is recommended, whether it is a real macOS model or a virtual machine (although this is not allowed to be discussed in many forums)Or you can choose to use TransMac or ether under Windows. This is not recommended, but it is simple enough for those new to Hackintosh. Make boot U disk: If you know how to put the boot into the installation U disk, unzip the EFI file and put it in the EFI partition, or you can choose a fat32 format U disk to store the EFI file separately Note: EFI is an unzipped folder, not a zip or ISO suffix file.
       
      BIOS settings From RehabMan
      To start, set BIOS to defaults.
      Then insure:
      UEFI boot is enabled (hybrid/with CSM for best result) secure boot is disabled disable fast boot IGPU graphics memory set to 64mb, if available disable the serial port via BIOS option, if available disable "LAN/WLAN switching", if available disable "Extended Idle Power States" if you find it under "Power Management Options" disable "Wake on LAN" and "Wake on USB" disable Firewire/IEEE 1394, if your laptop has it for Skylake and KabyLake laptop, enable "Launch Hotkeys without Fn keypress" Note: If you have a laptop with switchable graphics, leave it enabled. You can still use it on Windows, although the discrete card will be disabled when running OS X by the ACPI patches provided here. If you want to also disable it in Windows (via BIOS option), make sure you read about the DGPU option in your model specific SSDT (source is in SSDT-HACK.dsl), as in the scenario where the DGPU is disabled by BIOS, DGPU should be set to zero.
       
      Install:
      Please modify according to the above BIOS settings: Press F9 after booting, select the boot efi to file option, which is generally the last item. Enter your boot USB disk to find the location of cloverx64.efi, select cloverx64.efi, press Enter, and enter the clover boot interface. Select the location of the install entry and press Enter. Enter the macOS interface, use the disk tool to format the partition you need to install to hfs + or apfs format, do not choose the encryption option, this will make your efforts in vain. Note: The disk must be in gpt format, and the remaining EFI space is greater than 200M, 300mb + is recommended. If it is not, please try to modify it in WindowsPE environment. This may cause you to lose the Windows system boot and disk data. Please prepare for backup.
      After formatting the partition successfully, close the disk tool and select install, you will find the partition you installed, and follow the interface prompts. When the installation reaches a certain progress, it will restart. When restarting, select F9, enter from the boot U disk, select the disk partition where you installed macOS (no longer the U disk installation), the installation will continue, and it may restart 2 ~ 3 times Every time, you need F9 to select the boot. After entering the installation interface, except for the first installation, select the U disk, and then select the disk installation partition. Eventually you will enter the settings interface. After following the interface prompts, you will enter the macOS system interface. Remember the system password and turn off the Find my mac option.  
      Post install:
       
      After the installation is complete, you need to hang the EFI partition of the disk, copy the EFI file of the U disk to the EFI partition of the disk, so that you can directly use the disk to boot, otherwise you need to select the U disk to boot each time. The mount tool can choose cloverconfigurator. If after copying the EFI file to the disk, the computer cannot recognize your clover boot, you can use the custom boot option of bios: set the custom boot path to \efi\clover\cloverx64.efi, and set it as the first boot, Use bootice or easyUEFI to increase the clover boot option under Windows and set it as the first boot. If you do not have a wireless network card available temporarily, you can use the USB binding function of your Android phone to share the network. This may require the HoRndis driver. It is not recommended to use a US wireless network card. If you need Windows or Linux, you can install it normally. Be careful not to let Windows overwrite your boot files.  
      For other uses of macOS and brew, please pay attention to forums and other communities. Hackintosh is just the beginning.
       
      Finally, I would like to thank rehabman, vit9696 and others who contributed to Hackintosh. I also thank Cwen for his efforts to modify files and hardware tests. I hope that Hackintosh will be eternal.
       
      Please comply with the laws and regulations of your country or region. My description may not be clear or professional, but I think it is necessary. I think the existence of Hackintosh is everyone's technical hobby and experience macOS, not as a substitute for macOS cheap hardware.

      EFI_8x70_5103_W7170m_20200116 .zip
    • By StarFighter_77
      I built this hack years ago now. Started with Lion, now on El Cap. I want to update now to High Sierra.

      I think I messed up my Clover when I downloaded the update .pkg and just installed it without taking my time or customizing the install. Was on Clover r3423, now I think I'm on r5104

      I've been searching and reading this site and others for a few days before making this thread, but I need help compiling what I've learned to get my system running correctly again and ready to update to High Sierra. Then, eventually, I want to update my graphics card, switch to UEFI (if necessary) and update to Mojave.

      I couldn't get system to boot. Could get to Clover and all the options, except the Shell... I hit enter on the Shell and I get black screen and nothing.

      The only way I got it to boot was to add -v to boot args, and change smbios from 14,2 to 13,2. Not sure why that worked still. Also I'm running two monitors, but I can only now run one of them off the Intel 3000 Graphics and the second one off my GFX Card.

      So now I'm afraid to shut down or reboot.... I could really use some help with Clover.

      I'm pretty sure my config file in Clover is not right. Also, some of the files in my Clover backups are not in the new Clover install. (2.5k 5104)

      If someone could please take a look at the files I've attached and help me sort this out, I would be grateful. Thank you, Thank you, Thank you.

      I've attached
      - The last boot log
      - The current Clover folder from the EFI partition after performing Clover update. (.zip)
      - The Clover backup that was working before Clover update (.zip)
      - Library/Extensions Folder (screen shot)
      - System/Library/Extensions Folder (.zip)

      Here is my current hardware:

      Mobo: GIGABYTE GA-Z68MX-UD2H-B3

      CPU: Intel Core i7-2600K

      GPU: GIGABYTE ATI Radeon HD6870 1GB DDR5 2DVI/HDMI/2x

      RAM: Corsair Vengeance Blue 16 GB DDR3 SDRAM Dual Channel Memory Kit CMZ16GX3M4A1600?C9B

      HD0 (for OS and Apps): OCZ Technology 120 GB Vertex Series SATA II Solid State Drive

      HD1 (file storage, Adobe scratch disk): Samsung 1 TB Spinpoint 7200 RPM 32MB Cache SATA

      BURNER: LG CD/DVD Burner Model GH22NS50

      CPU COOLER: Corsair Cooling Hydro Series H50 All in One High-performanc?e CPU Cooler CWCH50-1

      P/S: Antec CP-850 850 Watt CPX Power Supply Unit

      CASE: Antec Performance One P183 V3 Case
      CLOVER.zip
      CloverBackup.zip
      bootlog.txt

      S_L_E.zip
×