]> git.proxmox.com Git - mirror_edk2.git/blame - Vlv2TbltDevicePkg/Build_IFWI.sh
MdeModulePkg/EbcDxe: reorganize EBC header definitions
[mirror_edk2.git] / Vlv2TbltDevicePkg / Build_IFWI.sh
CommitLineData
d550b881 1#!/usr/bin/env bash
3cbfba02
DW
2##**********************************************************************
3## Function define
4##**********************************************************************
5function Usage ( ) {
6 echo
7 echo "Script to build BIOS firmware and stitch the entire IFWI."
8 echo
83586b5d 9 echo "Usage: Build_IFWI.bat [options] PlatformType BuildTarget "
3cbfba02
DW
10 echo
11 echo
83586b5d 12 echo " /yL [option] : Enable SPI lock"
3cbfba02
DW
13 echo " Platform Types: MNW2"
14 echo " Build Targets: Release, Debug"
15 echo
16 echo " See Stitch/Stitch_Config.txt for additional stitching settings."
17 echo
18 echo
3cbfba02
DW
19 exit 0
20}
21
22## Assign initial values
23exitCode=0
24Build_Flags=
25Stitch_Flags=
26Arch=X64
27PLATFORM_PACKAGE=Vlv2TbltDevicePkg
28
29## Parse Optional arguments
30if [ "$1" == "/?" ]; then
31 Usage
32fi
33
34for (( i=1; i<=$#; ))
35 do
36 if [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/Q" ]; then
37 Build_Flags="$Build_Flags /q"
38 shift
39 elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/L" ]; then
40 Build_Flags="$Build_Flags /l"
41 shift
42 elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/C" ]; then
43 Build_Flags="$Build_Flags /c"
44 shift
45 elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/ECP" ]; then
46 Build_Flags="$Build_Flags /ecp"
47 shift
48 elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/X64" ]; then
49 Arch=X64
50 Build_Flags="$Build_Flags /x64"
51 shift
52 elif [ "$1" == "/nG" ]; then
53 Stitch_Flags="$Stitch_Flags /nG"
54 shift
55 elif [ "$1" == "/nM" ]; then
56 Stitch_Flags="$Stitch_Flags /nM"
57 shift
58 elif [ "$1" == "/nB" ]; then
59 Stitch_Flags="$Stitch_Flags /nB"
60 shift
61 elif [ "$1" == "/nV" ]; then
62 Stitch_Flags="$Stitch_Flags /nV"
63 shift
83586b5d
TH
64 elif [ "$1" == "/yL" ]; then
65 Build_Flags="$Build_Flags /yL"
66 shift
3cbfba02
DW
67 else
68 break
69 fi
70 done
71
72## Require 2 input parameters
73if [ "$2" == "" ]; then
74 Usage
75fi
76
77## Assign required arguments
78Platform_Type=$1
79Build_Target=$2
80if [ "$3" == "" ]; then
81 IFWI_Suffix=
82else
83 IFWI_Suffix="/S $3"
84fi
85
86## Go to root directory
87cd ..
88
89## Build BIOS
90echo "======================================================================"
91echo "Build_IFWI: Calling BIOS build Script..."
92./$PLATFORM_PACKAGE/bld_vlv.sh $Build_Flags $Platform_Type $Build_Target
93
94echo
95echo Finished Building BIOS.
96
97## Start Integration process
98echo ======================================================================
99echo Skip "Build_IFWI: Calling IFWI Stitching Script..."
100
101echo
102echo Build_IFWI is finished.
103echo The final IFWI file is located in Stitch
104echo ======================================================================