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