#
# Pick a default tool type for a given OS
#
-TARGET_TOOLS=MYTOOLS
UNIXPKG_TOOLS=GCC44
NETWORK_SUPPORT=
BUILD_NEW_SHELL=
TARGET_TOOLS=XCODE32
UNIXPKG_TOOLS=XCLANG
fi
-# NETWORK_SUPPORT="-D NETWORK_SUPPORT"
BUILD_NEW_SHELL="-D BUILD_NEW_SHELL"
BUILD_FAT="-D BUILD_FAT"
;;
- Linux*) TARGET_TOOLS=ELFGCC ;;
-
esac
-BUILD_ROOT_ARCH=$WORKSPACE/Build/EmuUnixX64/DEBUG_"$UNIXPKG_TOOLS"/IA32
+if [ -d /lib32 ]
+then
+ export LIB_ARCH_SFX=32
+fi
+
+if [ -z "$TARGET_TOOLS" ]
+then
+ TARGET_TOOLS=$UNIXPKG_TOOLS
+fi
+
+BUILD_ROOT_ARCH=$WORKSPACE/Build/EmuUnixIa32/DEBUG_"$UNIXPKG_TOOLS"/IA32
if [[ ! -f `which build` || ! -f `which GenFv` ]];
then
# This .gdbinit script sets a breakpoint that loads symbols for the PE/COFFEE
# images that get loaded in SecMain
#
- cp $WORKSPACE/InOsEmuPkg/Unix/.gdbinit $WORKSPACE/Build/EmuUnixX64/DEBUG_"$UNIXPKG_TOOLS"/IA32
+ cp $WORKSPACE/InOsEmuPkg/Unix/.gdbinit $WORKSPACE/Build/EmuUnixIa32/DEBUG_"$UNIXPKG_TOOLS"/IA32
;;
esac
- /usr/bin/gdb $BUILD_ROOT_ARCH/SecMain -q -cd=$BUILD_ROOT_ARCH
+ /usr/bin/gdb $BUILD_ROOT_ARCH/SecMain -q -cd=$BUILD_ROOT_ARCH -x $WORKSPACE/InOsEmuPkg/Unix/GdbRun
exit
fi
#
# Build the edk2 UnixPkg
#
-echo $PATH
-echo `which build`
-build -p $WORKSPACE/InOsEmuPkg/Unix/UnixX64.dsc -a IA32 -t $TARGET_TOOLS -D SEC_ONLY -n 3 $1 $2 $3 $4 $5 $6 $7 $8 modules
-build -p $WORKSPACE/InOsEmuPkg/Unix/UnixX64.dsc -a IA32 -t $UNIXPKG_TOOLS $NETWORK_SUPPORT $BUILD_NEW_SHELL $BUILD_FAT -n 3 $1 $2 $3 $4 $5 $6 $7 $8
-cp $WORKSPACE/Build/EmuUnixX64/DEBUG_"$TARGET_TOOLS"/IA32/SecMain $WORKSPACE/Build/EmuUnixX64/DEBUG_"$UNIXPKG_TOOLS"/IA32
+if [[ $TARGET_TOOLS == $UNIXPKG_TOOLS ]]; then
+ build -p $WORKSPACE/InOsEmuPkg/Unix/UnixX64.dsc -a IA32 -t $UNIXPKG_TOOLS -D BUILD_32 -D UNIX_SEC_BUILD $NETWORK_SUPPORT $BUILD_NEW_SHELL $BUILD_FAT -n 3 $1 $2 $3 $4 $5 $6 $7 $8
+else
+ build -p $WORKSPACE/InOsEmuPkg/Unix/UnixX64.dsc -a IA32 -t $TARGET_TOOLS -D BUILD_32 -D UNIX_SEC_BUILD -D SKIP_MAIN_BUILD -n 3 $1 $2 $3 $4 $5 $6 $7 $8 modules
+ build -p $WORKSPACE/InOsEmuPkg/Unix/UnixX64.dsc -a IA32 -t $UNIXPKG_TOOLS -D BUILD_32 $NETWORK_SUPPORT $BUILD_NEW_SHELL $BUILD_FAT -n 3 $1 $2 $3 $4 $5 $6 $7 $8
+ cp $WORKSPACE/Build/EmuUnixIa32/DEBUG_"$TARGET_TOOLS"/IA32/SecMain $WORKSPACE/Build/EmuUnixIa32/DEBUG_"$UNIXPKG_TOOLS"/IA32
+fi
exit $?