]> git.proxmox.com Git - mirror_edk2.git/blobdiff - DuetPkg/PostBuild.sh
Reviewed the description in the FatBinPkg .dec file.
[mirror_edk2.git] / DuetPkg / PostBuild.sh
index a839ec5fce08b53b67a96c73a275bba6d1da0cf4..024e32c79142eba9de11ae16f112d729602d3987 100644 (file)
@@ -5,6 +5,7 @@
 #  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
 export PROCESSOR=""
@@ -28,6 +29,7 @@ case "$1" in
      ;;
    *)
      echo Invalid Architecture string, should be only IA32 or X64
+     return 1
 esac
 
 #
@@ -36,13 +38,13 @@ esac
 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
+$BASETOOLS_DIR/LzmaCompress -e -o $BUILD_DIR/FV/DUETEFIMAINFV.z $BUILD_DIR/FV/DUETEFIMAINFV.Fv
 
 echo Compressing DxeMain.efi ...
-$BASETOOLS_DIR/TianoCompress -e -o $BUILD_DIR/FV/DxeMain.z $BUILD_DIR/$PROCESSOR/DxeCore.efi
+$BASETOOLS_DIR/LzmaCompress -e -o $BUILD_DIR/FV/DxeMain.z $BUILD_DIR/$PROCESSOR/DxeCore.efi
 
 echo Compressing DxeIpl.efi ...
-$BASETOOLS_DIR/TianoCompress -e -o $BUILD_DIR/FV/DxeIpl.z $BUILD_DIR/$PROCESSOR/DxeIpl.efi     
+$BASETOOLS_DIR/LzmaCompress -e -o $BUILD_DIR/FV/DxeIpl.z $BUILD_DIR/$PROCESSOR/DxeIpl.efi      
 
 echo Generate Loader Image ...
 
@@ -50,25 +52,31 @@ 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
        cat $OUTPUT_DIR/start.com $OUTPUT_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 $OUTPUT_DIR/start.com $OUTPUT_DIR/efi32.com2 $BUILD_DIR/FV/Efildr32
        cat $OUTPUT_DIR/start16.com $OUTPUT_DIR/efi32.com2 $BUILD_DIR/FV/Efildr32 > $BUILD_DIR/FV/Efildr16
+       #bcat -o $BUILD_DIR/FV/Efildr16.bcat $OUTPUT_DIR/start16.com $OUTPUT_DIR/efi32.com2 $BUILD_DIR/FV/Efildr32
        cat $OUTPUT_DIR/start32.com $OUTPUT_DIR/efi32.com2 $BUILD_DIR/FV/Efildr32 > $BUILD_DIR/FV/Efildr20      
+       #bcat -o $BUILD_DIR/FV/Efildr20.bcat $OUTPUT_DIR/start32.com $OUTPUT_DIR/efi32.com2 $BUILD_DIR/FV/Efildr32
        echo Done!
 fi
 
 if [ $PROCESSOR = X64 ]
 then
        $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
-       mkdir -p $BUILD_DIR/FV/EfildrPure
-       mkdir -p $BUILD_DIR/FV/Efildr16Pure
-       mkdir -p $BUILD_DIR/FV/Efildr20Pure
-
        cat $OUTPUT_DIR/start64.com $OUTPUT_DIR/efi64.com2 $BUILD_DIR/FV/Efildr64 > $BUILD_DIR/FV/EfildrPure
+       #bcat -o $BUILD_DIR/FV/EfildrPure $OUTPUT_DIR/start64.com $OUTPUT_DIR/efi64.com2 $BUILD_DIR/FV/Efildr64 
        $BASETOOLS_DIR/GenPage $BUILD_DIR/FV/EfildrPure -o $BUILD_DIR/FV/Efildr
        cat $OUTPUT_DIR/st16_64.com $OUTPUT_DIR/efi64.com2 $BUILD_DIR/FV/Efildr64 > $BUILD_DIR/FV/Efildr16Pure
+       #bcat -o $BUILD_DIR/FV/Efildr16Pure $OUTPUT_DIR/st16_64.com $OUTPUT_DIR/efi64.com2 $BUILD_DIR/FV/Efildr64
        $BASETOOLS_DIR/GenPage $BUILD_DIR/FV/Efildr16Pure -o $BUILD_DIR/FV/Efildr16
        cat $OUTPUT_DIR/st32_64.com $OUTPUT_DIR/efi64.com2 $BUILD_DIR/FV/Efildr64 > $BUILD_DIR/FV/Efildr20Pure
+       #bcat -o $BUILD_DIR/FV/Efildr20Pure $OUTPUT_DIR/st32_64.com $OUTPUT_DIR/efi64.com2 $BUILD_DIR/FV/Efildr64
        $BASETOOLS_DIR/GenPage $BUILD_DIR/FV/Efildr20Pure -o $BUILD_DIR/FV/Efildr20
        
        echo Done!
 fi
 
+