Jump to content
Micky1979

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

2,126 posts in this topic

Recommended Posts

Goodmorning,

In your screenshot I can see 

Building...... 

but is not followed by :

make: Nothing to be done for `tbuild'.

What is?  .. that appear re-builted..

 

mine looks like that:

Building ... /Users/Micky1979/src/edk2/Clover/LegacyBios/Region2Dxe/LegacyRegion2Dxe.inf [X64]
make: Nothing to be done for `tbuild'.
Building ... /Users/Micky1979/src/edk2/Clover/FSInject/FSInject.inf [X64]
make: Nothing to be done for `tbuild'.
Building ... /Users/Micky1979/src/edk2/Clover/MsgLog/MsgLog.inf [X64]
make: Nothing to be done for `tbuild'.
Building ... /Users/Micky1979/src/edk2/Clover/DumpUefiCalls/DumpUefiCalls.inf [X64]
make: Nothing to be done for `tbuild'.
Building ... /Users/Micky1979/src/edk2/Clover/OsxFatBinaryDrv/OsxFatBinaryDrv.inf [X64]
make: Nothing to be done for `tbuild'.
Building ... /Users/Micky1979/src/edk2/Clover/EmuVariableUefi/EmuVariableRuntimeDxe.inf [X64]
make: Nothing to be done for `tbuild'.
Building ... /Users/Micky1979/src/edk2/Clover/AppleImageCodec/AppleImageCodec.inf [X64]
make: Nothing to be done for `tbuild'.
Building ... /Users/Micky1979/src/edk2/Clover/bdmesg_efi/bdmesg.inf [X64]
make: Nothing to be done for `tbuild'.
Building ... /Users/Micky1979/src/edk2/Clover/rEFIt_UEFI/refit.inf [X64]
make: Nothing to be done for `tbuild'.
Building ... /Users/Micky1979/src/edk2/Clover/OsxAptioFixDrv/OsxAptioFixDrv.inf [X64]
Building ... /Users/Micky1979/src/edk2/Clover/OsxAptioFixDrv/OsxAptioFix2Drv.inf [X64]
Building ... /Users/Micky1979/src/edk2/Clover/OsxLowMemFixDrv/OsxLowMemFixDrv.inf [X64]

It's a pity if that does nothing :(

EDIT I see now that is online :)


 

I didn't remember why we have two files

"$CLOVERROOT"/rEFIt_UEFI/Version.h

"$CLOVERROOT"/Version.h

not sure me too, but the first path is a copy of the second

Share this post


Link to post
Share on other sites
Advertisement

I guess that build time can be improved more if Version.h remain the same during 3 cycles in building boot3, 6 and 7. At least after the first...

Share this post


Link to post
Share on other sites

It means

Building ... /Users/Micky1979/src/edk2/Clover/OsxAptioFixDrv/OsxAptioFixDrv.inf [X64]
Building ... /Users/Micky1979/src/edk2/Clover/OsxAptioFixDrv/OsxAptioFix2Drv.inf [X64]
Building ... /Users/Micky1979/src/edk2/Clover/OsxLowMemFixDrv/OsxLowMemFixDrv.inf [X64]

that these modules rebuilt for you too that I want to exclude.

They are rebuilt because Version.h is updated that is my question: is it possible to not update this file?


Thanks Micky1979, I corrected the method and it works now! See rev 3711.

Screen Shot 2016-08-18 at 11.23.27.png

Share this post


Link to post
Share on other sites

Yep, last night almost nothing :hysterical: .. don't know what time is it in Russia.. ^_^


It means

Building ... /Users/Micky1979/src/edk2/Clover/OsxAptioFixDrv/OsxAptioFixDrv.inf [X64]
Building ... /Users/Micky1979/src/edk2/Clover/OsxAptioFixDrv/OsxAptioFix2Drv.inf [X64]
Building ... /Users/Micky1979/src/edk2/Clover/OsxLowMemFixDrv/OsxLowMemFixDrv.inf [X64]

that these modules rebuilt for you too that I want to exclude.

They are rebuilt because Version.h is updated that is my question: is it possible to not update this file?


Thanks Micky1979, I corrected the method and it works now! See rev 3711.

attachicon.gifScreen Shot 2016-08-18 at 11.23.27.png

Slice I'm writing from the smartphone, I'll check it when I'm back at Home

Share this post


Link to post
Share on other sites

This works too

Copy CloverEFI:
  -> boot6
Changing byte at 0xa9 of boot6 to show 6 as init message:
1+0 records in
1+0 records out
1 bytes transferred in 0.000036 secs (27777 bytes/sec)

Thanks!

 

Moscow time = GMT+3

Share this post


Link to post
Share on other sites

Build_clover3 ->Clover3711.

 

Standard build ( boot6) ok.

Build boot7 - if I do not use the compilation flag "D USE_BIOS_BLOCKIO" then compilation succeeds.

                      If I use the compilation flag "D USE_BIOS_BLOCKIO" then the compilation fails.  

Building ... /Users/droplets/src/edk2/Clover/LegacyBios/BlockIoDxe/BlockIoDxe.inf [X64]
make: Nothing to be done for `tbuild'.
make: *** No rule to make target `tbuild'.  Stop.
build.py...
 : error 7000: Failed to execute command
	make tbuild [/Users/droplets/src/edk2/Build/Clover/RELEASE_XCODE5/X64/Clover/LegacyBios/BlockIoDxe/BlockIoDxe]
build.py...
 : error F002: Failed to build module
	/Users/droplets/src/edk2/Clover/LegacyBios/BlockIoDxe/BlockIoDxe.inf [X64, XCODE5, RELEASE] 

Share this post


Link to post
Share on other sites

I have no such problem

[DLINK1] BiosBlockIoDxe
[MTOC] BiosBlockIoDxe
[GENFW] BiosBlockIoDxe

...
Copy CloverEFI:
  -> boot7
Changing byte at 0xa9 of boot7 to show 7 as init message:
1+0 records in
1+0 records out
1 bytes transferred in 0.000033 secs (30175 bytes/sec)
  -> BOOTX64.efi
  -> CLOVERX64.efi

Share this post


Link to post
Share on other sites

@droples, @Slice, I have the cure for this cases  :lol: --> ebuild.sh.zip (I hope)

 

EDIT if you like..

added -fr  (long opt --force-rebuild ) based on latest by Slice

 

usage:

./ebuild.sh -fr bla bla and all other arguments

...and it should work as before, i.e. force rebuild everything(s)

 

 

Benchmark (boot6 + boot7 +boot3):

 

start build is Thu Aug 18 12:09:14 CEST 2016

finish build is Thu Aug 18 12:09:56 CEST 2016

:shock:  :D 42 seconds instead of minutes (offcourse, w/o building the package)


@droples try this beta script: [beta script removed, v3.1 is now available in the Download section]

and firstly run option 6, later retry with all you need.

Please enter your choice: 
1) check revision
2) update Clover only (no building)
3) update & build Clover
4) run my script on the source
5) build existing revision (no update, standard build)
6) build existing revision with FORCEREBUILD (no update, standard build)
7) build existing revision with custom macros enabled
8) build Clover from scratch (delete /Users/Micky1979/src)
9) info and limitations about this script
#? 6

Moscow time = GMT+3

Ah! only one hour difference 

 

Share this post


Link to post
Share on other sites

Build_Clover_Betta.command

 

6_build...with FORCEREBUILD  ->ok

7_build...custom macros -> without changes

 

But .. the manual installation of a (@ebuild.sh -fr) succeeds.

attachicon.gif6_FORCEBUILD.txt.zip

attachicon.gif7build_with custom macros.txt.zip

attachicon.gif3712Log_Manual installation without the use of script.txt.zip

Thanks droples, very detailed.

If is not too much and when have time, at line 787 change this line:

            ./ebuildBorg.sh -x64 $LTO_FLAG ${DEFINED_MACRO} -t $BUILDTOOL 

to be:

            ./ebuildBorg.sh -mc $LTO_FLAG ${DEFINED_MACRO} -t $BUILDTOOL 

...

Share this post


Link to post
Share on other sites

Thanks droples, very detailed.

If is not too much and when have time, at line 787 change this line:

            ./ebuildBorg.sh -x64 $LTO_FLAG ${DEFINED_MACRO} -t $BUILDTOOL 

to be:

            ./ebuildBorg.sh -mc $LTO_FLAG ${DEFINED_MACRO} -t $BUILDTOOL 

Sorry..but without changes.

781             printHeader 'Custom boot7' # boot7 is the only target here
782             # we want only boot7, not boot7-MPC79 too..
783             if [[ -f "${CLOVERV2_PATH}/Bootloaders/x64/boot7-MCP79" ]]; then
784             mv -f "${CLOVERV2_PATH}/Bootloaders/x64/boot7-MCP79" "${CLOVERV2_PATH}/Bootloaders/x64/boot7-MCP79.back"
785             fi
786             ebuildBorg
787             ./ebuildBorg.sh -mc $LTO_FLAG ${DEFINED_MACRO} -t $BUILDTOOL
788         ;;

Share this post


Link to post
Share on other sites

personally I'm not interested "building the iso image" :)

 

btw I'm adding check_flags just like @slice said CCE threads

 

BUILD boot7 with additional macros
                          <----------------------------------------------------
     1) USE_APPLE_HFSPLUS_DRIVER
     2) USE_BIOS_BLOCKIO
     3) NO_GRUB_DRIVERS
     4) NO_GRUB_DRIVERS_EMBEDDED
     5) ONLY_SATA_0
     6) DISABLE_UDMA_SUPPORT
     7) ENABLE_VBIOS_PATCH_CLOVEREFI
     8) DISABLE_USB_SUPPORT
     9) ENABLE_PS2MOUSE_LEGACYBOOT
     10) DEBUG_ON_SERIAL_PORT
     11) DISABLE_LTO
     12) ENABLE_SECURE_BOOT
     13) USE_ION
     14) DISABLE_USB_MASS_STORAGE
     15) ENABLE_USB_OHCI
     16) ENABLE_USB_XHCI
     17) REAL_NVRAM
     18) CHECK_FLAGS

actual macros defined: no one

enter you choice or press "b" to build:
 

Share this post


Link to post
Share on other sites

New v3.1 available in the Download section:

 

  • script reordering.
  • added options "6)" to force rebuild all targets (adviced for distribution).
  • added new macro "CHECK_FLAGS"
  • now the script don't build the iso as default, but can (see info).
  • added info from running OS and gcc/Xcode used.
  • added build time (only building, update excluded)
  • 100 X faster!

 

BENCH building a full pkg (boot3+boot6+boot7+boot7-MCP79) w/o update:

===============================================================================
build started at:
Thu Aug 18 21:42:58 CEST 2016
finished at
Thu Aug 18 21:44:49 CEST 2016

Done!
                          <---------------------------------------------------- 

wow if my eyes are good, less than 2 minutes  :thumbsup_anim:

 

EDIT

iso is now skipped, but is easy to re-enable:

 

BUILD_PKG="YES" # NO to not build the pkg

BUILD_ISO="NO"  # YES if you want the iso

 

also you can skip antirely iso and pkg ..if you want!

Share this post


Link to post
Share on other sites

Hey Micky1979!

Look what I have in Sierra

iMac:Clover slice$ ./ebuild.sh 
TOOLCHAIN_DIR: /Users/slice/src/edk2/Clover/../../opt/local
No nasm binary found in toolchain directory !
Build it with the buidnasm.sh script.
iMac:Clover slice$ 

But I have NASM binary installed

iMac:Clover slice$ nasm -v
NASM version 2.12.02 compiled on Jul  6 2016
iMac:Clover slice$

I can just cancel this check and compilation will work fine.

But I want you do some more check for NASM version.

2.12 is good

2.11 and 0.98 are wrong versions. Clover will not work compiled by them.


We don't need to compile nasm. We have to use binary from authors

nasm-2.12.02-macosx.zip

Download, unzip, and install into /opt/local/bin and manual into /opt/local/share/

Share this post


Link to post
Share on other sites

New v3.1 available in the Download section:

 

  • script reordering.
  • added options "6)" to force rebuild all targets (adviced for distribution).
  • added new macro "CHECK_FLAGS"
  • now the script don't build the iso as default, but can (see info).
  • added info from running OS and gcc/Xcode used.
  • added build time (only building, update excluded)
  • 100 X faster!

 

BENCH building a full pkg (boot3+boot6+boot7+boot7-MCP79) w/o update:

===============================================================================
build started at:
Thu Aug 18 21:42:58 CEST 2016
finished at
Thu Aug 18 21:44:49 CEST 2016

Done!
                          <---------------------------------------------------- 

wow if my eyes are good, less than 2 minutes  :thumbsup_anim:

 

EDIT

iso is now skipped, but is easy to re-enable:

 

BUILD_PKG="YES" # NO to not build the pkg

BUILD_ISO="NO"  # YES if you want the iso

 

also you can skip antirely iso and pkg ..if you want!

Extra

post-1181448-0-63855000-1471715190_thumb.png

Share this post


Link to post
Share on other sites

Hi Guys.

Slice, STLVNUB, the script actually apply a patch to the nasm source made by Zenith432 and I don't know if in newer versions that is solved (easy to see I guess).... that's why install nasm and disasm if not installed inside the src bin path. Also was an opportunity to avoid users to use the Apple one.

Yeah, ok, the script will check for the nasm version and perform the installation only if too old. Then a check will be added also for gettext (just the existence it's enough?), "which" command will tell us if they are already in $PATH.

but ...in ebuild.sh? .. and what about Zenith432 patch?

 

And feel free to improve :)


Extra

Yes, you should add all macros you need to build Clover with functionalities you need. 

Share this post


Link to post
Share on other sites

Yes, you should add all macros you need to build Clover with functionalities you need. 

yes , i do

I write in french  :blush: ( extra=extraordinary)

Thank for your great work  :thumbsup_anim:

Share this post


Link to post
Share on other sites

Probably wouldn't hurt to rebuild BaseTools IF it gets updated as well.

Otherwise Great job...

done for the next revision of this script..

looking now at nasm/gettext

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.

Announcements

  • Similar Content

    • By surfermax
      buon giorno 
      spero tu mi possa aiutare ,perche' non riesco piu' a far partire i miei 2 ssd 850 samsung sui quali highsierra funzionava perfettamente da 1 anno e non ce' maniera di farlo ripartire .unica cosa e' che riesco ad arrivare alla console dell'istaller e ho tentato varie volte di ripristinare da una time machine che ho salvato su un altro disco usb .
      il mio sistema e' un asus p5qd turbo ed e7500 dual core . grafica gtx1050 chr funzionava con accelerazione e webdriver nvidia .audio voodoo 282. e boot clover che e' sempre stato il 5103 che poi  ho aggiornato a 5120 proprio il giorno prima che succedesse il fattaccio .quel giorno ho aggiornato dal sito apple la comboupdate 10.13 .6 da 10.13.4 .e qui al riavvio boom niente diski in clover nn li visualizzava piu .ora sciacciando f3 visualizzo il preboot e lssd con highsierra aggiornato ma arrivato alla console andava in reset loop .
      a questo punto riesco a ripartire togliendo l'accelerazione .e installando i nuovi webdriver di nvidia aggiornati all 10.13.6 .
      al riavvio non parte piu' con accelerazione e sempre problema in clover dei diski ma riuscivo a partire con f3 e preboot .
      ora decido di installare da time machine e tornare alla versione 10.13.4 del giorno prima ..e al riavvio niente piu dischi ne preboot .sono fermo a questo punto ..riesco solo a far partire installer ma nn so i comandi da dare in terminal per aggiustare le cose . ho anche linux su un altro notebook. ti ringrazio anticipatamente per l'aiuto .
    • By pink101
      So, here's what i think clover do when it patch ati framebuffer, first it read a cached kext, then it search the original hex value of the connector, then it changed the value with the new one. Is it correct? now, here's what i find confusing... let's say that i want to patch AMD7000Controller.kext, in that kext, i want to patch "AJI" framebuffer with a new value, so clover try to find the hex value of "AJI" connector then replace it with the new one, simple right? but when i search the AMD7000Controller binary file for other framebuffer, some of them didn't exist in the binary, for example, i tried to patch "Ramen" framebuffer, from various source, it said that:
      Ramen (6) @ 0xeba70 LVDS, HDMI, DP, DP, DP, DP 020000000001000039050108000000002001050600000000 000800000402000000010200000000001000030500000000 000400000403000000010343000000001102010100000000 000400000001000000010431000000002103040300000000 000400000403000000010563000000001204020200000000 000400000001000000010651000000002205040300000000 So i open a hex editor and search for:
      020000000001000039050108000000002001050600000000000800000402000000010200000000001000030500000000000400000403000000010343000000001102010100000000000400000001000000010431000000002103040300000000000400000403000000010563000000001204020200000000000400000001000000010651000000002205040300000000 but, it turns out that hex editor couldnt find that hex value in AMD7000Controller,

       
      most of the framebuffer exist in the AMD7000Controller, but some doesnt, If this is the case, then, where does clover find the original framebuffer to be patched? am i missing something?
       
       
    • By tluck
      Lenovo T460 macOS with Clover Guide
      Latest Release on GitHub (July 2020) Updated to Clover r5120 Updated Lilu based kexts - Lilu, ALC, WEG Added AirportBrcmFixup.kext
        Various Tweaks over Last months The main branch in my github repo is a complete Clover ESP (/EFI) bundle and kext pack for the Lenovo T460. The current file bundle seems to work on Sierra, HighSierra, Mojave and Catalina. There is an OpenCore branch in the repo as an alternative to Clover. This guide was developed for a Clover implementation. But the thread has evolved to include discussion of both Clover and Opencore for these systems: T460 and T470 family of ThinkPads.
       
      Full Clover file set - config.plist etc. Includes all custom kexts Includes custom DSDT/SSDT scripts and patches Utility scripts The zip bundles are posted to GitHub: https://github.com/tluck/Lenovo-T460-Clover/releases
      Caveat: The T460 systems used here was configured with: i5-6300U, Intel HD Graphics 520, 1920x1080 touch screen. If you have a different system model, then extract the ACPI files and use the included scripts to create a set of files consistent with your system type and BIOS version. See below for details.
      Credits: RehabMan, Shmilee, vusun123, TimeWalker, Mieze from which, much of their work and help is/was was used to get the T460 to this point.
      Devices and aspects working:
      Ethernet -  Intel I219LM is enabled via IntelMausiEthernext.kext WiFi/BT - substitute the Intel WiFi/BT with a compatible Broadcom or Atheros chip Audio - ALC293 codec implemented via AppleALC.kext (the old AppleHDA_ALC293 and CodecCommander kexts are not needed) PS2 - ClickPad + TrackPoint + all 3 buttons - using a modified VoodooPS2Controller to support new layouts - and added some custom Fn key maps based on 440/450 dsdt USB - implemented via custom SSDT + USBInjectAll kext. All USB3/USB2 ports are intel-based and work -  3 external USB and internal Camera, BT, etc  Sleep/Wake - the sleepwatcher package and custom sleep/wake scripts are used to help with sleep/wake for BT and PS2 devices. Note: have not tried to implement the SD card reader - no driver found.
      ACPI Files
      New Installation - Steps and Details
      Part 1 - OS Installation
      Part 2- Post OS Installation and Setup
      Notes on Custom Kexts
       
    • By geheim19
      I’m new here and hope a lot of answers to my questions to find.
       
    • By STLVNUB
      *Put the script into its own folder as it will create other folders*
      What is BTB?
      Script file to clone and help build Clover or Opencore repos
      Script will create link to itself in /usr/local/bin/bob
      Script SHOULD fix up any stray bobs you may have.
      Then you only need to type bob. and a parameter
      "a" for ACID repo, official
      "d" for ACID repo DUET build
      "c" for CLOVER
      "e" to erase UDK Folder
      Easier typing bob than.....usual stuff
      YOU WILL NEED TO cmod+x THE SCRIPT
      Enjoy
       
×