Jump to content

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

Bootloader Clover UEFI Build_Clover.command

  • Please log in to reply
1118 replies to this topic

#1101
tluck

tluck

    InsanelyMac Deity

  • Members
  • PipPipPipPipPipPipPipPipPipPip
  • 1,903 posts
  • Gender:Male
  • Location:NC, USA

nice FredWST - yes that works nicely.

 

- i created an XCODE9 set (copied all the XCODE8 defs) in tools_def and then modified 

RELEASE_XCODE9_X64_CC_FLAGS   = -c    -Os       -Wall -Werror -Wextra -Wno-error=varargs ...

- then build Clover with -t XCODE9

 

Running edk2 build for CloverX64 using the command:
build  -D NO_GRUB_DRIVERS_EMBEDDED -D NO_GRUB_DRIVERS -D USE_LOW_EBDA -p Clover/Clover.dsc  -a X64 -b RELEASE -t XCODE9 -n 5



#1102
ErmaC

ErmaC

    127.0.0.1

  • Supervisors
  • 5,220 posts
  • Gender:Male
  • Location:Canary Islands

Hello,

 DEBUG_XCODE9_X64_CC_FLAGS   = -c -g -Os       -Wall -Werror -Wextra -include AutoGen.h -funsigned-char -fno-ms-extensions -fno-stack-protector -fno-builtin -fshort-wchar -mno-implicit-float -mms-bitfields -Wno-unused-parameter -Wno-missing-braces -Wno-missing-field-initializers -Wno-tautological-compare -Wno-sign-compare $(PLATFORM_FLAGS) "-DEFIAPI=__attribute__((ms_abi))" -DUSE_CLANG_BUILTIN_MS_VA_LIST -Wno-error=varargs
RELEASE_XCODE9_X64_CC_FLAGS   = -c    -Os       -Wall -Werror -Wextra -include AutoGen.h -funsigned-char -fno-ms-extensions -fno-stack-protector -fno-builtin -fshort-wchar -mno-implicit-float -mms-bitfields -Wno-unused-parameter -Wno-missing-braces -Wno-missing-field-initializers -Wno-tautological-compare -Wno-sign-compare $(PLATFORM_FLAGS) "-DEFIAPI=__attribute__((ms_abi))" -DUSE_CLANG_BUILTIN_MS_VA_LIST -Wno-error=varargs

-Wno-error=varargs do the job. Code need to be improve to remove this compiler option. 

 

found here : https://git.yoctopro...ith-clang.patch

 

Fred

 

thx for the info

 

so if that is correct here is the duplicaded and adapted part for tools_def --> https://github.com/f...0080d0c8ba.diff

 

I don't have XCODE9 yet... but in this way + the change made in the Clover_Build script for XCODE9 detection it would be able to work...

 

need test:

- XCODE9... of course...

- test script --> https://raw.githubus...ont_use.command

- plus the change for the tools_def.txt

 

ErmaC



#1103
SavageAUS

SavageAUS

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,088 posts
  • Gender:Male


thx for the info

 

so if that is correct here is the duplicaded and adapted part for tools_def --> https://github.com/f...0080d0c8ba.diff

 

I don't have XCODE9 yet... but in this way + the change made in the Clover_Build script for XCODE9 detection it would be able to work...

 

need test:

- XCODE9... of course...

- test script --> https://raw.githubus...ont_use.command

- plus the change for the tools_def.txt

 

ErmaC

With your script

Running from: macOS 10.12.6
Xcode 9.0
Build version 9A235
                             <--------------------------------------------------
================================================================================
Compiler settings
                             <--------------------------------------------------
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/c++/4.2.1
Apple LLVM version 9.0.0 (clang-900.0.37)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
                             <--------------------------------------------------
================================================================================
BUILDTOOL is XCODE9
                             <--------------------------------------------------
 
================================================================================
nasm check:
                             <--------------------------------------------------
NASM version 2.13.01 compiled on May  1 2017
================================================================================
gettext check:
                             <--------------------------------------------------
found gettext at /Users/shane/src/opt/local/bin
================================================================================
boot6
                             <--------------------------------------------------
TOOLCHAIN_DIR: /Users/shane/src/opt/local
NASM_PREFIX: /Users/shane/src/opt/local/bin/
NASM_VER: 2.13.01
Initializing workspace
Loading previous configuration from /Users/shane/src/edk2/Conf/BuildEnv.sh
WORKSPACE: /Users/shane/src/edk2
EDK_TOOLS_PATH: /Users/shane/src/edk2/BaseTools
CONF_PATH: /Users/shane/src/edk2/Conf
 
Running edk2 build for CloverX64 using the command:
build --skip-autogen  -D NO_GRUB_DRIVERS_EMBEDDED -D CHECK_FLAGS -D USE_LOW_EBDA -p Clover/Clover.dsc  -a X64 -b RELEASE -t XCODE9 -n 9 
 
Build environment: Darwin-16.7.0-x86_64-i386-64bit
Build start time: 18:12:45, Sep.20 2017
 
WORKSPACE        = /Users/shane/src/edk2
ECP_SOURCE       = /Users/shane/src/edk2/EdkCompatibilityPkg
EDK_SOURCE       = /Users/shane/src/edk2/EdkCompatibilityPkg
EFI_SOURCE       = /Users/shane/src/edk2/EdkCompatibilityPkg
EDK_TOOLS_PATH   = /Users/shane/src/edk2/BaseTools
CONF_PATH        = /Users/shane/src/edk2/Conf
build: : warning: Tool chain [XCODE9] is not defined
 
 
build.py...
 : error 4000: Not available
[XCODE9] not defined. No toolchain available for build!
 
 
- Failed -
Build end time: 18:12:46, Sep.20 2017
Build total time: 00:00:00
 
 
o_Ops, ./ebuild.sh exited with error(s), aborting..
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.
[Process completed]


#1104
fusion71au

fusion71au

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 813 posts
  • Gender:Male

need test:

- XCODE9... of course...

- test script --> https://raw.githubus...ont_use.command

- plus the change for the tools_def.txt

 

ErmaC

 

@ErmaC,

 

The Test_Script works fine to build Clover r4212 with XCODE9 in 10.12.6 and 10.13_GM17A362a.

 

Attached is the build log for the Standard Release but Custom Macros option also built OK.  

 

Tools_def.txt with @FredWst changes was installed in ~/src/edk2/Conf and  ~/src/edk2/Clover/Patches_for_EDK2/Conf.

 

Thanks to all the devs involved  :).

 

 

@SavageAUS,

[XCODE9] not defined. No toolchain available for build!

You need to update your Tools_def.txt (in ~/src/edk2/Conf and ~/src/edk2/Clover/Patches_for_EDK2/Conf) with @FredWst changes.

make: *** No rule to make target `tbuild'.  Stop.

Try running option 3) -  update Clover + force edk2 update (no building)........ before running the build (option 6).

Attached Files



#1105
SavageAUS

SavageAUS

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,088 posts
  • Gender:Male


@ErmaC,

 

The Test_Script works fine to build Clover r4212 with XCODE9 in 10.12.6 and 10.13_GM17A362a.

 

Attached is the build log for the Standard Release but Custom Macros option also built OK.  

 

Tools_def.txt with @FredWst changes was installed in ~/src/edk2/Conf and  ~/src/edk2/Clover/Patches_for_EDK2/Conf.

 

Thanks to all the devs involved  :).

 

 

@SavageAUS,

[XCODE9] not defined. No toolchain available for build!

You need to update your Tools_def.txt (in ~/src/edk2/Conf and ~/src/edk2/Clover/Patches_for_EDK2/Conf) with @FredWst changes....

Using the tools_def.txt you provided i am still unable to compile with xcode 9.

Running from: macOS 10.12.6
Xcode 9.0
Build version 9A235
                             <--------------------------------------------------
================================================================================
Compiler settings
                             <--------------------------------------------------
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/c++/4.2.1
Apple LLVM version 9.0.0 (clang-900.0.37)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
                             <--------------------------------------------------
================================================================================
BUILDTOOL is XCODE9
                             <--------------------------------------------------
 
================================================================================
nasm check:
                             <--------------------------------------------------
NASM version 2.13.01 compiled on May  1 2017
================================================================================
gettext check:
                             <--------------------------------------------------
found gettext at /Users/shane/src/opt/local/bin
================================================================================
boot6
                             <--------------------------------------------------
TOOLCHAIN_DIR: /Users/shane/src/opt/local
NASM_PREFIX: /Users/shane/src/opt/local/bin/
NASM_VER: 2.13.01
Initializing workspace
Loading previous configuration from /Users/shane/src/edk2/Conf/BuildEnv.sh
WORKSPACE: /Users/shane/src/edk2
EDK_TOOLS_PATH: /Users/shane/src/edk2/BaseTools
CONF_PATH: /Users/shane/src/edk2/Conf
 
Running edk2 build for CloverX64 using the command:
build --skip-autogen  -D NO_GRUB_DRIVERS_EMBEDDED -D CHECK_FLAGS -D USE_LOW_EBDA -p Clover/Clover.dsc  -a X64 -b RELEASE -t XCODE9 -n 9 
 
Build environment: Darwin-16.7.0-x86_64-i386-64bit
Build start time: 19:36:13, Sep.20 2017
 
WORKSPACE        = /Users/shane/src/edk2
ECP_SOURCE       = /Users/shane/src/edk2/EdkCompatibilityPkg
EDK_SOURCE       = /Users/shane/src/edk2/EdkCompatibilityPkg
EFI_SOURCE       = /Users/shane/src/edk2/EdkCompatibilityPkg
EDK_TOOLS_PATH   = /Users/shane/src/edk2/BaseTools
CONF_PATH        = /Users/shane/src/edk2/Conf
 
 
Architecture(s)  = X64
Build target     = RELEASE
Toolchain        = XCODE9
 
Active Platform          = /Users/shane/src/edk2/Clover/Clover.dsc
Flash Image Definition   = /Users/shane/src/edk2/Clover/Clover.fdf
 
Processing meta-data .. done!
Building ... /Users/shane/src/edk2/MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf [X64]
Building ... /Users/shane/src/edk2/MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf [X64]
make: *** No rule to make target `tbuild'.  Stop.
 
 
build.py...
 : error 7000: Failed to execute command
make tbuild [/Users/shane/src/edk2/Build/Clover/RELEASE_XCODE9/X64/MdePkg/Library/BasePcdLibNull/BasePcdLibNull]
 
 
build.py...
 : error 7000: Failed to execute command
make tbuild [/Users/shane/src/edk2/Build/Clover/RELEASE_XCODE9/X64/MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull]
 
 
build.py...
 : error F002: Failed to build module
/Users/shane/src/edk2/MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf [X64, XCODE9, RELEASE]
 
- Failed -
Build end time: 19:36:16, Sep.20 2017
Build total time: 00:00:03

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

Edit: Never mind, chose wrong options.



#1106
ErmaC

ErmaC

    127.0.0.1

  • Supervisors
  • 5,220 posts
  • Gender:Male
  • Location:Canary Islands

@ErmaC,

 

The Test_Script works fine to build Clover r4212 with XCODE9 in 10.12.6 and 10.13_GM17A362a.

 

Attached is the build log for the Standard Release but Custom Macros option also built OK.  

 

Tools_def.txt with @FredWst changes was installed in ~/src/edk2/Conf and  ~/src/edk2/Clover/Patches_for_EDK2/Conf.

 

Thanks to all the devs involved  :).

 

good...

...now we need first merge and update the tools_defs in the clover repo... then merge the test_script changes in the main script... for daily use...

 

PS: I see few post ago...  some error in the "VA_START (Args, Iso639Language);"

few changes are needed in the library... but this is a point where start https://www.mail-arc...g/msg25740.html ... is a post made by Slice :P

 

Cordially

 

ErmaC



#1107
Badruzeus

Badruzeus

    InsanelyMac Sage

  • Members
  • PipPipPipPipPipPip
  • 382 posts
  • Gender:Male
  • Location:Indonesia
  • Interests:Graphics Design.

Well, what's going on..?  :)

 

Spoiler

 

My tools are:

OS: OS X 10.11.6 (15G1611)
XCode: 8.2 Build 8C38
NASM: 2.13.01
Build_Clover script v4.5.4
EDK2: r25373
 
Thanks.

Attached Files



#1108
fusion71au

fusion71au

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 813 posts
  • Gender:Male

@Badruzeus,

 

Try editing ~/src/edk2/MdePkg/Include/Library/UefiLib.h as @tluck suggests in post#14524.  @Slice did sync with edk2-25373, and a few things still need to be ironed out between Clover/XCODE9  :).

 

Attached is edited file...

Attached Files



#1109
Badruzeus

Badruzeus

    InsanelyMac Sage

  • Members
  • PipPipPipPipPipPip
  • 382 posts
  • Gender:Male
  • Location:Indonesia
  • Interests:Graphics Design.

@Badruzeus,

 

Try editing ~/src/edk2/MdePkg/Include/Library/UefiLib.h as @tluck suggests in post#14524.  @Slice did sync with edk2-25373, and a few things still need to be ironed out between Clover/XCODE9  :).

 

Attached is edited file...

Thanks @fusion71au:

build started at:
Thu Sep 21 06:30:19 WIB 2017
finished at
Thu Sep 21 06:34:29 WIB 2017

Done!

                             <--------------------------------------------------
Clover was built successfully!

So, I should to correct there's no problem with Build_Clover.command v4.5.4, sorry.  :angel_not:

Attached Files



#1110
fantomas1

fantomas1

    InsanelyMacaholic

  • Supervisors
  • 4,476 posts
  • Gender:Male

Build_Clover.command v4.5.4 + EDK2 v25373 + XCode 9 GM

 --------------------------
 Building process complete!
 --------------------------

 Build info.
 ===========
  Package name: Clover_v2.4k_r4214.pkg
  MD5:          753c8fa7a7c4e3457e467758f5b552df
  Version:      v2.4k
  Stage:        v2.4k
  Date/Time:    2017-09-21 10:36:16
  Built by:     fantomas
  Copyright     2012-2017

  adding: Clover_v2.4k_r4214.pkg (deflated 1%)
  adding: Clover_v2.4k_r4214.pkg.md5 (stored 0%)
total 47400
drwxr-xr-x   9 fantomas  staff       306 Sep 21 10:39 .
drwxr-xr-x  15 fantomas  staff       510 Sep 21 10:39 ..
-rw-r--r--@  1 fantomas  staff  11974887 Sep 21 10:39 Clover_v2.4k_r4214.pkg
-rw-r--r--   1 fantomas  staff        68 Sep 21 10:39 Clover_v2.4k_r4214.pkg.md5
-rw-r--r--   1 fantomas  staff  11904776 Sep 21 10:39 Clover_v2.4k_r4214.zip
drwxr-xr-x   3 fantomas  staff       102 Sep 21 10:38 Resources
drwxr-xr-x   7 fantomas  staff       238 Sep 21 10:39 build
drwxr-xr-x   3 fantomas  staff       102 Sep 21 10:39 package
drwxr-xr-x   7 fantomas  staff       238 Sep 21 10:39 utils
================================================================================
build started at:
Thu Sep 21 10:35:21 CEST 2017
finished at
Thu Sep 21 10:39:26 CEST 2017

Done!

                             <--------------------------------------------------
Clover was built successfully!
Press any key to continue...


#1111
Philip Petev

Philip Petev

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 265 posts
  • Gender:Male
  • Location:Haskovo, Bulgaria

FYI: Xcode 9 seems to work with both XCODE5 and XCODE8 profiles. Tested them both, deleting the edk2 folder every time and I'm currently running Clover r4214, built with the XCODE5 profile.



#1112
Matgen84

Matgen84

    InsanelyMac Geek

  • Donators
  • 217 posts
  • Gender:Male
  • Location:France
  • Interests:Hackintosh, Apple Mac, PC

FYI: Xcode 9 seems to work with both XCODE5 and XCODE8 profiles. Tested them both, deleting the edk2 folder every time and I'm currently running Clover r4214, built with the XCODE5 profile.

If i unsterstand: it is not necessary to modify Uefilib file for example, to compile with Xcode 9. Just select "Xcode9" in the script. Right?

 

Sorry for my bad english.



#1113
ctich

ctich

    InsanelyMac Protégé

  • Members
  • Pip
  • 16 posts
  • Gender:Male
  • Location:Kyiv, Ukraine

hello, I deleted the old "src" folder and ran the script again, but in the end I get an error, how do I fix it?

OS X 10.12.6 Xcode Version 9.0 (9A235)



#1114
Slice

Slice

    InsanelyMac V.I.P.

  • Local Moderators
  • 6,188 posts
  • Gender:Male
  • Location:Moscow

I also use 10.12.6 and Xcode 9A235. The problem is not here.



#1115
Philip Petev

Philip Petev

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 265 posts
  • Gender:Male
  • Location:Haskovo, Bulgaria

hello, I deleted the old "src" folder and ran the script again, but in the end I get an error, how do I fix it?

OS X 10.12.6 Xcode Version 9.0 (9A235)

What kind of error? Post some log, we're not clairvoyants.



#1116
ctich

ctich

    InsanelyMac Protégé

  • Members
  • Pip
  • 16 posts
  • Gender:Male
  • Location:Kyiv, Ukraine

What kind of error? Post some log, we're not clairvoyants.

sorry did not attach log

Attached Files



#1117
Slice

Slice

    InsanelyMac V.I.P.

  • Local Moderators
  • 6,188 posts
  • Gender:Male
  • Location:Moscow

sorry did not attach log

build: : warning: Tool chain [XCODE9] is not defined


build.py...
 : error 4000: Not available
	[XCODE9] not defined. No toolchain available for build!

Use XCODE5 toolchain.



#1118
droples

droples

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 249 posts
  • Gender:Male

sorry did not attach log

tools_def.txt

 

            #1104            

PS Up Build_Clover.commandv4.5.5 - default TC XCODE8, everything is compiled without problems -OS X 10.12.6,Xcode9.



#1119
Badruzeus

Badruzeus

    InsanelyMac Sage

  • Members
  • PipPipPipPipPipPip
  • 382 posts
  • Gender:Male
  • Location:Indonesia
  • Interests:Graphics Design.

with script v4.5.5 & XCode 8.2 under 10.11.6; r4217 well built here..

Attached Files







Also tagged with one or more of these keywords: Bootloader, Clover, UEFI, Build_Clover.command


1 user(s) are reading this topic

1 members, 0 guests, 0 anonymous users


© 2016 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Mac Netbook  |   PHP hosting by CatN  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy