diff options
author | andrewfish <andrewfish@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-06-18 22:23:46 +0000 |
---|---|---|
committer | andrewfish <andrewfish@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-06-18 22:23:46 +0000 |
commit | e7523e0619981d5e49c370cfe7a18d442d32a465 (patch) | |
tree | 6e59589cc17f8390b2cc35e442778edf4570e530 | |
parent | 417a8020ab59456ecbe4554532976e948dd93f5c (diff) | |
download | edk2-e7523e0619981d5e49c370cfe7a18d442d32a465.zip edk2-e7523e0619981d5e49c370cfe7a18d442d32a465.tar.gz edk2-e7523e0619981d5e49c370cfe7a18d442d32a465.tar.bz2 |
InOsEmuPkg: Make build dir different for IA-32. Fix PCD XIP issues.
Signed-off-by andrewfish
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11851 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r-- | InOsEmuPkg/InOsEmuPkg.dec | 2 | ||||
-rw-r--r-- | InOsEmuPkg/Unix/Sec/SecMain.c | 24 | ||||
-rw-r--r-- | InOsEmuPkg/Unix/UnixX64.dsc | 5 | ||||
-rw-r--r-- | InOsEmuPkg/Unix/Xcode/xcode_project32/xcode_project.xcodeproj/default.pbxuser | 4 | ||||
-rwxr-xr-x | InOsEmuPkg/Unix/build.sh | 11 |
5 files changed, 25 insertions, 21 deletions
diff --git a/InOsEmuPkg/InOsEmuPkg.dec b/InOsEmuPkg/InOsEmuPkg.dec index f0b346e..f18ee28 100644 --- a/InOsEmuPkg/InOsEmuPkg.dec +++ b/InOsEmuPkg/InOsEmuPkg.dec @@ -65,7 +65,7 @@ gInOsEmuPkgTokenSpaceGuid.PcdEmuApCount|L"0"|VOID*|0x00001019
## Magic page to implement PEI Services Table Pointer Lib
- gInOsEmuPkgTokenSpaceGuid.PcdPeiServicesTablePage|0x1000000000|UINT64|0x0000101b
+ gInOsEmuPkgTokenSpaceGuid.PcdPeiServicesTablePage|0x1003000000|UINT64|0x0000101b
## Size of the packet filter
gInOsEmuPkgTokenSpaceGuid.PcdNetworkPacketFilterSize|524288|UINT32|0x0000101c
diff --git a/InOsEmuPkg/Unix/Sec/SecMain.c b/InOsEmuPkg/Unix/Sec/SecMain.c index 807f067..bf59489 100644 --- a/InOsEmuPkg/Unix/Sec/SecMain.c +++ b/InOsEmuPkg/Unix/Sec/SecMain.c @@ -670,19 +670,19 @@ SecPeCoffGetEntryPoint ( } if (ImageContext.ImageAddress != (UINTN)Pe32Data) { - // - // Relocate image to match the address where it resides - // - ImageContext.ImageAddress = (UINTN)Pe32Data; - Status = PeCoffLoaderLoadImage (&ImageContext); - if (EFI_ERROR (Status)) { - return Status; - } + // + // Relocate image to match the address where it resides + // + ImageContext.ImageAddress = (UINTN)Pe32Data; + Status = PeCoffLoaderLoadImage (&ImageContext); + if (EFI_ERROR (Status)) { + return Status; + } - Status = PeCoffLoaderRelocateImage (&ImageContext); - if (EFI_ERROR (Status)) { - return Status; - } + Status = PeCoffLoaderRelocateImage (&ImageContext); + if (EFI_ERROR (Status)) { + return Status; + } } else { // // Or just return image entry point diff --git a/InOsEmuPkg/Unix/UnixX64.dsc b/InOsEmuPkg/Unix/UnixX64.dsc index 79c0ac6..42afc4d 100644 --- a/InOsEmuPkg/Unix/UnixX64.dsc +++ b/InOsEmuPkg/Unix/UnixX64.dsc @@ -27,7 +27,12 @@ PLATFORM_GUID = 05FD064D-1073-E844-936C-A0E16317107D
PLATFORM_VERSION = 0.3
DSC_ SPECIFICATION = 0x00010005
+!if $(BUILD_32)
+ OUTPUT_DIRECTORY = Build/EmuUnixIa32
+!else
OUTPUT_DIRECTORY = Build/EmuUnixX64
+!endif
+
SUPPORTED_ARCHITECTURES = X64|IA32
BUILD_TARGETS = DEBUG|RELEASE
SKUID_IDENTIFIER = DEFAULT
diff --git a/InOsEmuPkg/Unix/Xcode/xcode_project32/xcode_project.xcodeproj/default.pbxuser b/InOsEmuPkg/Unix/Xcode/xcode_project32/xcode_project.xcodeproj/default.pbxuser index ec9dc03..5c5163a 100644 --- a/InOsEmuPkg/Unix/Xcode/xcode_project32/xcode_project.xcodeproj/default.pbxuser +++ b/InOsEmuPkg/Unix/Xcode/xcode_project32/xcode_project.xcodeproj/default.pbxuser @@ -152,13 +152,13 @@ showTypeColumn = 0; sourceDirectories = ( ); - startupPath = ../../../../Build/EmuUnixX64/DEBUG_XCLANG/IA32; + startupPath = ../../../../Build/EmuUnixIa32/DEBUG_XCLANG/IA32; }; BA11A1020FB10BCE00D06FEC /* SecMain.dll */ = { isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; name = SecMain.dll; - path = ../../../../Build/EmuUnixX64/DEBUG_XCLANG/IA32/SecMain; + path = ../../../../Build/EmuUnixIa32/DEBUG_XCLANG/IA32/SecMain; sourceTree = SOURCE_ROOT; }; BA11A11A0FB10E0700D06FEC /* SecGdbScriptBreak */ = { diff --git a/InOsEmuPkg/Unix/build.sh b/InOsEmuPkg/Unix/build.sh index e7e7b33..4e2add8 100755 --- a/InOsEmuPkg/Unix/build.sh +++ b/InOsEmuPkg/Unix/build.sh @@ -57,7 +57,6 @@ 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" ;; @@ -65,7 +64,7 @@ case `uname` in esac -BUILD_ROOT_ARCH=$WORKSPACE/Build/EmuUnixX64/DEBUG_"$UNIXPKG_TOOLS"/IA32 +BUILD_ROOT_ARCH=$WORKSPACE/Build/EmuUnixIa32/DEBUG_"$UNIXPKG_TOOLS"/IA32 if [[ ! -f `which build` || ! -f `which GenFv` ]]; then @@ -92,7 +91,7 @@ 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 @@ -122,8 +121,8 @@ done # 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 +build -p $WORKSPACE/InOsEmuPkg/Unix/UnixX64.dsc -a IA32 -t $TARGET_TOOLS -D SEC_ONLY -D BUILD_32 -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 exit $? |