
#########################################################################################
#
# Do not check-in any local changes of this file to Perforce!
#
#########################################################################################


#----------------------------------------------------------------------------------------
# Welcome to BuildIfwi's one stop shop for editing Build and Stitch arguments!
# In this file, you can add or remove arguments and they will show up in BuildIfwi
# or IfwiStitch under the relevant namespace variable (e.g. Args) as long you
# follow a few simple rules!
#
# This file is used to generate the CLI arguments and parse them. If you change something here
# it changes for the CLI arguments as well!
#
# As always, the order of precedence of arguments is as follows:
# For BuildIfwi:
#     1. CLI arguments
#     2. This IFWI Configuration file arguments (default)
# For IfwiStitch:
#     1. Arguments parsed from the Zip filename
#     2. CLI Arguments
#     3. This IFWI Configuration file arguments (default)
#
# Rules:
# 1. Each option is it's own section (e.g. [ArgumentName])
# 2. It must have at least 4 attributes:
#     Value: The default value for the option, of boolean or string type.
#            Valid boolean values are ['True', 'False', 'On', 'Off', '0', '1']
#     Flag: The flag that triggers the argument in CLI (e.g. /Argument). It must be lowercase unless it is Positional.
#     Help: The help text for the argument
#     Target: The script(s) that will use the argument (e.g. BuildIfwi, IfwiStitch)
# 3. It can use an additional 3 attributes:
#     Required:       ArgumentName == SomeValue
#                     This allows for dynamic argument requirement checking. Currently only
#                     supports the == operator and this format. Can be extended for additional operators.
#                     Example:
#                           [SvBios]
#                           Required: Arch == X64
#     Choices:        ['Choice1', 'Choice2']
#                     Here you can specify the valid choices for the argument. Please only use
#                     Single quotation marks.
#                     Example:
#                           [PlatformType]
#                           Choices: ['BXTM', 'APLK', 'APLI']
#     SectionHeader:  The Section Header text you want displayed for each option group.
#                     Please do not use any other attributes for this argument. It is purely
#                     for nicer output when someone uses the help command on BuildIfwi or IfwiStitch.
#                     No quotation marks needed.
#
# If you are planning to add/modify/remove any arguments in this file, all you have to do is follow
# the above rules. At the Parse Arguments stage of the BuildIfwi and IfwiStitch process, the Args object
# will have the correct values in the form of Args.ArgumentName
#
# Here is a list of the methods and their modules that utilize this file format:
#    CommonHelperFunctions -> ParseConfigFile
#    CommonHelperFunctions -> ParseArguments
#    CommonHelperFunctions -> CheckArgRequirements
#    BuildHelperFunctions  -> AssembleArgumentFlags
#    StitchHelperFunctions -> ParseZipFileName
#
# And a basic overview of how this works:
#     The ConfigParser object created from this file is used to populate the CLI arguments.
#     It is also used to set defaults, help text, values, etc. After parsing the CLI arguments into an object,
#     requirements are checked. In BuildIfwi, the contents of this file are leveraged against the CLI arguments to
#     construct the call string for IFWI Stitch. In IfwiStitch, they are used to parse the zip file name for
#     arguments. This is all done dynamically, and any changes made to this file will be handled automatically
#     during these methods as long as the rules are obeyed.

# OPTION GROUP 1
#----------------------------------------------------------------------------------------
[OptionalFlags]
SectionHeader = Optional Flags

[Quiet]
Value: False
Flag: /q
Help: Quiet mode. Only display Fatal Errors (slightly faster)
Target: BuildIfwi

[Logging]
Value: False
Flag: /l
Help: Log a copy of the build output to EDK2.log
Target: BuildIfwi

[Clean]
Value: False
Flag: /c
Help: CleanAll before building
Target: BuildIfwi

[WinDbg]
Value: False
Flag: /w
Help: Enable WinDbg module for build
Target: BuildIfwi

[SvBios]
Value: False
Flag: /sv
Required: Arch == X64
Help: Build with SVBIOS flags enabled
Target: BuildIfwi, IfwiStitch

[PpvBios]
Value: False
Flag: /ppv
Help: Build BIOS with PPV flags enabled
Target: BuildIfwi, IfwiStitch

[CompactSle]
Value: False
Flag: /csle
Required: SiliconType == Real
Help: Set special build flag for C-SLE (do not use with virtual build targets)
Target: BuildIfwi

[NoMrcDbg]
Value: False
Flag: /nmrcdbg
Required: BuildTarget == Release
Help: Turn Off All MMRCDebugPrints (use only for release builds)
Target: BuildIfwi

[NoMrc]
Value: False
Flag: /nmrc
Help: Disable the MRC
Target: BuildIfwi

[Fsp]
Value: False
Flag: /fsp
Help: Enable FSP build
Target: BuildIfwi, IfwiStitch

[FspWrapper]
Value: False
Flag: /fspw
Required: NoFsp == False
Help: Build FSP and FSP Wrapper
Target: BuildIfwi, IfwiStitch

[CodeCoverage]
Value: False
Flag: /cov
Help: Enable Code Coverage reporting for build.
Target: BuildIfwi

[RvvBiosEnable]
Value: False
Flag: /rvv
Help: Enable RVV Bios
Target: BuildIfwi, IfwiStitch
Required: SiliconType == Real

[RvvpBiosEnable]
Value: False
Flag: /rvvp
Help: Enable RVVP Bios
Target: BuildIfwi, IfwiStitch
Required: SiliconType == Real

# OPTION GROUP 2
#----------------------------------------------------------------------------------------
# These settings can be set either here or on the CLI (or both).
# If set in both places, the CLI values will be used (values are NOT case-sensitive).
#----------------------------------------------------------------------------------------
[OptionalBuildSettings]
SectionHeader = Optional Build Settings

[VisualStudioVersion]
Value: 13
Flag: /vs
Help: Select Visual Studio version 08: 2008, 10: 2010, 12: 2012, 13: 2013
Choices = ['08', '10', '12', '13']
Target: BuildIfwi

# This is kind of useless here. Makes more sense to set it in CLI or in the script itself
# [AltIfwiConfig]
# Value: NewIfwiConfiguration.txt
# Flag: --ifwiconfig
# Help: Specify an alternate config file to use. If not set, will use "BuildConfig.txt"
# Target: BuildIfwi, IfwiStitch

# OPTION GROUP 3
#----------------------------------------------------------------------------------------
# These settings MUST be set either here or on the CLI (or both).
# If set in both places, the CLI values will be used (values are NOT case-sensitive).
#----------------------------------------------------------------------------------------
[RequiredBuildSettings]
SectionHeader = Required Build Settings

[Arch]
Value: X64
Flag: /arch
Help: Set the architecture of the build. ['IA32', 'X64']
Choices: ['IA32', 'X64']
Target: BuildIfwi, IfwiStitch

[SiliconType]
Value: Real
Flag: /sitype
Help: Specify Pre-Si or Silicon build type
Choices: ['Virtual', 'Real']
Target: BuildIfwi, IfwiStitch

[PlatformType]
Value: BXTM
Flag: Positional
Help: Set the platform type for the build
        APLK - Netbook/Desktop (PCCG)
        BXTM - Phablet build for BXT Die0 (MCG)
        BXT1 - Phablet build for BXT Die1 (MCG)
        APLI - Embedded/IVI build (IOTG)
Choices: ['BXTM', 'BXT1', 'APLK', 'APLI']
Target: BuildIfwi, IfwiStitch

[BuildTarget]
Value: Debug
Flag: Positional
Help: Set the target of build [Debug, Release]
Choices: ['Debug', 'Release']
Target: BuildIfwi, IfwiStitch

# OPTION GROUP 4
#----------------------------------------------------------------------------------------
# These settings will be sent to IFWIStitch via CLI if BuildIfwi is ran first.
# Otherwise IFWIStitch will parse this file for these values.
#----------------------------------------------------------------------------------------
[BuildStitchFlags]
SectionHeader = Build Stitch Flags - These will be passed to IfwiStitch.py

[NoStitch]
Value: False
Flag: /nostitch
Help: Skip IFWIStitch - BuildOnly.
Target: BuildIfwi

[NoGopUpdate]
Value: False
Flag: /ng
Help: Do NOT update GOP driver per StitchConfig.  (applies to all ROM files for this run)
Target: IfwiStitch

[HFpga]
Value: False
Flag: /hfpga
Help: HFPGA Stitch. (???)
Target: IfwiStitch

[IfwiSuffix]
Value: Not_Set
Flag: Positional
Help: Optional suffix to append to the end of the IFWI filename (DEFAULT: YYYY_MM_DD_HHMM)
Target: IfwiStitch

[ComponentConfig]
Value: Stitch_Config.txt
Flag: /config
Help: Specify an alternate stitch component config file to use. If not set, will use "Stitch_Config.txt"
Target: IfwiStitch

[AplkRvp2]
Value: False
Flag: /rvp2
Help: Stitch components for the 2nd APLK RVP board
Target: IfwiStitch
Required: SiliconType == Real


# [UpdatePmc]
# Value: False
# Flag: -up
# Help: Update PMC per StitchConfig  (override src version) !!! CURRENTLY NOT IMPLEMENTED !!!
# Target: IfwiStitch