Micky1979 Posted April 25, 2016 Share Posted April 25, 2016 or 0000 if an internet connection is missing, at least you will know that something have to be correct. Or prompt the user to insert it manually. Link to comment Share on other sites More sharing options...
cecekpawon Posted April 25, 2016 Share Posted April 25, 2016 Will vote "0000" if anything goes wrong, $RANDOM / remote revision will hard to track.. Builder should keep going without internet 1 Link to comment Share on other sites More sharing options...
Micky1979 Posted April 25, 2016 Share Posted April 25, 2016 BTW git is used when?? You Guys have more then one trunk? Link to comment Share on other sites More sharing options...
luxinhaus Posted April 25, 2016 Share Posted April 25, 2016 can someone answer post #623 please Link to comment Share on other sites More sharing options...
Zenith432 Posted April 25, 2016 Share Posted April 25, 2016 luxinhaus - yes --no-usb) addEdk2BuildMacro DISABLE_USB_SUPPORT Micky: $RANDOM I put for case if someone gets the repository with "svn export" and is not source controlled. Didn't want it to always be the same number, but didn't think about accessing the repository directly. It's up to Slice..git is used with git-svn. 1 Link to comment Share on other sites More sharing options...
Slice Posted April 25, 2016 Share Posted April 25, 2016 I committed as "0000". It is more clear then RANDOM. 1:035 0:001 Now is 25.4.2016, 14:31:43 (GMT) 1:035 0:000 Starting Clover rev 3471:3473 on CLOVER EFI 1:035 0:000 Build with: [Args: ./ebuild.sh | Command: build -D USE_LOW_EBDA -p Clover/Clover.dsc -a X64 -b RELEASE -t XCODE5 -n 3 | OS: 10.7.5 | XCODE: 4.4.1] 1:038 0:002 SelfDevicePath=PcieRoot(0x0)\Pci(0x1F,0x2)\VenHw(CF31FAC5-C24E-11D2-85F3-00A0C93EC93B,80)\HD(1,GPT,065C30D9-992D-4C4C-8965-A266108C7D0F,0x800,0x60000) @7F19D118 1:038 0:000 SelfDirPath = \EFI\CLOVER 1 Link to comment Share on other sites More sharing options...
Micky1979 Posted April 25, 2016 Share Posted April 25, 2016 $RANDOM I put for case if someone gets the repository with "svn export" and is not source controlled. Didn't want it to always be the same number, but didn't think about accessing the repository directly. It's up to Slice. .git is used with git-svn. clear, thanks EDIT about ISO boot0md is not copied inside 'edk2/Clover/CloverPackage/CloverV2/BootSectors/' so show me an error when I create the iso (makeiso line 144). should be commented? Link to comment Share on other sites More sharing options...
Slice Posted April 25, 2016 Share Posted April 25, 2016 clear, thanks EDIT about ISO boot0md is not copied inside 'edk2/Clover/CloverPackage/CloverV2/BootSectors/' so show me an error when I create the iso (makeiso line 144). should be commented? Look 3475 Link to comment Share on other sites More sharing options...
Micky1979 Posted April 25, 2016 Share Posted April 25, 2016 Ok better than delete it from the iso EDIT 3475 is perfect! Link to comment Share on other sites More sharing options...
luxinhaus Posted April 26, 2016 Share Posted April 26, 2016 (edited) first run failed due to mtoc.NEW not being found in /usr/local/bin. (had to copy it manually) wouldn't be possible to include it in the repo. Also, i have -t XCODE5 in my log even w/o specifying -xcode5 in ./ebuild.sh flag. normal? Edited April 26, 2016 by luxinhaus Link to comment Share on other sites More sharing options...
Zenith432 Posted April 26, 2016 Share Posted April 26, 2016 I have numerous warning during compilation like ld: warning: could not create compact unwind for _GetSleepImageLocation: non-standard register 4 being saved in prolog ld: warning: could not create compact unwind for _GetSleepImagePosition: non-standard register 4 being saved in prolog exception handling unwind tables gone rev 3479.Shrinks CloverGUI by another 20K or so. eh_frame is suppressed in GCC build too (-fno-asynchronous-unwind-tables) Link to comment Share on other sites More sharing options...
tluck Posted April 26, 2016 Share Posted April 26, 2016 been trying to follow the thread lately on Xcode seems the goal is to compile clover using just the Xcode tools? that is without gcc and/or without extra items? anyway, so today i tried it out... so 2 questions 1) when i run ./ebuild.sh - it stops looking for mtoc.NEW? Note: i don't have mtoc (or mtoc.new) anywhere on my system - and gcc53 and gcc49 builds just. 2) what does TOOLCHAIN or TOOLCHAIN_DIR need to be set to? thinking something like /Applications/Xcode.app/Contents/Developer/usr? otherwise it seems to need the gcc53 toolchain in edk2/Clover../../toolchain ? ..... [sLINK] GrubHFSPLUS[DLINK1] Fat/bin/sh: /usr/local/bin/mtoc.NEW: No such file or directorymake: *** [/Extra/Clover_Install/CloverGrowerPro/edk2/Build/Clover/RELEASE_XCODE5/X64/Clover/FatPkg/EnhancedFatDxe/Fat/DEBUG/Fat.efi] Error 127 build.py...: error 7000: Failed to execute commandmake tbuild [/Extra/Clover_Install/CloverGrowerPro/edk2/Build/Clover/RELEASE_XCODE5/X64/Clover/FatPkg/EnhancedFatDxe/Fat] build.py... Link to comment Share on other sites More sharing options...
Zenith432 Posted April 26, 2016 Share Posted April 26, 2016 tluck, You can still build with gcc by using ./ebuild.sh -gcc49 or ./ebuild.sh -gcc53 mtoc is needed for -xcode5 build which the default now. A binary was posted to this thread several times. Look on page 27 onward. It is a bit tricky to build, but there are instructions on page 27 how to if you like. The binary needs to be placed in /usr/local/bin/mtoc.NEW. We should find some solution for mtoc tool like other toolchain build scripts, but unfortunately mtoc is tricky to build. You don't need to worry about setting toolchain. -xcode5 uses Xcode that you have installed (which is set via xcode-select tool). nasm still needs to be in your $TOOLCHAIN_DIR/bin same place as before. mtoc needs to be as above. Those are all tools needed. Link to comment Share on other sites More sharing options...
luxinhaus Posted April 26, 2016 Share Posted April 26, 2016 i see 3 floating mtoc starting from page 27. Which one you recommend? Link to comment Share on other sites More sharing options...
dgsga Posted April 26, 2016 Share Posted April 26, 2016 @Zenith, Great job!! BOOTX64 now down to 617KB. I am trying to dispense with gcc toolchain altogether but make -C "$WORKSPACE"/BaseTools CC="gcc -Wno-deprecated-declarations" line 460 in ebuild.sh fails on native toolchain with this error: FvLib.c:197:128: error: shifting a negative signed value is undefined [-Werror,-Wshift-negative-value] ...mFvHeader + GetFfsFileLength(CurrentFile) + 0x07) & (-1 << 3)) + (UINT8 ... ~~ ^ FvLib.c:482:171: error: shifting a negative signed value is undefined [-Werror,-Wshift-negative-value] ...GetSectionFileLength(CurrentSection.CommonHeader) + 0x03) & (-1 << 2)); Now I know that we need to replace the values described with the shifting operation with the signed representation of the result but I don't really know how to do this. Any ideas? The reason I'm keen to do this is that I want to dispense altogether with additional non-native toolchains and save a great wad of disk space in the process. I also like the idea of clover compilation being 100% OSX native. Sad, I know Link to comment Share on other sites More sharing options...
Zenith432 Posted April 26, 2016 Share Posted April 26, 2016 dgsga: patch the makefile for BaseTools like this diff a/BaseTools/Source/C/Makefiles/header.makefile b/BaseTools/Source/C/Makefiles/header.makefile --- a/BaseTools/Source/C/Makefiles/header.makefile +++ b/BaseTools/Source/C/Makefiles/header.makefile @@ -47,7 +47,7 @@ INCLUDE = $(TOOL_INCLUDE) -I $(MAKEROOT) -I $(MAKEROOT)/Include/Common -I $(MAKE CPPFLAGS = $(INCLUDE) ifeq ($(DARWIN),Darwin) # assume clang or clang compatible flags on OS X -CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-self-assign -nostdlib -c -g +CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-self-assign -nostdlib -c -g -Wno-shift-negative-value else CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -nostdlib -c -g endif luxinhaus: Micky1979's Link to comment Share on other sites More sharing options...
mhaeuser Posted April 26, 2016 Share Posted April 26, 2016 I would rather not shift negatives than just shut the compiler up. (-1 << 3) can easily be replaced with (~0x7) which looks much better anyhow. Don't have a proper setup now, so s/o care to submit stuff to edk2-devel? Otherwise I will next month or so. Edit: Maybe (~(UINTN)0x07) should be used if for some reason the compiler choses a funny size for 0x07. Link to comment Share on other sites More sharing options...
zxv Posted April 26, 2016 Share Posted April 26, 2016 i see 3 floating mtoc starting from page 27. Which one you recommend? One can compile mtoc.NEW from: https://github.com/opensource-apple/cctools/tree/master/efitools This pretty much guides you through it: https://github.com/tianocore/tianocore.github.io/wiki/Xcode 1 Link to comment Share on other sites More sharing options...
Micky1979 Posted April 26, 2016 Share Posted April 26, 2016 Bad idea... our one(s) are updated with latest llvm/lto code. Link to comment Share on other sites More sharing options...
zxv Posted April 26, 2016 Share Posted April 26, 2016 Bad idea... our one(s) are updated with latest llvm/lto code. Shrug. Been working perfectly fine for me. Had to compile it myself, else clang complains of it not being present. Link to comment Share on other sites More sharing options...
Micky1979 Posted April 26, 2016 Share Posted April 26, 2016 Well then is good, but checked the files size also? I hope llvm devs are doing only better with the passage of time.. EDIT BTW the second link you posted expressly says to update llvm to build mtoc. Link to comment Share on other sites More sharing options...
dgsga Posted April 26, 2016 Share Posted April 26, 2016 I would rather not shift negatives than just shut the compiler up. (-1 << 3) can easily be replaced with (~0x7) which looks much better anyhow. Don't have a proper setup now, so s/o care to submit stuff to edk2-devel? Otherwise I will next month or so. Edit: Maybe (~(UINTN)0x07) should be used if for some reason the compiler choses a funny size for 0x07. @DFAm I right in thinking that (-1<<2) be replaced with (~(UINTN)0x03)? If you could run through the logic it would be great Link to comment Share on other sites More sharing options...
mhaeuser Posted April 26, 2016 Share Posted April 26, 2016 @DF Am I right in thinking that (-1<<2) be replaced with (~(UINTN)0x03)? If you could run through the logic it would be great Yeah, you are right. I didn't mean that you need to do it though, you may just as well use Zenith's patch now, I was just talking for the future. Link to comment Share on other sites More sharing options...
zxv Posted April 26, 2016 Share Posted April 26, 2016 Well then is good, but checked the files size also? I hope llvm devs are doing only better with the passage of time.. EDIT BTW the second link you posted expressly says to update llvm to build mtoc. LLVM was already the latest version. Link to comment Share on other sites More sharing options...
Micky1979 Posted April 27, 2016 Share Posted April 27, 2016 aaah ok. Mine was not, so I decide to update it directly from trunk. Maybe you lost that this was already discussed before your post #642? Link to comment Share on other sites More sharing options...
Recommended Posts