From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mx.groups.io with SMTP id smtpd.web12.25354.1655690171210894727 for ; Sun, 19 Jun 2022 18:56:11 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=FIIzZx4M; spf=pass (domain: intel.com, ip: 192.55.52.93, mailfrom: gua.guo@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1655690171; x=1687226171; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=CtGUGaGg9cvMg9qaVXmFCJ7fziFOhOr4xpyXXn8fvYw=; b=FIIzZx4MWIYbg74hfqF7Yx+J2cT5xspSZNsKmMdUCeGk3Yr7wcLZLwFX V9wxnuEgFDV//BtbHFIA85LUy06PggbEMQjS3BEJPJgxYUEuVYbdfat+q akIEPsBCVDdjTXPaDWWqj9mdFGWYo3ml/1KfEDf9eX+DpY6VS+b1NxtY3 FZFml0rkoAyb3RMWzBzabmvaJN82HJNL23VTEEptG9F/LJG73iGdqO6vX ure5+Co/xJerXpkhS6C+kTzANdWcSLJy4blB+DbryeW8ZvN1dwrQmkDWP Sfc/TGSGkbtJyO9cSm+7TnZR3UbIjK/km887Nh8Ns+B1dnPI0ufd/Fvl4 g==; X-IronPort-AV: E=McAfee;i="6400,9594,10380"; a="277330342" X-IronPort-AV: E=Sophos;i="5.92,306,1650956400"; d="scan'208";a="277330342" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jun 2022 18:56:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,306,1650956400"; d="scan'208";a="561752640" Received: from gguo-desk.gar.corp.intel.com ([10.5.215.23]) by orsmga006.jf.intel.com with ESMTP; 19 Jun 2022 18:56:07 -0700 From: gua.guo@intel.com To: devel@edk2.groups.io Cc: Gua Guo , Guo Dong , Ray Ni Subject: [PATCH] UefiPayloadPkg: UniversalPayloadBuild.py to support --pcd feature Date: Mon, 20 Jun 2022 09:56:05 +0800 Message-Id: X-Mailer: git-send-email 2.31.1.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Gua Guo REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3955 Currently, UPL freezed all PCD and only known UPL hob can hook DXE Drivers behavior, add optional feature on UniversalPayloadBuild.py to have another way to hook PCD value. Cc: Guo Dong Cc: Ray Ni Signed-off-by: Gua Guo --- UefiPayloadPkg/UniversalPayloadBuild.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/UefiPayloadPkg/UniversalPayloadBuild.py b/UefiPayloadPkg/Unive= rsalPayloadBuild.py index 089d631b51..c71526e0a6 100644 --- a/UefiPayloadPkg/UniversalPayloadBuild.py +++ b/UefiPayloadPkg/UniversalPayloadBuild.py @@ -82,6 +82,11 @@ def BuildUniversalPayload(Args, MacroList): print("- Failed - Please check if LLVM is installed or if CLANG_BI= N is set correctly")=0D sys.exit(1)=0D =0D + Pcds =3D ""=0D + if (Args.pcd !=3D None):=0D + for PcdItem in Args.pcd:=0D + Pcds +=3D " --pcd {}".format (PcdItem)=0D +=0D Defines =3D ""=0D for key in MacroList:=0D Defines +=3D" -D {0}=3D{1}".format(key, MacroList[key])=0D @@ -90,12 +95,14 @@ def BuildUniversalPayload(Args, MacroList): # Building DXE core and DXE drivers as DXEFV.=0D #=0D BuildPayload =3D f"build -p {DscPath} -b {BuildTarget} -a X64 -t {Tool= Chain} -y {PayloadReportPath} {Quiet}"=0D + BuildPayload +=3D Pcds=0D BuildPayload +=3D Defines=0D RunCommand(BuildPayload)=0D #=0D # Building Universal Payload entry.=0D #=0D BuildModule =3D f"build -p {DscPath} -b {BuildTarget} -a {BuildArch} -= m {EntryModuleInf} -t {ElfToolChain} -y {ModuleReportPath} {Quiet}"=0D + BuildModule +=3D Pcds=0D BuildModule +=3D Defines=0D RunCommand(BuildModule)=0D =0D @@ -128,6 +135,7 @@ def main(): parser.add_argument("-D", "--Macro", action=3D"append", default=3D["UN= IVERSAL_PAYLOAD=3DTRUE"])=0D parser.add_argument('-i', '--ImageId', type=3Dstr, help=3D'Specify pay= load ID (16 bytes maximal).', default =3D'UEFI')=0D parser.add_argument('-q', '--Quiet', action=3D'store_true', help=3D'Di= sable all build messages except FATAL ERRORS.')=0D + parser.add_argument("-p", "--pcd", action=3D"append")=0D MacroList =3D {}=0D args =3D parser.parse_args()=0D if args.Macro is not None:=0D --=20 2.31.1.windows.1