]> git.proxmox.com Git - mirror_edk2.git/commitdiff
InOsEmuPkg/Unix: Enable single-pass build with Linux
authorjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 20 Jun 2011 21:58:22 +0000 (21:58 +0000)
committerjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 20 Jun 2011 21:58:22 +0000 (21:58 +0000)
For Linux builds the thunk layer ('SEC') and main platform
firmware image will be built in a single build pass.

Signed-off-by: jljusten
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11867 6f19259b-4bc3-4df7-8a09-765794883524

InOsEmuPkg/Unix/Sec/SecMain.inf
InOsEmuPkg/Unix/UnixX64.dsc
InOsEmuPkg/Unix/build64.sh

index 4dc0a67008f4f745fd25442d0b2d3ef3779d6053..2405648697120afb9edc9a91f770345c95e6ebc5 100644 (file)
 \r
    GCC:*_*_X64_DLINK_FLAGS == -o $(BIN_DIR)/SecMain -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 /usr/lib/crt1.o /usr/lib/crti.o -L/usr/X11R6/lib -lXext -lX11 /usr/lib/crtn.o\r
    GCC:*_*_X64_CC_FLAGS == -m64 -g -fshort-wchar -fno-strict-aliasing -Wall -malign-double -idirafter/usr/include -c -include $(DEST_DIR_DEBUG)/AutoGen.h -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings\r
+   GCC:*_GCC44_X64_CC_FLAGS = "-DEFIAPI=__attribute__((ms_abi))"\r
+   GCC:*_GCC45_X64_CC_FLAGS = "-DEFIAPI=__attribute__((ms_abi))"\r
    GCC:*_*_X64_PP_FLAGS == -m64 -E -x assembler-with-cpp -include $(DEST_DIR_DEBUG)/AutoGen.h\r
    GCC:*_*_X64_ASM_FLAGS == -m64 -c -x assembler -imacros $(DEST_DIR_DEBUG)/AutoGen.h\r
 \r
index a514f4efe3a2b3b4fc0ae1448c12ab2a923fb510..995e0e53f09af7de370f82f428e24ef416702410 100644 (file)
   MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf \r
 \r
 [Components]\r
-!if $(SEC_ONLY)\r
+!ifdef $(UNIX_SEC_BUILD)\r
   ##\r
   #  Emulator, OS POSIX application\r
   ##\r
   InOsEmuPkg/Unix/Sec/SecMain.inf\r
-!else\r
+!endif\r
+\r
+!ifndef $(SKIP_MAIN_BUILD)\r
   #\r
   # Generic SEC\r
   #\r
   }\r
 !endif\r
 \r
-!endif  \r
+!endif\r
+\r
index 8742b3f7f4a0c1646f60ba34ba36959e6010e18e..fe22bdf4adaf744887a89639b8e7786f737ac014 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/bash
 #
 # Copyright (c) 2008 - 2011, Apple Inc. All rights reserved.<BR>
-# Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>
 #
 # This program and the accompanying materials
 # are licensed and made available under the terms and conditions of the BSD License
@@ -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=
@@ -61,10 +60,13 @@ case `uname` in
       BUILD_NEW_SHELL="-D BUILD_NEW_SHELL"
       BUILD_FAT="-D BUILD_FAT"
       ;;
-  Linux*) TARGET_TOOLS=ELFGCC ;;
-
 esac
 
+if [ -z "$TARGET_TOOLS" ]
+then
+  TARGET_TOOLS=$UNIXPKG_TOOLS
+fi
+
 BUILD_ROOT_ARCH=$WORKSPACE/Build/EmuUnixX64/DEBUG_"$UNIXPKG_TOOLS"/X64
 
 if  [[ ! -f `which build` || ! -f `which GenFv` ]];
@@ -120,10 +122,12 @@ done
 #
 # Build the edk2 UnixPkg
 #
-echo $PATH
-echo `which build`
-build -p $WORKSPACE/InOsEmuPkg/Unix/UnixX64.dsc      -a X64 -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 X64 -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"/X64/SecMain $WORKSPACE/Build/EmuUnixX64/DEBUG_"$UNIXPKG_TOOLS"/X64
+if [[ $TARGET_TOOLS == $UNIXPKG_TOOLS ]]; then
+  build -p $WORKSPACE/InOsEmuPkg/Unix/UnixX64.dsc      -a X64 -t $UNIXPKG_TOOLS -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 X64 -t $TARGET_TOOLS  -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 X64 -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"/X64/SecMain $WORKSPACE/Build/EmuUnixX64/DEBUG_"$UNIXPKG_TOOLS"/X64
+fi
 exit $?