]> git.proxmox.com Git - mirror_edk2.git/blame - DuetPkg/PostBuild.bat
Update SmmBase Communicate Thunk behaivor to be compatible with Framework implemenation.
[mirror_edk2.git] / DuetPkg / PostBuild.bat
CommitLineData
e4c0074b 1@REM ## @file\r
2@REM #\r
3@REM # Currently, Build system does not provide post build mechanism for module \r
4@REM # and platform building, so just use a bat file to do post build commands.\r
5@REM # Originally, following post building command is for EfiLoader module.\r
6@REM #\r
c4ae2792 7@REM # Copyright (c) 2010 Intel Corporation. All rights reserved.<BR>\r
e4c0074b 8@REM #\r
9@REM # This program and the accompanying materials\r
10@REM # are licensed and made available under the terms and conditions of the BSD License\r
11@REM # which accompanies this distribution. The full text of the license may be found at\r
12@REM # http://opensource.org/licenses/bsd-license.php\r
13@REM # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
14@REM # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
15@REM #\r
16@REM #\r
17@REM ##\r
6d3f7723 18\r
c5dfb477 19@set BUILD_DIR=%WORKSPACE%\Build\DuetPkg\DEBUG_MYTOOLS\r
9fe0e267 20@set BASETOOLS_DIR=%WORKSPACE_TOOLS_PATH%\Bin\Win32\r
e88f3056 21@set BOOTSECTOR_BIN_DIR=%WORKSPACE%\DuetPkg\BootSector\bin\r
c5dfb477 22@set PROCESSOR=""\r
23\r
24@if "%1"=="" goto NoArch\r
25@if "%1"=="IA32" set PROCESSOR=IA32\r
26@if "%1"=="X64" set PROCESSOR=X64\r
27@if %PROCESSOR%=="" goto WrongArch\r
28\r
c5dfb477 29@echo Compressing DUETEFIMainFv.FV ...\r
8b85412a 30@%BASETOOLS_DIR%\LzmaCompress -e -o %BUILD_DIR%\FV\DUETEFIMAINFV.z %BUILD_DIR%\FV\DUETEFIMAINFV.Fv\r
c5dfb477 31\r
32@echo Compressing DxeMain.efi ...\r
8b85412a 33@%BASETOOLS_DIR%\LzmaCompress -e -o %BUILD_DIR%\FV\DxeMain.z %BUILD_DIR%\%PROCESSOR%\DxeCore.efi\r
c5dfb477 34\r
35@echo Compressing DxeIpl.efi ...\r
8b85412a 36@%BASETOOLS_DIR%\LzmaCompress -e -o %BUILD_DIR%\FV\DxeIpl.z %BUILD_DIR%\%PROCESSOR%\DxeIpl.efi\r
c5dfb477 37\r
38@echo Generate Loader Image ...\r
39@if "%PROCESSOR%"=="IA32" goto GENERATE_IMAGE_IA32\r
40@if "%PROCESSOR%"=="X64" goto GENERATE_IMAGE_X64\r
41\r
42:GENERATE_IMAGE_IA32\r
43@%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
e88f3056 44@copy /b %BOOTSECTOR_BIN_DIR%\Start.com+%BOOTSECTOR_BIN_DIR%\Efi32.com2+%BUILD_DIR%\FV\Efildr32 %BUILD_DIR%\FV\Efildr\r
45@copy /b %BOOTSECTOR_BIN_DIR%\Start16.com+%BOOTSECTOR_BIN_DIR%\Efi32.com2+%BUILD_DIR%\FV\Efildr32 %BUILD_DIR%\FV\Efildr16\r
46@copy /b %BOOTSECTOR_BIN_DIR%\Start32.com+%BOOTSECTOR_BIN_DIR%\Efi32.com2+%BUILD_DIR%\FV\Efildr32 %BUILD_DIR%\FV\Efildr20\r
c5dfb477 47@goto end\r
48\r
49:GENERATE_IMAGE_X64\r
50@%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
e88f3056 51@copy /b %BOOTSECTOR_BIN_DIR%\Start64.com+%BOOTSECTOR_BIN_DIR%\Efi64.com2+%BUILD_DIR%\FV\Efildr64 %BUILD_DIR%\FV\EfildrPure\r
c5dfb477 52@%BASETOOLS_DIR%\GenPage.exe %BUILD_DIR%\FV\EfildrPure -o %BUILD_DIR%\FV\Efildr\r
e88f3056 53@copy /b %BOOTSECTOR_BIN_DIR%\St16_64.com+%BOOTSECTOR_BIN_DIR%\Efi64.com2+%BUILD_DIR%\FV\Efildr64 %BUILD_DIR%\FV\Efildr16Pure\r
c5dfb477 54@%BASETOOLS_DIR%\GenPage.exe %BUILD_DIR%\FV\Efildr16Pure -o %BUILD_DIR%\FV\Efildr16\r
e88f3056 55@copy /b %BOOTSECTOR_BIN_DIR%\St32_64.com+%BOOTSECTOR_BIN_DIR%\Efi64.com2+%BUILD_DIR%\FV\Efildr64 %BUILD_DIR%\FV\Efildr20Pure\r
c5dfb477 56@%BASETOOLS_DIR%\GenPage.exe %BUILD_DIR%\FV\Efildr20Pure -o %BUILD_DIR%\FV\Efildr20\r
57@goto end\r
58\r
59\r
60:NoArch\r
61@echo Error! Please specific the architecture.\r
62@goto Help\r
63\r
64:WrongArch\r
65@echo Error! Wrong architecture.\r
66@goto Help\r
67\r
68:Help\r
69@echo Usage: "PostBuild [IA32|X64]"\r
70:end