summaryrefslogtreecommitdiff
path: root/Platform/Intel/ClevoOpenBoardPkg/N1xxWU/prep.bat
blob: cb0d44f72261d0f5a6fc43eae22246f035f4b0f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
@REM @file
@REM
@REM Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
@REM SPDX-License-Identifier: BSD-2-Clause-Patent
@REM

@echo OFF
@set PrepRELEASE=DEBUG
@set SILENT_MODE=FALSE
@set CapsuleBuild=FALSE

@set EXT_CONFIG_CLEAR=
@set EXT_BUILD_FLAGS=

:CmdLineParse
if "" == "%1" (
  goto Continue
) else if "r" == "%1" (
  set PrepRELEASE=RELEASE
) else if "tr" == "%1" (
  set PrepRELEASE=TEST_RELEASE
) else if "rp" == "%1" (
  set PrepRELEASE=RELEASE_PDB
) else if "s" == "%1" (
  set SILENT_MODE=TRUE
) else if "help" == "%1" (
  goto PrepHelp
) else (
  echo Invalid input arguments: %1
  echo.
  goto PrepHelp
)
SHIFT
goto CmdLineParse

:PrepHelp
@echo Preparation for BIOS build.
@echo.
@echo prep [r][rp][s][help]
@echo.
@echo   r         To do release build. Default is debug build. See note 1
@echo   rp        To do release build with Symbols - For source level debugging. See note 1
@echo   s         To build in silent mode. . See note 1
@echo.
@echo 1) Re-running prep without these arguments cannot be used for
@echo    incremental build. Hence, these inputs must be supplied each time
@echo    prep are desired to be re-run.
@echo.
goto PrepDone

:Continue
@echo ==============================================

if exist %WORKSPACE%\Prep.log del %WORKSPACE%\Prep.log

:PrepReleaseCheck

@if %SILENT_MODE% EQU TRUE goto BldSilent

call prebuild.bat %PrepRelease% %CapsuleBuild%
goto PrePrepDone

:BldSilent
@echo ************************************************************************ >> %WORKSPACE%\Prep.log
@echo ***********           Prebuild.bat is launched here          *********** >> %WORKSPACE%\Prep.log
@echo ************************************************************************ >> %WORKSPACE%\Prep.log
call prebuild.bat %PrepRelease% %CapsuleBuild% 1>>%WORKSPACE%\Prep.log 2>&1

:PrePrepDone
@If %SCRIPT_ERROR% EQU 1 goto PrepFail
@goto PrepDone

:PrepFail
@echo.
@echo !! The EDKII BIOS build has failed in prep!
@echo.
@exit /b 1

:PrepDone