Jump to content

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


Micky1979
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

Link to comment
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

  • Like 1
Link to comment
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

Link to comment
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

  • Like 1
Link to comment
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] 
  • Like 1
Link to comment
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

Link to comment
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 

 

Link to comment
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 

...

Link to comment
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         ;;
  • Like 1
Link to comment
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:
 

  • Like 1
Link to comment
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!

  • Like 3
Link to comment
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/

Link to comment
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

  • Like 1
Link to comment
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. 

Link to comment
Share on other sites

×
×
  • Create New...