diff options
author | klu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-03-02 12:12:46 +0000 |
---|---|---|
committer | klu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-03-02 12:12:46 +0000 |
commit | 71bd6db17842075c6089d954fc5c8b7fd21d534f (patch) | |
tree | cf1df115817f5a94b13963bf4a4cf6aefef692b9 /DuetPkg/PostBuild.sh | |
parent | 3ef254bb509b9c8151fde88a77d39ee6fefdf407 (diff) | |
download | edk2-71bd6db17842075c6089d954fc5c8b7fd21d534f.tar.gz edk2-71bd6db17842075c6089d954fc5c8b7fd21d534f.tar.bz2 edk2-71bd6db17842075c6089d954fc5c8b7fd21d534f.zip |
Update PostBuild.sh
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7770 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'DuetPkg/PostBuild.sh')
-rw-r--r-- | DuetPkg/PostBuild.sh | 55 |
1 files changed, 30 insertions, 25 deletions
diff --git a/DuetPkg/PostBuild.sh b/DuetPkg/PostBuild.sh index e6e8793961..4c5757f5a7 100644 --- a/DuetPkg/PostBuild.sh +++ b/DuetPkg/PostBuild.sh @@ -1,7 +1,9 @@ -#
-# Currently, Build system does not provide post build mechanism for module
-# and platform building, so just use a sh file to do post build commands.
-# Originally, following post building command is for EfiLoader module.
+#!/bin/sh + +# +# Currently, Build system does not provide post build mechanism for module +# and platform building, so just use a sh file to do post build commands. +# Originally, following post building command is for EfiLoader module. # export BUILD_DIR=$WORKSPACE/Build/DuetPkg/DEBUG_UNIXGCC export BASETOOLS_DIR=$WORKSPACE/Conf/BaseToolsSource/Source/C/bin @@ -14,20 +16,26 @@ if [ \ ] then echo Error! Please specific the architecture. - echo Usage: ". PostBuild.sh [IA32|X64]" -fi - -if [ "$1" = IA32 ] -then - export PROCESSOR=IA32 + echo Usage: "./PostBuild.sh [IA32|X64]" + exit 1 fi -if [ "$1" = X64 ] -then - export PROCESSOR=X64 -fi +case "$1" in + IA32) + export PROCESSOR=IA32 + ;; + X64) + export PROCESSOR=X64 + ;; + *) + echo Invalid Architecture string, should be only IA32 or X64 + exit 1 +esac -export OUTPUT_DIR=$BUILD_DIR/$PROCESSOR/DuetPkg/BootSector/BootSector/OUTPUT +# +# Boot sector module could only be built under IA32 tool chain +# +export OUTPUT_DIR=$BUILD_DIR/IA32/DuetPkg/BootSector/BootSector/OUTPUT echo Compressing DUETEFIMainFv.FV ... $BASETOOLS_DIR/TianoCompress -e -o $BUILD_DIR/FV/DUETEFIMAINFV.z $BUILD_DIR/FV/DUETEFIMAINFV.Fv @@ -43,13 +51,9 @@ echo Generate Loader Image ... if [ $PROCESSOR = IA32 ] then $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 - mkdir -p $BUILD_DIR/FV/Efildr - mkdir -p $BUILD_DIR/FV/Efildr16 - mkdir -p $BUILD_DIR/FV/Efildr20 - - cp $OUTPUT_DIR/start.com $OUTPUT_DIR/efi32.com2 $BUILD_DIR/FV/Efildr32 $BUILD_DIR/FV/Efildr - cp $OUTPUT_DIR/start16.com $OUTPUT_DIR/efi32.com2 $BUILD_DIR/FV/Efildr32 $BUILD_DIR/FV/Efildr16 - cp $OUTPUT_DIR/start32.com $OUTPUT_DIR/efi32.com2 $BUILD_DIR/FV/Efildr32 $BUILD_DIR/FV/Efildr20 + cat $OUTPUT_DIR/start.com $OUTPUT_DIR/efi32.com2 $BUILD_DIR/FV/Efildr32 > $BUILD_DIR/FV/Efildr + cat $OUTPUT_DIR/start16.com $OUTPUT_DIR/efi32.com2 $BUILD_DIR/FV/Efildr32 > $BUILD_DIR/FV/Efildr16 + cat $OUTPUT_DIR/start32.com $OUTPUT_DIR/efi32.com2 $BUILD_DIR/FV/Efildr32 > $BUILD_DIR/FV/Efildr20 echo Done! fi @@ -60,13 +64,14 @@ then mkdir -p $BUILD_DIR/FV/Efildr16Pure mkdir -p $BUILD_DIR/FV/Efildr20Pure - cp $OUTPUT_DIR/start64.com $OUTPUT_DIR/efi64.com2 $BUILD_DIR/FV/Efildr64 $BUILD_DIR/FV/EfildrPure + cat $OUTPUT_DIR/start64.com $OUTPUT_DIR/efi64.com2 $BUILD_DIR/FV/Efildr64 > $BUILD_DIR/FV/EfildrPure $BASETOOLS_DIR/GenPage $BUILD_DIR/FV/EfildrPure -o $BUILD_DIR/FV/Efildr - cp $OUTPUT_DIR/st16_64.com $OUTPUT_DIR/efi64.com2 $BUILD_DIR/FV/Efildr64 $BUILD_DIR/FV/Efildr16Pure + cat $OUTPUT_DIR/st16_64.com $OUTPUT_DIR/efi64.com2 $BUILD_DIR/FV/Efildr64 > $BUILD_DIR/FV/Efildr16Pure $BASETOOLS_DIR/GenPage $BUILD_DIR/FV/Efildr16Pure -o $BUILD_DIR/FV/Efildr16 - cp $OUTPUT_DIR/st32_64.com $OUTPUT_DIR/efi64.com2 $BUILD_DIR/FV/Efildr64 $BUILD_DIR/FV/Efildr20Pure + cat $OUTPUT_DIR/st32_64.com $OUTPUT_DIR/efi64.com2 $BUILD_DIR/FV/Efildr64 > $BUILD_DIR/FV/Efildr20Pure $BASETOOLS_DIR/GenPage $BUILD_DIR/FV/Efildr20Pure -o $BUILD_DIR/FV/Efildr20 echo Done! fi +exit 0
\ No newline at end of file |