Jump to content

Micky1979

Micky1979

Member Since 03 Oct 2010
Offline Last Active Private
*****

Posts I've Made

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

Today, 11:13 AM

 

Anyway the boot file is created and compressing

- Done -
Build end time: 12:53:25, Aug.25 2016
Build total time: 00:02:17

Compressing DUETEFIMainFv.FV ...
Encoding
Compressing DxeCore.efi ...
Encoding
Compressing DxeIpl.efi ...
Encoding
Generate Loader Image ...

 

We can do like that also at the beginning of the function:

    if (( $NOBOOTFILES == 0 )); then
      echo Compressing DUETEFIMainFv.FV ...
      "$BASETOOLS_DIR"/LzmaCompress -e -o "${BUILD_DIR}/FV/DUETEFIMAINFV${TARGETARCH}.z" "${BUILD_DIR}/FV/DUETEFIMAINFV${TARGETARCH}.Fv"

      echo Compressing DxeCore.efi ...
      "$BASETOOLS_DIR"/LzmaCompress -e -o "${BUILD_DIR}/FV/DxeMain${TARGETARCH}.z" "$BUILD_DIR_ARCH/DxeCore.efi"

      echo Compressing DxeIpl.efi ...
      "$BASETOOLS_DIR"/LzmaCompress -e -o "${BUILD_DIR}/FV/DxeIpl${TARGETARCH}.z" "$BUILD_DIR_ARCH/DxeIpl.efi"

      echo "Generate Loader Image ..."
    fi

and to the end of the "MainPostBuildScript" when it calls:

DESTDIR="$CLOVER_PKG_DIR"/BootSectors make -C $BOOTHFS

make should find all as before and rebuild only changed stuff. Otherwise the MakeFile is buggie


Sergeys-iMac:Clover slice$ ./ebuild.sh -nb
TOOLCHAIN_DIR: /Users/slice/src/edk2/Clover/../../opt/local
found nasm v2.12.01 at /Users/slice/src/edk2/Clover/../../opt/local/bin
found nasm v2.12.02 at /opt/local/bin
found nasm v2.12.01 at /usr/gcc-4.8/bin
found nasm v2.12.02 at /opt/local/bin
found nasm v0.98.40 at /usr/bin
nasm is ok..
Sergeys-iMac:Clover slice$ 

and finish?!

 

Actually my statement check only array[0] and array[1] of 2.12.02 so it says that is ok, but in reality you have a bad nasm at:

found nasm v2.12.01 at /Users/slice/src/edk2/Clover/../../opt/local/bin

that is the first, and this will not be used only if tools-def decide otherwise. "/Users/slice/src/opt/local/bin" is the good place to avoid any problems since added to $PATH by ebuild.sh before any other path. Also calling buildnasm.sh users cannot claim an unwanted installation since "src/opt/local/bin" is part of Clover..... is the best place IMHO, just looks here  "et voilĂ " because already added at beginning of $PATH, no chances to fail and will be a easy rule for all. Also all the scripts in Clover source already seem to stay with that.

Sorry to say that, but now I'm sure you used nasm v2.12.01 until commit of r3718... before change the nasm path in tools-def.txt :blush:

 

EDIT I'm at the job and cannot do anything other than speak until 6:00 PM

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

Today, 08:43 AM

In buildnasn.sh since Clover already have this script. Need adjustment because was for my script and someting like copy operation is not needed. You can use that this way:

if ! needNASM; then
exit 0
fi

. . otherwise install nsam
philip, we need to ensure is the correct version....

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

Yesterday, 10:43 PM

Slice, take a look on this.

Usage:
(-nb = don't rebuild boot files)

./ebuild.sh -x64 -nb -t XCODE5
./ebuild.sh -ia32 -nb -t XCODE5

result:

build started at:
Thu Aug 25 00:43:00 CEST 2016
finished at
Thu Aug 25 00:43:27 CEST 2016

27 seconds for both architectures (12 for x64 + 11 for ia32. 4 seconds copying every new efi files to the Clover package directories ). Check if is what you need.

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

Yesterday, 04:48 PM

Hi Slice what is the result for you of:

echo $USER

on your build machine??

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

Yesterday, 03:02 PM

take a look on my latest beta script some posts ago... it looks for each nasm version already in $PATH and perform a check and decide if good or not. Maybe something can be reused..

 

EDIT:


restoreIFS() {

    IFS=$' \t\n';

}

needNASM() {

    restoreIFS

    local nasmPath=""

    local nasmArray=( $(which -a nasm) )

    local needInstall=1

    local good=""

 

    if [ ${#nasmArray[@]} -ge "1" ]; then

 

        for i in "${nasmArray[@]}"

        do

            echo "found nasm v$(${i} -v | grep 'NASM version' | awk '{print $3}') at $(dirname ${i})"

        done

 

        # we have a good nasm?

        for i in "${nasmArray[@]}"

        do

            if isNASMGood "${i}"; then

                good="${i}"

                break

            fi

        done

 

        if [[ -x "${good}" ]] ; then

             # only nasm at index 0 is used!

            if [[ "${good}" == "${nasmArray[0]}" ]]; then

                echo "nasm is ok.."

            else

                echo "this one is good:"

                echo "${good}"

                echo "..but will not be used.."

                cp -R "${good}" "${NASM_PREFIX}"/

                echo "${good} copied to ${NASM_PREFIX}/!"

            fi

        else

            # no nasm versions suitable for Clover

            echo "nasm found, but is not good to build Clover.."

            needInstall=0

        fi

    else

        needInstall=0

        echo "nasm not found.."

    fi

    return $needInstall

}

 

isNASMGood() {

    restoreIFS

 

    IFS='.';

    local array=($( "${1}" -v | grep 'NASM version' | awk '{print $3}') )

 

    case "${#array[@]}" in

    "2" | "3")

        if [ "${array[0]}" -ge "3" ]; then

            return 0;

        fi

        if [ "${array[0]}" -eq "2" ] && [ "${array[1]}" -ge "12" ]; then

            return 0;

        fi

    ;;

    *)

        echo "Unknown nasm version format.."

    ;;

    esac

 

    return 1

}

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