2 @REM Currently
, Build system does
not provide post build mechanism
for module
3 @REM and platform building
, so just
use a bat file to
do post build commands.
4 @REM Originally
, following post building
command is
for EfiLoader module.
7 @
set BUILD_DIR
=%WORKSPACE%\Build\DuetPkg\DEBUG_MYTOOLS
8 @
set BASETOOLS_DIR
=%WORKSPACE_TOOLS_PATH%\Bin\Win32
11 @
if "%1"=="" goto NoArch
12 @
if "%1"=="IA32" set PROCESSOR
=IA32
13 @
if "%1"=="X64" set PROCESSOR
=X64
14 @
if %PROCESSOR%=="" goto WrongArch
16 @
set OUTPUT_DIR
=%BUILD_DIR%\
%PROCESSOR%\DuetPkg\BootSector\BootSector\OUTPUT
17 @
set BOOTSECTOR_OUTPUT_DIR
=%BUILD_DIR%\IA32\DuetPkg\BootSector\BootSector\OUTPUT
19 @
echo Compressing DUETEFIMainFv.FV ...
20 @
%BASETOOLS_DIR%\TianoCompress
-e
-o
%BUILD_DIR%\FV\DUETEFIMAINFV.z
%BUILD_DIR%\FV\DUETEFIMAINFV.Fv
22 @
echo Compressing DxeMain.efi ...
23 @
%BASETOOLS_DIR%\TianoCompress
-e
-o
%BUILD_DIR%\FV\DxeMain.z
%BUILD_DIR%\
%PROCESSOR%\DxeCore.efi
25 @
echo Compressing DxeIpl.efi ...
26 @
%BASETOOLS_DIR%\TianoCompress
-e
-o
%BUILD_DIR%\FV\DxeIpl.z
%BUILD_DIR%\
%PROCESSOR%\DxeIpl.efi
28 @
echo Generate Loader Image ...
29 @
if "%PROCESSOR%"=="IA32" goto GENERATE_IMAGE_IA32
30 @
if "%PROCESSOR%"=="X64" goto GENERATE_IMAGE_X64
33 @
%BASETOOLS_DIR%\EfiLdrImage.exe
-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
34 @
copy /b
%OUTPUT_DIR%\
Start.com
+%OUTPUT_DIR%\Efi32.com2
+%BUILD_DIR%\FV\Efildr32
%BUILD_DIR%\FV\Efildr
35 @
copy /b
%OUTPUT_DIR%\Start16.com
+%OUTPUT_DIR%\Efi32.com2
+%BUILD_DIR%\FV\Efildr32
%BUILD_DIR%\FV\Efildr16
36 @
copy /b
%OUTPUT_DIR%\Start32.com
+%OUTPUT_DIR%\Efi32.com2
+%BUILD_DIR%\FV\Efildr32
%BUILD_DIR%\FV\Efildr20
40 @
%BASETOOLS_DIR%\EfiLdrImage.exe
-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
41 @
copy /b
%BOOTSECTOR_OUTPUT_DIR%\Start64.com
+%BOOTSECTOR_OUTPUT_DIR%\Efi64.com2
+%BUILD_DIR%\FV\Efildr64
%BUILD_DIR%\FV\EfildrPure
42 @
%BASETOOLS_DIR%\GenPage.exe
%BUILD_DIR%\FV\EfildrPure
-o
%BUILD_DIR%\FV\Efildr
43 @
copy /b
%BOOTSECTOR_OUTPUT_DIR%\St16_64.com
+%BOOTSECTOR_OUTPUT_DIR%\Efi64.com2
+%BUILD_DIR%\FV\Efildr64
%BUILD_DIR%\FV\Efildr16Pure
44 @
%BASETOOLS_DIR%\GenPage.exe
%BUILD_DIR%\FV\Efildr16Pure
-o
%BUILD_DIR%\FV\Efildr16
45 @
copy /b
%BOOTSECTOR_OUTPUT_DIR%\St32_64.com
+%BOOTSECTOR_OUTPUT_DIR%\Efi64.com2
+%BUILD_DIR%\FV\Efildr64
%BUILD_DIR%\FV\Efildr20Pure
46 @
%BASETOOLS_DIR%\GenPage.exe
%BUILD_DIR%\FV\Efildr20Pure
-o
%BUILD_DIR%\FV\Efildr20
51 @
echo Error
! Please specific the architecture.
55 @
echo Error
! Wrong architecture.
59 @
echo Usage
: "PostBuild [IA32|X64]"