summaryrefslogtreecommitdiff
path: root/BuildBIOS.bat
blob: 51ed30b8eb13c74c907ec24470ca032868739358 (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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
@echo off
echo %date%  %time%
echo.

set exitCode=0
set WORKSPACE=%CD%
set CORE_PATH=%CD%
set BuildFlags=
set PlatformName=
set BuildTarget=Debug
set Compiler=/vs13
set Arch=/x64
set Stepping=/B

:: Optional arguments
:OptLoop

if /i "%~1"=="" goto Usage
if /i "%~1"=="/?" goto Usage

if /i "%~1"=="/IA32" (
    set Arch=/IA32
    shift
    goto OptLoop
)

if /i "%~1"=="/x64" (
    set Arch=/x64
    shift
    goto OptLoop
)

if /i "%~1"=="/vs08" (
    set Compiler=/vs08
    echo.
    shift
    goto OptLoop
)
if /i "%~1"=="/vs10" (
    set Compiler=/vs10
    echo.
    shift
    goto OptLoop
)
if /i "%~1"=="/vs12" (
    set Compiler=/vs12
    echo.
    shift
    goto OptLoop
)
if /i "%~1"=="/vs13" (
    set Compiler=/vs13
    echo.
    shift
    goto OptLoop
)
if /i "%~1"=="/vs15" (
    set Compiler=/vs15
    echo.
    shift
    goto OptLoop
)
if /i "%~1"=="/A" (
    set Stepping=/A
    echo.
    shift
    goto OptLoop
)
if /i "%~1"=="/B" (
    set Stepping=/B
    echo.
    shift
    goto OptLoop
)

:: Required argument(s)
:: Require 2 input parameters
if "%~2"=="" goto Usage

:: Assign required arguments
set PlatformName=%~1
set BuildTarget=%~2

:OptLoopEnd
echo ---- Call Build Script of Broxton ----
echo calling : Platform\%PlatformName%PlatformPkg\BuildIFWI.bat  %Compiler% %Arch% %Stepping% /fspw %BuildFlags% MINN %BuildTarget% 
call Platform\%PlatformName%PlatformPkg\BuildIFWI.bat  %Compiler% %Arch% %Stepping% /fspw %BuildFlags% MINN %BuildTarget% 

goto Exit

:Usage
echo Usage: BuildBIOS.bat [options] ^<PlatformName^> ^<BuildTarget^>
echo.
echo Options:
echo.       /?    Display this help text
echo.
echo        /vs13  Set Compiler to vs2013 build (default: vs2013)
echo        /x64   Set Arch to X64  (default: X64)
echo        /IA32  Set Arch to IA32 (default: X64)
echo        /A     Set stepping to A (default: B stepping)
echo        /B     Set stepping to B (default: B stepping)
echo        PlatformName:  Broxton
echo        BuildTargets:  Release, Debug

echo Examples:
echo    BuildBIOS.bat /vs13 /B /x64 Broxton Debug

set exitCode=1

:Exit
exit /b %exitCode%