summaryrefslogtreecommitdiff
path: root/DuetPkg
diff options
context:
space:
mode:
authorklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>2010-06-10 08:54:18 +0000
committerklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>2010-06-10 08:54:18 +0000
commit63c89e04688ad08694b3f067ec57a55c6bbf1b8b (patch)
tree7b2c9c932e3018cfd8b2074486c760d45909faf2 /DuetPkg
parent8850ca7536c17e3e91ec2336ed07e16795faca46 (diff)
downloadedk2-platforms-63c89e04688ad08694b3f067ec57a55c6bbf1b8b.tar.xz
remove --image-base option EfiLdr.inf, and use GenFw to do image base relocation
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10571 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'DuetPkg')
-rw-r--r--DuetPkg/EfiLdr/EfiLdr.inf1
-rwxr-xr-xDuetPkg/PostBuild.sh24
2 files changed, 19 insertions, 6 deletions
diff --git a/DuetPkg/EfiLdr/EfiLdr.inf b/DuetPkg/EfiLdr/EfiLdr.inf
index c12f3ae41d..829320528a 100644
--- a/DuetPkg/EfiLdr/EfiLdr.inf
+++ b/DuetPkg/EfiLdr/EfiLdr.inf
@@ -57,4 +57,3 @@
MSFT:*_*_IA32_ASM_FLAGS == /nologo /W3 /WX /c /coff /Cx /Zd /W0 /Zi
MSFT:*_*_IA32_ASMLINK_FLAGS == /link /nologo /tiny
MSFT:*_*_*_DLINK_FLAGS = /BASE:0x10000
- GCC:*_*_*_DLINK_FLAGS = --image-base 0x10000
diff --git a/DuetPkg/PostBuild.sh b/DuetPkg/PostBuild.sh
index 971af7bfa3..9d936e661f 100755
--- a/DuetPkg/PostBuild.sh
+++ b/DuetPkg/PostBuild.sh
@@ -30,7 +30,7 @@ if [ \
]
then
echo Error! Please specific the architecture.
- echo Usage: "./PostBuild.sh [IA32|X64]"
+ echo Usage: "./PostBuild.sh [IA32|X64] [UNIXGCC|GCC44]"
fi
case "$1" in
@@ -45,7 +45,19 @@ case "$1" in
return 1
esac
-export BUILD_DIR=$WORKSPACE/Build/DuetPkg$PROCESSOR/DEBUG_UNIXGCC
+case "$2" in
+ UNIXGCC)
+ export TOOLTAG=UNIXGCC
+ ;;
+ GCC44)
+ export TOOLTAG=GCC44
+ ;;
+ *)
+ echo Invalid tool tag, should be only UNIXGCC or GCC44
+ return 1
+esac
+
+export BUILD_DIR=$WORKSPACE/Build/DuetPkg$PROCESSOR/DEBUG_$TOOLTAG
#
@@ -65,21 +77,23 @@ echo Generate Loader Image ...
if [ $PROCESSOR = IA32 ]
then
+ $BASETOOLS_DIR/GenFw --rebase 0x10000 -o $BUILD_DIR/$PROCESSOR/EfiLoader.efi $BUILD_DIR/$PROCESSOR/EfiLoader.efi
$BASETOOLS_DIR/EfiLdrImage -o $BUILD_DIR/FV/Efildr32 $BUILD_DIR/$PROCESSOR/EfiLoader.efi $BUILD_DIR/FV/DxeIpl.z $BUILD_DIR/FV/DxeMain.z $BUILD_DIR/FV/DUETEFIMAINFV.z
- cat $BOOTSECTOR_BIN_DIR/start.com $BOOTSECTOR_BIN_DIR/efi32.com2 $BUILD_DIR/FV/Efildr32 > $BUILD_DIR/FV/Efildr
+ cat $BOOTSECTOR_BIN_DIR/Start.com $BOOTSECTOR_BIN_DIR/efi32.com2 $BUILD_DIR/FV/Efildr32 > $BUILD_DIR/FV/Efildr
#
# It is safe to use "bcat" to cat following binary file, if bcat command is avaiable for your system
#
#bcat -o $BUILD_DIR/FV/Efildr.bcat $BOOTSECTOR_BIN_DIR/start.com $BOOTSECTOR_BIN_DIR/efi32.com2 $BUILD_DIR/FV/Efildr32
- cat $BOOTSECTOR_BIN_DIR/start16.com $BOOTSECTOR_BIN_DIR/efi32.com2 $BUILD_DIR/FV/Efildr32 > $BUILD_DIR/FV/Efildr16
+ cat $BOOTSECTOR_BIN_DIR/Start16.com $BOOTSECTOR_BIN_DIR/efi32.com2 $BUILD_DIR/FV/Efildr32 > $BUILD_DIR/FV/Efildr16
#bcat -o $BUILD_DIR/FV/Efildr16.bcat $BOOTSECTOR_BIN_DIR/start16.com $BOOTSECTOR_BIN_DIR/efi32.com2 $BUILD_DIR/FV/Efildr32
- cat $BOOTSECTOR_BIN_DIR/start32.com $BOOTSECTOR_BIN_DIR/efi32.com2 $BUILD_DIR/FV/Efildr32 > $BUILD_DIR/FV/Efildr20
+ cat $BOOTSECTOR_BIN_DIR/Start32.com $BOOTSECTOR_BIN_DIR/efi32.com2 $BUILD_DIR/FV/Efildr32 > $BUILD_DIR/FV/Efildr20
#bcat -o $BUILD_DIR/FV/Efildr20.bcat $BOOTSECTOR_BIN_DIR/start32.com $BOOTSECTOR_BIN_DIR/efi32.com2 $BUILD_DIR/FV/Efildr32
echo Done!
fi
if [ $PROCESSOR = X64 ]
then
+ $BASETOOLS_DIR/GenFw --rebase 0x10000 -o $BUILD_DIR/$PROCESSOR/EfiLoader.efi $BUILD_DIR/$PROCESSOR/EfiLoader.efi
$BASETOOLS_DIR/EfiLdrImage -o $BUILD_DIR/FV/Efildr64 $BUILD_DIR/$PROCESSOR/EfiLoader.efi $BUILD_DIR/FV/DxeIpl.z $BUILD_DIR/FV/DxeMain.z $BUILD_DIR/FV/DUETEFIMAINFV.z
cat $BOOTSECTOR_BIN_DIR/Start64.com $BOOTSECTOR_BIN_DIR/efi64.com2 $BUILD_DIR/FV/Efildr64 > $BUILD_DIR/FV/EfildrPure
#bcat -o $BUILD_DIR/FV/EfildrPure $BOOTSECTOR_BIN_DIR/start64.com $BOOTSECTOR_BIN_DIR/efi64.com2 $BUILD_DIR/FV/Efildr64