summaryrefslogtreecommitdiff
path: root/InOsEmuPkg
diff options
context:
space:
mode:
authorjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>2011-06-20 21:58:22 +0000
committerjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>2011-06-20 21:58:22 +0000
commit53a6813fd09065fdbbc1c6dc11a136e072cd2388 (patch)
tree0b6be12a5076c7b69a381437071c3421f4eb3d2e /InOsEmuPkg
parentb8800fc547440d8648e49c189a60547bfc4a1615 (diff)
downloadedk2-platforms-53a6813fd09065fdbbc1c6dc11a136e072cd2388.tar.xz
InOsEmuPkg/Unix: Enable single-pass build with Linux
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
Diffstat (limited to 'InOsEmuPkg')
-rw-r--r--InOsEmuPkg/Unix/Sec/SecMain.inf2
-rw-r--r--InOsEmuPkg/Unix/UnixX64.dsc9
-rwxr-xr-xInOsEmuPkg/Unix/build64.sh22
3 files changed, 21 insertions, 12 deletions
diff --git a/InOsEmuPkg/Unix/Sec/SecMain.inf b/InOsEmuPkg/Unix/Sec/SecMain.inf
index 4dc0a67008..2405648697 100644
--- a/InOsEmuPkg/Unix/Sec/SecMain.inf
+++ b/InOsEmuPkg/Unix/Sec/SecMain.inf
@@ -121,6 +121,8 @@
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
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
+ GCC:*_GCC44_X64_CC_FLAGS = "-DEFIAPI=__attribute__((ms_abi))"
+ GCC:*_GCC45_X64_CC_FLAGS = "-DEFIAPI=__attribute__((ms_abi))"
GCC:*_*_X64_PP_FLAGS == -m64 -E -x assembler-with-cpp -include $(DEST_DIR_DEBUG)/AutoGen.h
GCC:*_*_X64_ASM_FLAGS == -m64 -c -x assembler -imacros $(DEST_DIR_DEBUG)/AutoGen.h
diff --git a/InOsEmuPkg/Unix/UnixX64.dsc b/InOsEmuPkg/Unix/UnixX64.dsc
index a514f4efe3..995e0e53f0 100644
--- a/InOsEmuPkg/Unix/UnixX64.dsc
+++ b/InOsEmuPkg/Unix/UnixX64.dsc
@@ -285,12 +285,14 @@
MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
[Components]
-!if $(SEC_ONLY)
+!ifdef $(UNIX_SEC_BUILD)
##
# Emulator, OS POSIX application
##
InOsEmuPkg/Unix/Sec/SecMain.inf
-!else
+!endif
+
+!ifndef $(SKIP_MAIN_BUILD)
#
# Generic SEC
#
@@ -441,4 +443,5 @@
}
!endif
-!endif
+!endif
+
diff --git a/InOsEmuPkg/Unix/build64.sh b/InOsEmuPkg/Unix/build64.sh
index 8742b3f7f4..fe22bdf4ad 100755
--- a/InOsEmuPkg/Unix/build64.sh
+++ b/InOsEmuPkg/Unix/build64.sh
@@ -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 $?