UefiPayloadPkg: Add --quiet argument to Universal Payload build script

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-by: Guo Dong <guo.dong@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
This commit is contained in:
Guo Dong 2022-04-10 13:45:58 -07:00 committed by mergify[bot]
parent 63e155f24d
commit dab96cf02e
1 changed files with 4 additions and 2 deletions

View File

@ -53,6 +53,7 @@ def RunCommand(cmd):
def BuildUniversalPayload(Args, MacroList): def BuildUniversalPayload(Args, MacroList):
BuildTarget = Args.Target BuildTarget = Args.Target
ToolChain = Args.ToolChain ToolChain = Args.ToolChain
Quiet = Args.Quiet
BuildArch = "X64" if Args.Arch == 'X64' else "IA32 -a X64" BuildArch = "X64" if Args.Arch == 'X64' else "IA32 -a X64"
ElfToolChain = 'CLANGDWARF' ElfToolChain = 'CLANGDWARF'
@ -82,13 +83,13 @@ def BuildUniversalPayload(Args, MacroList):
# #
# Building DXE core and DXE drivers as DXEFV. # Building DXE core and DXE drivers as DXEFV.
# #
BuildPayload = f"build -p {DscPath} -b {BuildTarget} -a X64 -t {ToolChain} -y {PayloadReportPath}" BuildPayload = f"build -p {DscPath} -b {BuildTarget} -a X64 -t {ToolChain} -y {PayloadReportPath} {Quiet}"
BuildPayload += Defines BuildPayload += Defines
RunCommand(BuildPayload) RunCommand(BuildPayload)
# #
# Building Universal Payload entry. # Building Universal Payload entry.
# #
BuildModule = f"build -p {DscPath} -b {BuildTarget} -a {BuildArch} -m {EntryModuleInf} -t {ElfToolChain} -y {ModuleReportPath}" BuildModule = f"build -p {DscPath} -b {BuildTarget} -a {BuildArch} -m {EntryModuleInf} -t {ElfToolChain} -y {ModuleReportPath} {Quiet}"
BuildModule += Defines BuildModule += Defines
RunCommand(BuildModule) RunCommand(BuildModule)
@ -120,6 +121,7 @@ def main():
parser.add_argument('-a', '--Arch', choices=['IA32', 'X64'], help='Specify the ARCH for payload entry module. Default build X64 image.', default ='X64') parser.add_argument('-a', '--Arch', choices=['IA32', 'X64'], help='Specify the ARCH for payload entry module. Default build X64 image.', default ='X64')
parser.add_argument("-D", "--Macro", action="append", default=["UNIVERSAL_PAYLOAD=TRUE"]) parser.add_argument("-D", "--Macro", action="append", default=["UNIVERSAL_PAYLOAD=TRUE"])
parser.add_argument('-i', '--ImageId', type=str, help='Specify payload ID (16 bytes maximal).', default ='UEFI') parser.add_argument('-i', '--ImageId', type=str, help='Specify payload ID (16 bytes maximal).', default ='UEFI')
parser.add_argument('-q', '--Quiet')
MacroList = {} MacroList = {}
args = parser.parse_args() args = parser.parse_args()
if args.Macro is not None: if args.Macro is not None: