]> git.proxmox.com Git - mirror_edk2.git/blobdiff - InOsEmuPkg/Unix/build.sh
Clarify the requirements for the Destination parameter of UnicodeStrToAsciiStr.
[mirror_edk2.git] / InOsEmuPkg / Unix / build.sh
index e7e7b33b4ce7afb28c7c7f7bd71b009999af35e3..1810a69ef723a79e609023d5f7c7fdaf097d9762 100755 (executable)
@@ -40,7 +40,6 @@ fi
 #
 # Pick a default tool type for a given OS
 #
-TARGET_TOOLS=MYTOOLS
 UNIXPKG_TOOLS=GCC44
 NETWORK_SUPPORT=
 BUILD_NEW_SHELL=
@@ -57,15 +56,22 @@ case `uname` in
         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
@@ -92,11 +98,11 @@ do
         # 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
 
@@ -120,10 +126,12 @@ done
 #
 # 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 $?