Jump to content

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


Micky1979
2,126 posts in this topic

Recommended Posts

I always build "Release".

So I have to always explicitly write "-fr"?

 

 

Wouldn't it be better to add the opposite? For instance --skip-rebuild.

I think this depends on what you do most often, but is also safe with or without. I mean, if you add a new header or a new .c file I think makefiles have new dependency and it need to be autogen again, and if that happen automatically you are done. If all the day you were fast to make changes and test Clover (w/o -fr), when you are ready to build a new package on sourceforge if you add -fr at least users will not see "build --skip-autogen  -D DISABLE_USB_SUPPORT -D ...."

To the end I think that edk2 devels added this flag because make is not always perfect, It is a continuous program development :)

Link to comment
Share on other sites

I think this depends on what you do most often, but is also safe with or without. I mean, if you add a new header or a new .c file I think makefiles have new dependency and it need to be autogen again, and if that happen automatically you are done. If all the day you were fast to make changes and test Clover (w/o -fr), when you are ready to build a new package on sourceforge if you add -fr at least users will not see "build --skip-autogen  -D DISABLE_USB_SUPPORT -D ...."

To the end I think that edk2 devels added this flag because make is not always perfect, It is a continuous program development :)

I agree, indeed, the build process is faster the way it's now. 

 

However, issues appear when a new flag is used, for example -mc, the build process fails. In other words, it's either the -fr flag for every new flag or collective work to automatise this process in the clover ebuild script. 

 

That's just my opinion.

 

Best regards.

Link to comment
Share on other sites

However, issues appear when a new flag is used, for example -mc, the build process fails. In other words, it's either the -fr flag for every new flag or collective work to automatise this process in the clover ebuild script. 

Can be, and is normal. Old builted objects now should be updated importing new stuff when you "#define something", so fail is the correct behavior (cannot be otherwise). But if you use the same flags and only work on the source (e.g. editing one file or another) ther's no need of the -fr option. Also I guess you don't want repeatedly change flags if you are working on something.

BTW here -mc does not produce produce problems (sequence here is boot6->boot7->boot3)

And thanks to remind me that (added -fr options to Build_Clover.command when it use custom macros :D )

Link to comment
Share on other sites

Can be, and is normal. Old builted objects now should be updated importing new stuff when you "#define something", so fail is the correct behavior (cannot be otherwise). 

I know  :) My idea was to automatise the process, improve it, so to speak, for the ordinary users to avoid posts like "why the build fails?" and so on. I never said that the current process is wrong and the outcome should be different.

 

And thanks to remind me that (added -fr options to Build_Clover.command when it use custom macros :D )

You're most welcome. 

 

Best of luck.

 

  • Like 1
Link to comment
Share on other sites

Build_Clover.command_3.3_test

Features with boot7 you know.

The rest works well. 

/opt still need, Or no difference?

Arch3_3test.zip

PS

There is a caveat Xcode-7.1.1

/Users/droplets/src/opt/local/bin/ is writable!
Done
===============================================================================
gettext check:
                          <----------------------------------------------------
found gettext at /opt/local/bin
found gettext at /opt/local/bin
===============================================================================
boot6
                          <----------------------------------------------------
TOOLCHAIN_DIR: /Users/droplets/src/opt/local

but I do not have a directory /opt/local/bin

post-617057-0-59303400-1472313453_thumb.jpg

 

Link to comment
Share on other sites

Build_Clover.command_3.3: test

 

Sorry for my english

 

Some issues with Gettext: the script try to install it each time but there is also gettext0.19.8 in directory. Test with  forcebuild r3726 and r 3728.

The rest works

 

 

 

 

post-1110743-0-14776900-1472314663_thumb.png

  • Like 1
Link to comment
Share on other sites

Build_Clover.command_3.3_test

Features with boot7 you know.

The rest works well. 

/opt still need, Or no difference?

attachicon.gifArch3_3test.zip

PS

There is a caveat Xcode-7.1.1

/Users/droplets/src/opt/local/bin/ is writable!
Done
===============================================================================
gettext check:
                          <----------------------------------------------------
found gettext at /opt/local/bin
found gettext at /opt/local/bin
===============================================================================
boot6
                          <----------------------------------------------------
TOOLCHAIN_DIR: /Users/droplets/src/opt/local

but I do not have a directory /opt/local/bin

attachicon.gifopt.jpg

/opt/local/bin or ~/src/... no difference

 

What's the result of:

/opt/local/bin/gettex --version

?

 

Build_Clover.command_3.3: test

 

Sorry for my english

 

Some issues with Gettext: the script try to install it each time but there is also gettext0.19.8 in directory. Test with  forcebuild r3726 and r 3728.

The rest works

 

 

 

 

 

what's the result of:

ls -a ~/src/opt/local/bin

and 

ls -a ~/src/tools/download

?

 

 

PS There'is a new script in the download section (some seconds ago)

@MatGen84 you are right, fixed in v3.4:

 

 

  • Fixed a bug updating edk2.
  • Fixed a bug detecting gettext
  • Added error check updating Clover and edk2.
  • Added developers mode.
  • Added force rebuild when you use custom macros.
  • Colorized.
Link to comment
Share on other sites

 

/opt/local/bin or ~/src/... no difference

 

What's the result of:

/opt/local/bin/gettex --version

?

what's the result of:

ls -a ~/src/opt/local/bin

and 

ls -a ~/src/tools/download

?

 

 

PS There'is a new script in the download section (some seconds ago)

@MatGen84 you are right, fixed in v3.4:

 

 

  • Fixed a bug updating edk2.
  • Fixed a bug detecting gettext
  • Added error check updating Clover and edk2.
  • Added developers mode.
  • Added force rebuild when you use custom macros.
  • Colorized.

 

Sorry I was wrong -there this directory  just hidden.

I have not worked on this disc ... hooked up to the test.

Everything changes so fast, probably, these logs are no longer needed.
Link to comment
Share on other sites

Thanks philip_petev.

Now the script have a function to capture most common errors by svn command:

svnWithErrorCheck() {

    if [ -z "${1}" ]; then return; fi

    local cmd="${1}"
    echo "" > "${SVN_STDERR_LOG}"
    eval "${cmd}" 2> "${SVN_STDERR_LOG}"

    local errors=(  'svn: E'
                    'Unable to connect'
                    'Unknown hostname'
                    'timeout'
                    'time out' )

    local ErrCount=0

    for err in "${errors[@]}"
    do
        if grep -q "${err}" "${SVN_STDERR_LOG}"; then
            ((ErrCount+=1))
            break
        fi
    done

    if [ "${ErrCount}" -ge "1" ];then
        echo
        echo "an error was encountered syncing the repository:"
        echo "------------------------------"
        echo "$( cat ${SVN_STDERR_LOG} )"
        echo
        echo "------------------------------"
        echo "Can be temporarily, retry later or seek for help."
        exit 1
    fi
}

commons errors to "grep" are stored in $errors array. If someone experience different error downloading updates please let me know!

And good Clover for everyone, now your compilation should conform to Slice's builds with same conditions :)

  • Like 2
Link to comment
Share on other sites

Build_Clover_3.4.

Hi,Micky1979!

Build_clover works well, but there are some features.

If you have a nasm in the directory /opt/local/ bin - then the compilation fails.

iMac-Droplets:~ droplets$ /opt/local/bin/nasm -v 
NASM version 2.12.02 compiled on Aug 23 2016

 

 

nasm check:
                          <----------------------------------------------------
NASM version 2.12.02 compiled on Aug 23 2016
===============================================================================
gettext check:
                          <----------------------------------------------------
gettext not found..

Status: gettext-latest.tar.gz not found.
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 18.7M  100 18.7M    0     0   932k      0  0:00:20  0:00:20 --:--:-- 1032k
- Creating new RAM disk

Initialized /dev/rdisk2 as a 300 MB case-insensitive HFS Plus volume
-  gettext-latest extract...
-  gettext-latest configure...
-  gettext-latest make...
-  gettext-latest installing...
-  gettext-latest installed in /Users/droplets/src/opt/local
.......
....... 
Generating BootSectors
[NASM] boot0af.s -> /Users/droplets/src/edk2/Clover/CloverPackage/CloverV2/BootSectors/boot0af
[NASM] boot0ss.s -> /Users/droplets/src/edk2/Clover/CloverPackage/CloverV2/BootSectors/boot0ss
[NASM] boot0md.s -> /Users/droplets/src/edk2/Clover/CloverPackage/CloverV2/BootSectors/boot0md
[NASM] boot1h.s -> /Users/droplets/src/edk2/Clover/CloverPackage/CloverV2/BootSectors/boot1h
[NASM] boot1h2.s -> /Users/droplets/src/edk2/Clover/CloverPackage/CloverV2/BootSectors/boot1h2
[NASM] boot1f32.s -> /Users/droplets/src/edk2/Clover/CloverPackage/CloverV2/BootSectors/boot1f32
[NASM] boot1f32alt.s -> /Users/droplets/src/edk2/Clover/CloverPackage/CloverV2/BootSectors/boot1f32alt
[NASM] boot1x.s -> /Users/droplets/src/edk2/Clover/CloverPackage/CloverV2/BootSectors/boot1x
boot1x.s:188: error: short jump is out of range
boot1x.s:193: error: short jump is out of range
boot1x.s:204: error: short jump is out of range
boot1x.s:233: error: short jump is out of range

 

 

If you delete nasm from the /opt / local/  bin -  the compilation succeeds.

 

 

  -> bdmesg.efi
Done!

Generating BootSectors
[NASM] boot1x.s -> /Users/droplets/src/edk2/Clover/CloverPackage/CloverV2/BootSectors/boot1x
[NASM] boot1xalt.s -> /Users/droplets/src/edk2/Clover/CloverPackage/CloverV2/BootSectors/boot1xalt
Description.txt -> /Users/droplets/src/edk2/Clover/CloverPackage/CloverV2/BootSectors/Description.txt
Installation.txt -> /Users/droplets/src/edk2/Clover/CloverPackage/CloverV2/BootSectors/Installation.txt
Done!
rm -rf sym obj dst
========================

 

 

 

Best wishes!

 

  • Like 1
Link to comment
Share on other sites

Thanks droples, /opt/local/bin/nasm takes the precedence when found in both Buid_Clover.command and in ebuild.sh, Slice's will.

Can you post here that nasm? Something is telling me that macports build is bad..

Link to comment
Share on other sites

Continue ..

Xcode_7.1.1, Xcode_7.3.1

I write about first start Build_Clover_3.4 when in the /opt/local/..  is nasm,
Last login: Tue Aug 30 13:51:00 on ttys000
iMac:~ droplets$ nasm -v
NASM version 2.12.02 compiled on Jul  6 2016
iMac:~ droplets$ 

and the directory ~ src / opt / local is not yet established.

After running the script and downloading EDK2,Clover  I see
post-617057-0-23748400-1472543716_thumb.jpg
If I choose 3) update & build or Clover
or  5) build existing revision (no update, standard build)
(other menu items I have not tested this tab)
I get a error

3) update & build Clover
Generating BootSectors
[NASM] boot0af.s -> /Users/droplets/src/edk2/Clover/CloverPackage/CloverV2/BootSectors/boot0af
[NASM] boot0ss.s -> /Users/droplets/src/edk2/Clover/CloverPackage/CloverV2/BootSectors/boot0ss
[NASM] boot0md.s -> /Users/droplets/src/edk2/Clover/CloverPackage/CloverV2/BootSectors/boot0md
[NASM] boot1h.s -> /Users/droplets/src/edk2/Clover/CloverPackage/CloverV2/BootSectors/boot1h
[NASM] boot1h2.s -> /Users/droplets/src/edk2/Clover/CloverPackage/CloverV2/BootSectors/boot1h2
[NASM] boot1f32.s -> /Users/droplets/src/edk2/Clover/CloverPackage/CloverV2/BootSectors/boot1f32
[NASM] boot1f32alt.s -> /Users/droplets/src/edk2/Clover/CloverPackage/CloverV2/BootSectors/boot1f32alt
[NASM] boot1x.s -> /Users/droplets/src/edk2/Clover/CloverPackage/CloverV2/BootSectors/boot1x
boot1x.s:188: error: short jump is out of range
boot1x.s:193: error: short jump is out of range
boot1x.s:204: error: short jump is out of range
boot1x.s:233: error: short jump is out of range
make: *** [/Users/droplets/src/edk2/Clover/CloverPackage/CloverV2/BootSectors/boot1x] Error 1

 

 

 
If I choose:
 
9) enter Developers mode-> 9) build all for Release
the compilation succeeds.
Copy Applications:
  -> bdmesg.efi
Done!

Generating BootSectors
[NASM] boot0af.s -> /Users/droplets/src/edk2/Clover/CloverPackage/CloverV2/BootSectors/boot0af
[NASM] boot0ss.s -> /Users/droplets/src/edk2/Clover/CloverPackage/CloverV2/BootSectors/boot0ss
[NASM] boot0md.s -> /Users/droplets/src/edk2/Clover/CloverPackage/CloverV2/BootSectors/boot0md
[NASM] boot1h.s -> /Users/droplets/src/edk2/Clover/CloverPackage/CloverV2/BootSectors/boot1h
[NASM] boot1h2.s -> /Users/droplets/src/edk2/Clover/CloverPackage/CloverV2/BootSectors/boot1h2
[NASM] boot1f32.s -> /Users/droplets/src/edk2/Clover/CloverPackage/CloverV2/BootSectors/boot1f32
[NASM] boot1f32alt.s -> /Users/droplets/src/edk2/Clover/CloverPackage/CloverV2/BootSectors/boot1f32alt
[NASM] boot1x.s -> /Users/droplets/src/edk2/Clover/CloverPackage/CloverV2/BootSectors/boot1x
[NASM] boot1xalt.s -> /Users/droplets/src/edk2/Clover/CloverPackage/CloverV2/BootSectors/boot1xalt
Description.txt -> /Users/droplets/src/edk2/Clover/CloverPackage/CloverV2/BootSectors/Description.txt
Installation.txt -> /Users/droplets/src/edk2/Clover/CloverPackage/CloverV2/BootSectors/Installation.txt
Done!


 

XCODE7_3_1.zip

Xcode_7.1.1.zip

nasm-2.12.02.zip

Link to comment
Share on other sites

Hi droples,

I'm at job so I can't check it but, using Xcode 7.1.1 LTO get disabled, instead with Xcode 7.3.1 LTO is enabled. Developers mode lto is enabled because no flag are given for that.

So is the LTO flag or nasm must be configured and installed and not dowloaded. Anyway I don't have this problem... compilation is successfully also using Xcode6.4 in Yosemite..

See you later..

Link to comment
Share on other sites

Thanks droples, /opt/local/bin/nasm takes the precedence when found in both Buid_Clover.command and in ebuild.sh, Slice's will.

Can you post here that nasm? Something is telling me that macports build is bad..

Not bad, just older.

BTW, I also have MacPorts installed on my laptop, but the nasm package is not installed (never needed it).

Link to comment
Share on other sites

Yes, I see that the latest is 2.12. 

Any idea on how to install nasm but not install the man page stuff? ... there are dependencies and more sources to be downloaded/compiled. ...mmmhm not sure if needed to just only compile Clover.

Link to comment
Share on other sites

×
×
  • Create New...