blob: bf91b5c182fd1752e65fac4cb8ea95203e0dc314 (
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
|
#
# Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
##**********************************************************************
## Function define
##**********************************************************************
function Usage() {
echo
echo "Script to build BIOS firmware and stitch the entire IFWI."
echo
echo "Usage: BuildIFWI.bat [options] ^<PlatformType^> ^<BuildTarget^> [IFWI Suffix]"
echo
echo " /? Display this help text "
echo " /q Quiet mode. Only display Fatal Errors (slightly faster) "
echo " /l Log a copy of the build output to EDK2.log "
echo " /c CleanAll before building "
echo " /w Enabled WinDbg module for build "
echo " /sv Build with SVBIOS flags enabled "
echo " /ppv Build with PPV flags enabled "
echo " /rvv Build with RVV BXTM flags enabled "
echo " /rvvp Build with RVVP BXTP flags enabled "
echo " /x64 Set Arch to X64 (default: IA32) "
echo " /sata Enable SATA Build "
echo " /pcie Enable PCIe Build "
echo " /nG Not update GOP driver per StitchConfig (override src version) "
echo " /uM Update Microcode per StitchConfig (override src version) "
echo
echo " Set ONLY ONE of the following: "
echo " /vp Set special build flag for ALL Pre-Si "
echo " /csle Set special build flag for C-SLE "
echo
echo " Platform Types: $eNB_RVP $Phblt_RVP $Phblt_Die1_RVP $Embd_RVP "
echo " APLK - Netbook/Desktop "
echo " BXTM - Phablet build for BXT-A "
echo " BXTM1 - Phablet build for BXT Die1(E0) "
echo " APLI - Embedded/IVI build (IOTG) "
echo
echo " Build Targets: Release, Debug "
echo " IFWI Suffix: Suffix to append to end of IFWI filename (default: MM_DD_YYYY) "
echo
echo " See Stitch/Stitch_Config.txt for additional stitching settings. "
echo
echo "Press any key......"
read
exit 0
}
## Assign initial values
exitCode=0
Build_Flags=
Stitch_Flags=
Arch=IA32
## Description of each Platform/Board_ID
## APLK - Netbook/Desktop (PCCG)
## BXTM - Phablet build (MCG)
## BXTM1 - Phablet build for BXT Die1(E0) (MCG)
## APLI - Embedded/IVI build (IOTG)
eNB_RVP=APLK
Phblt_RVP=BXTM
Phblt_Die1_RVP=BXTM1
Embd_RVP=APLI
## Parse Optional arguments
if [ "$1" == "/?" ]; then
Usage
fi
## Build Flags
for (( i=1; i<=$#; ))
do
if [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/Q" ]; then
Build_Flags="$Build_Flags /q"
shift
elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/L" ]; then
Build_Flags="$Build_Flags /l"
shift
elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/C" ]; then
Build_Flags="$Build_Flags /c"
shift
elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/W" ]; then
Build_Flags="$Build_Flags /w"
shift
elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/SV" ]; then
Build_Flags="$Build_Flags /sv"
shift
elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/PPV" ]; then
Build_Flags="$Build_Flags /ppv"
shift
elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/RVVP" ]; then
Build_Flags="$Build_Flags /rvvp"
shift
elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/RVV" ]; then
Build_Flags="$Build_Flags /rvv"
shift
elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/X64" ]; then
Arch=X64
Build_Flags="$Build_Flags /x64"
shift
elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/VP" ]; then
Build_Flags="$Build_Flags /vp"
shift
elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/CSLE" ]; then
Build_Flags="$Build_Flags /csle"
shift
elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/SATA" ]; then
Build_Flags="$Build_Flags /sata"
shift
elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/PCIE" ]; then
Build_Flags="$Build_Flags /pcie"
shift
else
break
fi
done
## Stitch Flags
for (( i=1; i<=$#; ))
do
if [ "$1" == "/nG" ]; then
Stitch_Flags="$Stitch_Flags /nG"
shift
elif [ "$1" == "/uM" ]; then
Stitch_Flags="$Stitch_Flags /uM"
shift
elif [ "$1" == "/nB" ]; then
Stitch_Flags="$Stitch_Flags /nB"
shift
else
break
fi
done
## Require 2 input parameters
if [ "$2" == "" ]; then
echo "Not Enough Arguments Provided"
echo "Please review the Help screen "/?""
fi
## Assign required arguments
Platform_Type=$1
Build_Target=$2
if [ "$3" == "" ]; then
IFWI_Suffix=
else
IFWI_Suffix="/S $3"
fi
## Build BIOS
echo "======================================================================"
echo "Build_IFWI: Calling BIOS build Script..."
sh Platform/BroxtonPlatformPkg/BuildBios.sh $Build_Flags $Platform_Type $Build_Target
echo
echo Finished Building BIOS.
|