From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mx.groups.io with SMTP id smtpd.web09.3991.1656045670170694553 for ; Thu, 23 Jun 2022 21:41:10 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=VcJVpaGh; spf=pass (domain: intel.com, ip: 192.55.52.88, mailfrom: ray.ni@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1656045670; x=1687581670; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=swFkh7WJd1p2Oa3SQ4Ny3j41rDBIcFVQKZbi/buP+I0=; b=VcJVpaGhllQoXjPWSv208e5CnEOgluw+7l/3AtXu9Q5PndYOl2ZwssB4 AlcIyRFDp+fqL5iexkHa8dc3TkaDo+FQ/qFXMPMb0QxMgRQh2u57M0PUq SzzpmxnaSdvUOzaA4DTDkboLVSeH9Fp8Js2wYllE5668kMHR2k8wWIs+o OGV6q9zQv+maF+wSDVDrzLsefMqLwVJkK2XbmiX9Qp5C/UIi6X8jptgUo 8y3e/tw29ie9pM1f069VLqu0bHbWPaJtiI0Hb3ecPLMrTK3NQrmUZJmFc YJKyV1t/CmkWBW3iscxFiJQWihFSgriS3x+m9gE11++W5kUYDRKebOQ1X A==; X-IronPort-AV: E=McAfee;i="6400,9594,10387"; a="306386231" X-IronPort-AV: E=Sophos;i="5.92,218,1650956400"; d="scan'208";a="306386231" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Jun 2022 21:41:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,218,1650956400"; d="scan'208";a="731170365" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by fmsmga001.fm.intel.com with ESMTP; 23 Jun 2022 21:41:09 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Thu, 23 Jun 2022 21:41:09 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Thu, 23 Jun 2022 21:41:09 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27 via Frontend Transport; Thu, 23 Jun 2022 21:41:09 -0700 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.41) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.27; Thu, 23 Jun 2022 21:41:09 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OqQX0fjPDJJwrvyTU4oJ8ueNhK1P30j+wQ1uVWZxQ2VOQlyqGeYW4wzWs2BvCn6LqDVNlS9VphO0OffHix1SGvbMMNrJLjfyblkZjBoWzJjMgjkxp4jTkS3E4C+MeMZ8XeVsO6WVepYD9QwsvVQCU76c9gl1gRExyUi2PYjYjK0AoYReKG/Q3nI0xgZge7jK0NWSNSBLBizuGVtxFHH6KXWnWEfKNh71uPNKa7IlTyeSciFWXg19fGEqjXyih2ulcQ3T5I/CqTpOrtwgrFFTmSkowzDtPrLa3dK0FD6SgmuBsxjQrmfoiocRjB7F2Ro+Vgy93fpkiOJbAN+ZusiLAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=0AqKAazgBC3ae5asgrfwMOFM4e840zqtU5QeT80fU+4=; b=VLN4sf3paGH7aIqRU7+8rEIBnU1jMKSIKz2Dceu51O9pAOJ23qXlzHtQoI+x/IiSmE/Vb/4w+7XFvWPhr9yZd3REPxIvWOhHybypiRq39i61tfnssaS/q65OCv9434sj4EefFNXDazIk7wUiYl9H7c0ozYwxuqZgInPKweAXe8UimYUaCtvqButVRcmAObWbAiTTRPynaUJ6Cu15WCSRGw4gSfVGhPGc56mqIO3hHevYHRy6wflOZHkxmMcVZBHqdOt0w9dIUBwVOBn09IE15HBQwCV59gmVwOjPmS/s6VFKr2Hn/0ajBaXV8YAbJalTauER/Q85mXsgfzqbJvOG9w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from MWHPR11MB1631.namprd11.prod.outlook.com (2603:10b6:301:10::10) by DM4PR11MB6335.namprd11.prod.outlook.com (2603:10b6:8:b7::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5373.17; Fri, 24 Jun 2022 04:41:07 +0000 Received: from MWHPR11MB1631.namprd11.prod.outlook.com ([fe80::991b:97a0:7836:5174]) by MWHPR11MB1631.namprd11.prod.outlook.com ([fe80::991b:97a0:7836:5174%10]) with mapi id 15.20.5353.022; Fri, 24 Jun 2022 04:41:07 +0000 From: "Ni, Ray" To: "Liu, KasimX" , "devel@edk2.groups.io" CC: "Dong, Guo" , "Lu, James" , "Guo, Gua" Subject: Re: [PATCH v2] UefiPayloadPkg: Backward support with python 3.6 Thread-Topic: [PATCH v2] UefiPayloadPkg: Backward support with python 3.6 Thread-Index: AQHYh31DVTfNhgZd5kmf8F6S+KM+8q1d+iQQ Date: Fri, 24 Jun 2022 04:41:07 +0000 Message-ID: References: <20220624034749.2978-1-kasimx.liu@intel.com> In-Reply-To: <20220624034749.2978-1-kasimx.liu@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 09c72595-df8b-4f6f-70d4-08da559bc15e x-ms-traffictypediagnostic: DM4PR11MB6335:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: HxijW4utY6peZkTstD2ATb7aJrwMWYT6WVQb9I5e7h5gVx0pYAytPNBiTCwVSLlDHuSD1HRoE02fIk80I2cZWZlkoE1hUlwPjC+u3rlcgRdu/dSVsOfMopiAXBBlpTmpKnj8Yu/WvwLgQ1ohksXQbeIDLYUcuc7BHznYx8SHThRkDHK9GLB+13VAzUx9nefdTXV/9ys5q4XZMyWyjGLw3wORQuOaTxvY5o4pXdN86f+V5111FHR5EWQLh/tYes8/6O7tPKrUSaQOrZ51n42MKjf6L7PEgrgi7vK6/2LBCJTwY2xP5dDqWWBeKtFxe3KfJqlMrL5lQm+/wA38TH/CseBXUC3VkH8JYYZrN/KpK/y4zWNcCVxxX2skZ5mOaaaJvdrTexxb3ZUrbgvzp2MWfFp/bA2Vzi+dc91Tg92RcwDtKgo0q/JKFsz9IthaMOz4fiRYLccote1OnMMc3bym01byFrwxo85dqk+IglSrdKLVMAcDtwJLt6bMK8hsFSQgpPSkWSFS33xn789aMOD22JcT4Zza34W3GesrE4ju8u7fjNdIahxoTvB9qdZIpULjGBEVsH0fowuIS6PlaiuJDcgG5UeA3q2XkHxFlEIfjU3Z+nyEHF9ssDv63YlyN4rhE3R2K6k0BdBM+18LWNQqRrt3ubeMPd7RzCuyj5jrlema+VOvcmjiVTEx/rOFFWM1DtRE1273oG4oM0hiKrJyZLr/0BKM2/aKMGT240I96LMZyTnziBt/xK8ylL+uVUaNh2vDzhp936lVhdYLb00hlH3uNdnJR5grz0cwh/hkhGxc6x0zfhUm9URomPDC5QjYCT5l5WN9eVmcf2y9s2lw7Q== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MWHPR11MB1631.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(39860400002)(366004)(346002)(136003)(376002)(396003)(52536014)(478600001)(5660300002)(8936002)(82960400001)(122000001)(2906002)(38070700005)(54906003)(316002)(110136005)(33656002)(86362001)(71200400001)(966005)(64756008)(66446008)(66476007)(66556008)(66946007)(4326008)(8676002)(76116006)(83380400001)(9686003)(107886003)(41300700001)(26005)(186003)(38100700002)(55016003)(7696005)(6506007)(53546011);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?zJWjTfVBv7lg1aMMAdvzA4pCOjLVnW+jOJ/Lp5a4//AgiOt2ONIkpFGmEWzw?= =?us-ascii?Q?UtchxGc9u2ErccaYpSriLbbPs3pOW5Ttxcylz45iaHAeSDR5B2zPqZPpA8qw?= =?us-ascii?Q?eHrUMLXB2I1r9xa4y3K+fhQYxcTTnC9xUlg3FLr8v4n/mShuYre6VUv0KyiK?= =?us-ascii?Q?s3GvFTGIuRP2BrWHzfC0kOuvW2G8GhwMp7TNKtAvGDu5kQKtw0+NoDEDP1+b?= =?us-ascii?Q?ef0qcoubYGhWVvvbKLJra6v3xsWGIHrW2Ql+2n0xUzEczRh4WngpNi6l2B+H?= =?us-ascii?Q?/jrEwNnKkpibH9BQ7n4EAMAqqOUNeIlqcTpzb6QAliFRoiLKYz9G7b2xkzT3?= =?us-ascii?Q?lYkKV78SIcEzL3eNJp7Y4MKs8sqkAfbdf0qLhqVA6nKjgwW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MGkxYblcaVyFkd0LYjU4GUjeG2Ab1XUy53KvCq?= =?us-ascii?Q?r2goeiQVmDnpbmG78BBdn68I+PO+CEwnm7RBLYBhtCwhFG0fbf8NeNIYCHmX?= =?us-ascii?Q?sSKBX5tgWyY7aMs1xtMtzJmFSC8n70o/fiwvIhXH84TWfcFgmM46+57Y7hWs?= =?us-ascii?Q?DL/dxAnPs0otNUyYRXwdZ2yExnLpSLKskRpnVPgcFJYST7UTvV3sM4a377lG?= =?us-ascii?Q?xa6sanyCHZ0ogMGnlQfO3p4DH694EWUsT2zMW/08ALYVWvYd8+Bb5ztY49Aj?= =?us-ascii?Q?LULjDpksHMDxLhQoQs0=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MWHPR11MB1631.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 09c72595-df8b-4f6f-70d4-08da559bc15e X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Jun 2022 04:41:07.8674 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: DFaAspJtLSyw4qIVrLoz0uC4jfTGzYTVis8Pl7BDHU63ieP7gGRymy166xPkHf0IT4uujZAPk9vc4L8Din1ASg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR11MB6335 Return-Path: ray.ni@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Why use PY 3.6? Even PY 3.8 is about to be deprecated by Python community. > -----Original Message----- > From: Liu, KasimX > Sent: Friday, June 24, 2022 11:48 AM > To: devel@edk2.groups.io > Cc: Liu, KasimX ; Dong, Guo ; N= i, Ray ; Lu, James > ; Guo, Gua > Subject: [PATCH v2] UefiPayloadPkg: Backward support with python 3.6 >=20 > From: KasimX Liu >=20 > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3960 >=20 > Currently, UniversalPayloadBuild.py don't have support > python3.6, we use python3.6 will encounter f"" failure > use the change to fix it to support python3.6/3.7/3.8. >=20 > Cc: Guo Dong > Cc: Ray Ni > Cc: James Lu > Reviewed-by: Gua Guo > Signed-off-by: KasimX Liu > --- > UefiPayloadPkg/UniversalPayloadBuild.py | 33 +++++++++++++++----- > 1 file changed, 25 insertions(+), 8 deletions(-) >=20 > diff --git a/UefiPayloadPkg/UniversalPayloadBuild.py b/UefiPayloadPkg/Uni= versalPayloadBuild.py > index c71526e0a6..ab4c977ba5 100644 > --- a/UefiPayloadPkg/UniversalPayloadBuild.py > +++ b/UefiPayloadPkg/UniversalPayloadBuild.py > @@ -59,15 +59,15 @@ def BuildUniversalPayload(Args, MacroList): > if Args.Arch =3D=3D 'X64': >=20 > BuildArch =3D "X64" >=20 > ObjCopyFlag =3D "elf64-x86-64" >=20 > - EntryOutputDir =3D os.path.join(BuildDir, f"{BuildTarget}_{ElfTo= olChain}", > os.path.normpath("X64/UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEnt= ry/DEBUG/UniversalPayloadEntry.dll")) >=20 > + EntryOutputDir =3D os.path.join(BuildDir, "{}_{}".format (BuildT= arget, ElfToolChain), > os.path.normpath("X64/UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEnt= ry/DEBUG/UniversalPayloadEntry.dll")) >=20 > else: >=20 > BuildArch =3D "IA32 -a X64" >=20 > ObjCopyFlag =3D "elf32-i386" >=20 > - EntryOutputDir =3D os.path.join(BuildDir, f"{BuildTarget}_{ElfTo= olChain}", > os.path.normpath("IA32/UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEn= try/DEBUG/UniversalPayloadEntry.dll")) >=20 > + EntryOutputDir =3D os.path.join(BuildDir, "{}_{}".format (BuildT= arget, ElfToolChain), > os.path.normpath("IA32/UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEn= try/DEBUG/UniversalPayloadEntry.dll")) >=20 >=20 >=20 > EntryModuleInf =3D os.path.normpath("UefiPayloadPkg/UefiPayloadEntry= /UniversalPayloadEntry.inf") >=20 > DscPath =3D os.path.normpath("UefiPayloadPkg/UefiPayloadPkg.dsc") >=20 > - FvOutputDir =3D os.path.join(BuildDir, f"{BuildTarget}_{ToolChain}",= os.path.normpath("FV/DXEFV.Fv")) >=20 > + FvOutputDir =3D os.path.join(BuildDir, "{}_{}".format (BuildTarget, = ToolChain), os.path.normpath("FV/DXEFV.Fv")) >=20 > PayloadReportPath =3D os.path.join(BuildDir, "UefiUniversalPayload.t= xt") >=20 > ModuleReportPath =3D os.path.join(BuildDir, "UefiUniversalPayloadEnt= ry.txt") >=20 > UpldInfoFile =3D os.path.join(BuildDir, "UniversalPayloadInfo.bin") >=20 > @@ -94,14 +94,14 @@ def BuildUniversalPayload(Args, MacroList): > # >=20 > # Building DXE core and DXE drivers as DXEFV. >=20 > # >=20 > - BuildPayload =3D f"build -p {DscPath} -b {BuildTarget} -a X64 -t {To= olChain} -y {PayloadReportPath} {Quiet}" >=20 > + BuildPayload =3D "build -p {} -b {} -a X64 -t {} -y {} {}".format (D= scPath, BuildTarget, ToolChain, PayloadReportPath, Quiet) >=20 > BuildPayload +=3D Pcds >=20 > BuildPayload +=3D Defines >=20 > RunCommand(BuildPayload) >=20 > # >=20 > # Building Universal Payload entry. >=20 > # >=20 > - BuildModule =3D f"build -p {DscPath} -b {BuildTarget} -a {BuildArch}= -m {EntryModuleInf} -t {ElfToolChain} -y > {ModuleReportPath} {Quiet}" >=20 > + BuildModule =3D "build -p {} -b {} -a {} -m {} -t {} -y {} {}".forma= t (DscPath, BuildTarget, BuildArch, EntryModuleInf, > ElfToolChain, ModuleReportPath, Quiet) >=20 > BuildModule +=3D Pcds >=20 > BuildModule +=3D Defines >=20 > RunCommand(BuildModule) >=20 > @@ -118,9 +118,26 @@ def BuildUniversalPayload(Args, MacroList): > # >=20 > # Copy the DXEFV as a section in elf format Universal Payload entry. >=20 > # >=20 > - remove_section =3D f'"{LlvmObjcopyPath}" -I {ObjCopyFlag} -O {ObjCop= yFlag} --remove-section .upld_info --remove- > section .upld.uefi_fv {EntryOutputDir}' >=20 > - add_section =3D f'"{LlvmObjcopyPath}" -I {ObjCopyFlag} -O {ObjCop= yFlag} --add-section .upld_info=3D{UpldInfoFile} --add- > section .upld.uefi_fv=3D{FvOutputDir} {EntryOutputDir}' >=20 > - set_section =3D f'"{LlvmObjcopyPath}" -I {ObjCopyFlag} -O {ObjCop= yFlag} --set-section-alignment .upld.upld_info=3D16 -- > set-section-alignment .upld.uefi_fv=3D16 {EntryOutputDir}' >=20 > + remove_section =3D '"{}" -I {} -O {} --remove-section .upld_info --r= emove-section .upld.uefi_fv {}'.format ( >=20 > + LlvmObjcopyPath, >=20 > + ObjCopyFlag, >=20 > + ObjCopyFlag, >=20 > + EntryOutputDir >=20 > + ) >=20 > + add_section =3D '"{}" -I {} -O {} --add-section .upld_info=3D{} -= -add-section .upld.uefi_fv=3D{} {}'.format ( >=20 > + LlvmObjcopyPath, >=20 > + ObjCopyFlag, >=20 > + ObjCopyFlag, >=20 > + UpldInfoFile, >=20 > + FvOutputDir, >=20 > + EntryOutputDir >=20 > + ) >=20 > + set_section =3D '"{}" -I {} -O {} --set-section-alignment .upld.u= pld_info=3D16 --set-section-alignment .upld.uefi_fv=3D16 > {}'.format ( >=20 > + LlvmObjcopyPath, >=20 > + ObjCopyFlag, >=20 > + ObjCopyFlag, >=20 > + EntryOutputDir >=20 > + ) >=20 > RunCommand(remove_section) >=20 > RunCommand(add_section) >=20 > RunCommand(set_section) >=20 > -- > 2.32.0.windows.2