2 @REM Windows batch file to build BIOS ROM
4 @REM Copyright
(c
) 2006 - 2014, Intel Corporation. All rights reserved.
<BR
>
5 @REM This program and the accompanying materials
6 @REM are licensed and made available under the terms and conditions of the BSD License
7 @REM which accompanies this distribution. The full text of the license may be found at
8 @REM http
://opensource.org
/licenses
/bsd
-license.php
10 @REM THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN
"AS IS" BASIS
,
11 @REM WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND
, EITHER EXPRESS OR IMPLIED.
16 SetLocal EnableDelayedExpansion EnableExtensions
18 @REM Go to root directory of the codebase.
21 :: Assign initial values
26 set PLATFORM_PACKAGE
=Vlv2TbltDevicePkg
29 :: Parse Optional arguments
31 if /i
"%~1"=="/?" goto Usage
34 set Build_Flags
=%Build_Flags% /q
39 set Build_Flags
=%Build_Flags% /l
44 set Build_Flags
=%Build_Flags% /y
49 set Build_Flags
=%Build_Flags% /m
54 set Build_Flags
=%Build_Flags% /c
58 if /i
"%~1" == "/ECP" (
59 set Build_Flags
=%Build_Flags% /ecp
65 set Build_Flags
=%Build_Flags% /s
72 set Build_Flags
=%Build_Flags% /x64
77 if /i
"%~1"=="/IA32" (
79 set Build_Flags
=%Build_Flags% /IA32
85 set Stitch_Flags
=%Stitch_Flags% /nG
90 set Stitch_Flags
=%Stitch_Flags% /nM
95 set Stitch_Flags
=%Stitch_Flags% /nB
100 set Stitch_Flags
=%Stitch_Flags% /yL
106 :: Require
2 input parameters
107 if "%~2"=="" goto Usage
109 :: Assign required arguments
110 set Platform_Type
=%~
1
115 ) else set "IFWI_Suffix=/S %~3"
118 echo ======================================================================
119 echo Build_IFWI
: Calling BIOS build Script...
120 if "%Platform_Type%" == "BYTC" (
121 call %PLATFORM_PACKAGE%\bld_vlv_cr.bat
%Build_Flags% %Platform_Type% %Build_Target%
124 call %PLATFORM_PACKAGE%\bld_vlv.bat
%Build_Flags% %Platform_Type% %Build_Target%
126 if %ERRORLEVEL% NEQ 0 (
127 echo echo -- Error Building BIOS
& echo.
132 echo Finished Building BIOS.
133 @REM
Set BIOS_ID environment variable here.
135 echo BIOS_ID
=%BIOS_ID%
137 :: Set the Board_Id
, Build_Type
, Version_Major
, and Version_Minor environment variables
138 find /v
"#" Conf\BiosId.env
> ver_strings
139 for /f
"tokens=1,3" %%i in
(ver_strings
) do set %%i
=%%j
140 del /f
/q ver_strings
>nul
141 set BIOS_Name
=%BOARD_ID%_
%Arch%_
%BUILD_TYPE%_
%VERSION_MAJOR%_
%VERSION_MINOR%.ROM
143 :: Start Integration process
144 echo ======================================================================
145 echo Build_IFWI
: Calling IFWI Stitching Script...
146 if "%Platform_Type%" == "BYTC" (
147 pushd
%PLATFORM_PACKAGE%\Stitch_CR
149 pushd
%PLATFORM_PACKAGE%\Stitch
151 :: IFWIStitch.bat
[/nG
] [/nM
] [/nB
] [/B BIOS.rom
] [/C StitchConfig
] [/S IFWISuffix
]
152 call IFWIStitch.bat
%Stitch_Flags% /B ..\..\
%BIOS_Name% %IFWI_Suffix%
156 if %ERRORLEVEL% NEQ 0 (
157 echo echo -- Error Stitching
%BIOS_Nam% & echo.
161 echo Build_IFWI is finished.
162 echo The final IFWI file is located in
%ROOT_DIR%\Vlv2TbltDevicePkg\Stitch\
163 echo ======================================================================
167 echo Script to build BIOS firmware and stitch the entire IFWI.
169 echo Usage
: Build_IFWI.bat
[options
] PlatformType BuildTarget
[IFWI Suffix
]
171 echo /c CleanAll before building
172 echo /x64
Set Arch to X64
(default
: X64
)
173 echo /IA32
Set Arch to IA32
(default
: X64
)
174 echo /yL Enable SPI lock
176 echo Platform Types
: MNW2
177 echo Build Targets
: Release
, Debug
178 echo IFWI Suffix
: Suffix to
append to
end of IFWI filename
(default
: MM_DD_YYYY
)
180 echo See Stitch
/Stitch_Config.txt
for additional stitching settings.
182 echo If capsule update is needed
, please update CAPSULE_ENABLE
= TRUE in Config.dsc.
183 echo If recovery is needed
, please update RECOVERY_ENABLE
= TRUE in Config.dsc.
184 echo If either of above is TRUE
, please
set OPENSSL_PATH in windows evironment
185 echo and put openssl.exe there
, to generate final capsule image.
190 @REM
CD to platform package.
191 cd %ROOT_DIR%\Vlv2TbltDevicePkg