From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mx.groups.io with SMTP id smtpd.web09.5569.1612841135388969409 for ; Mon, 08 Feb 2021 19:25:35 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=Nn5Q1z0g; spf=pass (domain: intel.com, ip: 134.134.136.24, mailfrom: bob.c.feng@intel.com) IronPort-SDR: HoaJ5D4J7r7f5Gx+x+AqCrjNc4WvHbPE8gWsCJQJ3Yy4LiXVGQqX9EnIk8IZmLdD4HmyWRGbKa O67BNHFNJN7w== X-IronPort-AV: E=McAfee;i="6000,8403,9889"; a="181965667" X-IronPort-AV: E=Sophos;i="5.81,163,1610438400"; d="scan'208";a="181965667" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Feb 2021 19:25:34 -0800 IronPort-SDR: sHnBbQ0Xj8gWURVUM5OWL1XTJ1yNYx2T7ZcObKISBLvOXBB4GwHy0GIqGkpQo5zjrNjMPnCRJY UpZudLK8Brrg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,163,1610438400"; d="scan'208";a="509692045" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orsmga004.jf.intel.com with ESMTP; 08 Feb 2021 19:25:33 -0800 Received: from fmsmsx605.amr.corp.intel.com (10.18.126.85) 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.2106.2; Mon, 8 Feb 2021 19:25:33 -0800 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2 via Frontend Transport; Mon, 8 Feb 2021 19:25:33 -0800 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.172) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.1713.5; Mon, 8 Feb 2021 19:25:32 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=C8NT4fKYQiW+GF0u8M5lTn5wncly3foc9LzPiXJqFduBmmIBwpSR6gNddN6+WQuw/DO4WHx+zOTTm6iV2wBOa+okBaxq6SmI4blnIcNo+kwGqfS1Va2iBMPX/HfH4Zne/r/qUnXxQqvp4eoK1+258HQ/l+z1b9soEZbf9Q8y23CcfMW6rX7f8lyj6Pfuhqq2bGlGMF5MaFPa0euY27aFReJH8mLLCMyY+9WugqhLq6TPUEm2bkBy4XObT1pmDwnY9A1aLTdXaYazA+ncen6kK7+29nsOJQTPM0CLIVD3dqtIybk7uSLCpDJKgh/LJpTN7gyOTvCjn1SlUS1URWzwdA== 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-SenderADCheck; bh=BNd9KCULgTuDsycvSbMH+qx4u4qeCanWXt5gcDj/Mnw=; b=Hb6lKwOwCtTTkNzKhR50wfHnPzPDYxVr27rEq3l+GL7UTGCL50jCklpMMAJwjRArvD5YXjHRPzeQA0JauiLDVVaa+R6Dwxc2lSjfjNFBD4Z4CngdCg4bHGi+9uhxwecjW6B/Kr91RTAuNvrwbu+wMVIZSedyVBPCHKk8DhHYwwAOC6XQ3d+Vt0RyWO+kh4iqgCqkSrvQSo8QJ2H2S/mKaf0MpNUGlDcE/c7yzeqrFgSLPigRqxJZSoD6foGJL5nMqJtkdiZpwkwRqVpZ4twUOjyqLBQpsWnW4n5AM/ctruoGuUQi5OksSnWqjjSTTWFne8a53qlV8M94w7PG6WL9gw== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=BNd9KCULgTuDsycvSbMH+qx4u4qeCanWXt5gcDj/Mnw=; b=Nn5Q1z0gp5r/T4OHqFvtznA+WbkJ58Zhz/6hpOgQI0Od4RpIPZnlnmYNyfku4suhOMoVzWyx7rjP5tBBNGO5bCGxGbSO2qgm16bXqBQ3xXkbpC65l7Q0PwMWYCGJ9dWC5BcxPJcju+hmihJS4SU0HgTRL6elpPkS/Jy0Slj6/3Q= Received: from DM6PR11MB4073.namprd11.prod.outlook.com (2603:10b6:5:19f::22) by DM6PR11MB3418.namprd11.prod.outlook.com (2603:10b6:5:6e::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3825.27; Tue, 9 Feb 2021 03:25:31 +0000 Received: from DM6PR11MB4073.namprd11.prod.outlook.com ([fe80::845:55b:f6b3:aa0a]) by DM6PR11MB4073.namprd11.prod.outlook.com ([fe80::845:55b:f6b3:aa0a%6]) with mapi id 15.20.3825.030; Tue, 9 Feb 2021 03:25:30 +0000 From: "Bob Feng" To: "Chen, Christine" , "matthewfcarlson@gmail.com" , "devel@edk2.groups.io" CC: Liming Gao Subject: Re: [PATCH v5 1/1] BaseTools: Use pip module if available, CI uses it by default Thread-Topic: [PATCH v5 1/1] BaseTools: Use pip module if available, CI uses it by default Thread-Index: AQHW/n2toGTgNwgvskGc12sXz/zkA6pPGnaAgAAMBIA= Date: Tue, 9 Feb 2021 03:25:30 +0000 Message-ID: References: <20210209005033.596-1-matthewfcarlson@gmail.com> <20210209005033.596-2-matthewfcarlson@gmail.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.102.204.37] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: a6b14908-dfbe-48f7-c970-08d8ccaa5a9b x-ms-traffictypediagnostic: DM6PR11MB3418: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:1265; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 9srncVZcKaLW9vokEjG011Q6d3T0oOAcyG6jEa2yVsj8VHzHdzKKUlp+lIoaPcwEeHOt/Ud+RdzQQOsArpBlFWbmzIBnCADEH/NvQd2GveZabGWkmLZak77HliGQ8zLEeZtT2t5iPpAgm4RQmp2Ko9DUfSVXNvK0rTHIfbcJbBO2t+ytMOEv8C6YIavd/O5wJtQ9sRemuZCZNTWvu1PY/L3KcxNSYcfE+98SMuTR3sT8GYKE9bfiiV0hNCDF8aRqh55/ceeqy9gMa9B/Wo8KsE0H60E1cNEcSkabD6f+BGGHAjQ2njWyRiAmVT8anvZE0hv1QBnyJ8OmjouKWnCs96fAbCdwNGPOjKmmqa5zGDoaN9oYeGs8zatjjn75qvhKhpCL3lfcbIWEGXwTy/DqVejj3SXgfl1zrf7THkNvJxSnOlRckTnGqZbRAB/WlrF+rvfj3ZfgLTjVOQS+BEST3aCMEnRTdDCDbc/zdHLmF2IoQ0gMLT72iowIt1Iq/aaISmISwybId+78adBj2Zt2XSpHJuTZj1ILj5bKrMAFxCDVXpt7YzN0e0DzP6tzh1Sw4QBJBnh/2WxkdeX6HLuLPjiF1NBsFn77PlVn/BAsjQ6bn82oIHeXe1VuHLCXsJGLsOfFI2K5Flpr8IewafqL4g== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR11MB4073.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(136003)(376002)(39860400002)(396003)(346002)(366004)(478600001)(30864003)(33656002)(110136005)(45080400002)(66446008)(76116006)(4326008)(66946007)(19627235002)(966005)(5660300002)(7696005)(52536014)(66556008)(64756008)(71200400001)(9686003)(55016002)(6506007)(2906002)(53546011)(316002)(26005)(83380400001)(86362001)(66476007)(186003)(8676002)(8936002)(579004)(559001)(134885004);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?6ByJHZEeD4cicrTIoRLxbgTviH+ywJLD/Yr4BTKZBE39k5gThXQPsUzKz8B8?= =?us-ascii?Q?BGlaGObU+n/pTyJuUEXE0/tHiIH8Ikw/KT35Dcx3Tgv23RZUU5VkQqjpdKYq?= =?us-ascii?Q?vZ0zMMYvgA1TddbpOu/bn/RnAesRHXaXvFBcbuMRb93HBQSFcQyW/IVbA8vl?= =?us-ascii?Q?8B1g7PVGvLaxnauHIx+nzGpKVeQEuTAKeia2g0D9RcK0JOms0TFK6vxHifEK?= =?us-ascii?Q?BdXG/X2rdBQZIkZDCMI9UsoNPXBf5It1XiF3BphrZ1XG1r/iDmLIaZ0fRMR7?= =?us-ascii?Q?GMXcN5bUYSdK5r6RmFZH/o8T5jJSNb3rLN8S+W++PH7CKNcmIVxAC0ZEZI0r?= =?us-ascii?Q?hKyPyd+3PU3F53IeJJaBL7i/6IDNPLJe9q3PKuAiauH5X80Ua8Bi8S7Lt52J?= =?us-ascii?Q?qwVEvIcPiR7DOWRWJ/mthDzgdEMpp4FzKweEsVLPe1L80MJexxDTOri2TaWy?= =?us-ascii?Q?5wJETxPX3M/Ma0vdayijeTxdzJBAQkpIQJ8qhxchM0I+ROdw/3Dxe5N5rUC3?= =?us-ascii?Q?RCAcTrFxaEtFyHJIAewzQiR2eE6R7BMl3tlITZjijY+AgKGRSRKlJjo0CNHD?= =?us-ascii?Q?qJr4c/SOh0U04jxHTHaS6E6FYRlJAMyNtJJyDjwBWVxcn9KjR0gaUtGgqm1X?= =?us-ascii?Q?AkHZPnI6ZvL4kQvMtzTwKlaptn8lOB14IfVcvC1pGsMf81vyIn/Y5ihUTEg0?= =?us-ascii?Q?HlcLWbHAcy5il6I8Hs1/9XOMhC6/aD2KQx3Yhnj2gEZZCGZMWKPrVnwf+nGP?= =?us-ascii?Q?43oPZdl1GvIkOslaRPf4+79QIOep56ykf6Y17mDHQsP2KLp2xrNiCfxXRs7B?= =?us-ascii?Q?ATF9sptrk8Mh//UfVWmExkHTAxy2YCMo8DhFYqWerVnvD7vr0UpU8PuVZJR+?= =?us-ascii?Q?2y3utd47Y8tSUnfNBkUvSai+b18eNYGJi5w0mA1U8/TrzpTJRoqoAOGapLSU?= =?us-ascii?Q?6rGJkUVlJjQolFmQpkuWm0aHuSu72hZWmGSYSHg3pN/lxBsOg8gxLzKIsJlZ?= =?us-ascii?Q?EoFDm1+Vh0m23kyTAhnwe4s+PzlPyyQQ/T3GhOQDN0UNKggYb/UR1di08wNW?= =?us-ascii?Q?ZG8+Td+SjQQA88KcdlRoATdIWMLpPXJbU0e8ODdgx0zXJXBLMwY/X0P+ZSek?= =?us-ascii?Q?VQDF77OZa49zhqv7L2XREM+rxr9EGvWGbHKl18BEMcaEnxZSTX/jc1Ij7ptr?= =?us-ascii?Q?Jm/GA6IpwOsdpHk1DkmABk3Qo4Ef34H7C7Udq+KlaF6QW1rkVcOwMfGG6CbB?= =?us-ascii?Q?1EW57aBLQBaqozDbNcgC5Ujt1/ccgUWM15X85uu0YT4C/KYy86jRPLMArxNB?= =?us-ascii?Q?d2EFQWkMkE57yQ14QdnXlezp?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR11MB4073.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: a6b14908-dfbe-48f7-c970-08d8ccaa5a9b X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Feb 2021 03:25:30.8621 (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: L6BAhJJgGs8fFBWKYkRfOQ6HqE/waTzEqFLCD4BpnfTLDXnkJc4fh+AQJbUp9lT7itq5lEuXdfpT1L7sHpDlBQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB3418 Return-Path: bob.c.feng@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Matt, I helped to convert the endling character for those PosixLike scripts and c= reated a PR https://github.com/tianocore/edk2/pull/1415 Liming, I verified the your pervious comments on this patch. Thanks, Bob -----Original Message----- From: Chen, Christine =20 Sent: Tuesday, February 9, 2021 10:32 AM To: matthewfcarlson@gmail.com; devel@edk2.groups.io Cc: Feng, Bob C ; Liming Gao Subject: RE: [PATCH v5 1/1] BaseTools: Use pip module if available, CI uses= it by default Reviewed-by: Yuwei Chen > -----Original Message----- > From: matthewfcarlson@gmail.com > Sent: Tuesday, February 9, 2021 8:51 AM > To: devel@edk2.groups.io > Cc: Feng, Bob C ; Liming Gao > ; Chen, Christine ; > Matthew Carlson > Subject: [PATCH v5 1/1] BaseTools: Use pip module if available, CI uses i= t by > default >=20 > From: Matthew Carlson >=20 > Use the new edk2-basetools pip module. > Includes a helpful message in setup to let users know which has been > selected. >=20 > Cc: Bob Feng > Cc: Liming Gao > Cc: Yuwei Chen >=20 > Reviewed-by: Bob Feng >=20 > Signed-off-by: Matthew Carlson > --- > .pytool/CISettings.py = | 51 > +++++++++++++++----- > BaseTools/BinPipWrappers/PosixLike/AmlToC = | 14 > ++++++ > BaseTools/BinPipWrappers/PosixLike/BPDG = | 12 > +++++ > BaseTools/BinPipWrappers/PosixLike/BrotliCompress = | > 34 +++++++++++++ > BaseTools/BinPipWrappers/PosixLike/DevicePath = | 29 > +++++++++++ > BaseTools/BinPipWrappers/PosixLike/Ecc = | 13 > +++++ > BaseTools/BinPipWrappers/PosixLike/EfiRom = | 29 > +++++++++++ > BaseTools/BinPipWrappers/PosixLike/GenCrc32 = | 29 > +++++++++++ > BaseTools/BinPipWrappers/PosixLike/GenDepex = | 12 > +++++ > BaseTools/BinPipWrappers/PosixLike/GenFds = | 12 > +++++ > BaseTools/BinPipWrappers/PosixLike/GenFfs = | 29 > +++++++++++ > BaseTools/BinPipWrappers/PosixLike/GenFv = | 29 > +++++++++++ > BaseTools/BinPipWrappers/PosixLike/GenFw = | 29 > +++++++++++ > BaseTools/BinPipWrappers/PosixLike/GenPatchPcdTable = | > 12 +++++ > BaseTools/BinPipWrappers/PosixLike/GenSec = | 29 > +++++++++++ > BaseTools/BinPipWrappers/PosixLike/GenerateCapsule = | > 12 +++++ > BaseTools/BinPipWrappers/PosixLike/LzmaCompress = | > 29 +++++++++++ > BaseTools/BinPipWrappers/PosixLike/LzmaF86Compress = | > 19 ++++++++ > BaseTools/BinPipWrappers/PosixLike/PatchPcdValue = | 12 > +++++ > BaseTools/BinPipWrappers/PosixLike/Pkcs7Sign = | 12 > +++++ > BaseTools/BinPipWrappers/PosixLike/Rsa2048Sha256GenerateKeys > | 12 +++++ > BaseTools/BinPipWrappers/PosixLike/Rsa2048Sha256Sign = | > 12 +++++ > BaseTools/BinPipWrappers/PosixLike/Split = | 29 > +++++++++++ > BaseTools/BinPipWrappers/PosixLike/TargetTool = | 12 > +++++ > BaseTools/BinPipWrappers/PosixLike/TianoCompress = | > 29 +++++++++++ > BaseTools/BinPipWrappers/PosixLike/Trim = | 13 > +++++ > BaseTools/BinPipWrappers/PosixLike/UPT = | 12 > +++++ > BaseTools/BinPipWrappers/PosixLike/VfrCompile = | 29 > +++++++++++ > BaseTools/BinPipWrappers/PosixLike/VolInfo = | 29 > +++++++++++ > BaseTools/BinPipWrappers/PosixLike/build = | 12 > +++++ > BaseTools/{BinWrappers =3D> > BinPipWrappers}/PosixLike/posix_path_env.yaml | 21 ++++---- > BaseTools/BinPipWrappers/WindowsLike/AmlToC.bat = | > 3 ++ > BaseTools/BinPipWrappers/WindowsLike/BPDG.bat = | > 3 ++ > BaseTools/BinPipWrappers/WindowsLike/Ecc.bat = | 3 > ++ > BaseTools/BinPipWrappers/WindowsLike/GenDepex.bat > | 3 ++ > BaseTools/BinPipWrappers/WindowsLike/GenFds.bat = | > 3 ++ > BaseTools/BinPipWrappers/WindowsLike/GenPatchPcdTable.bat > | 3 ++ > BaseTools/BinPipWrappers/WindowsLike/GenerateCapsule.bat > | 1 + > BaseTools/BinPipWrappers/WindowsLike/PatchPcdValue.bat > | 3 ++ > BaseTools/BinPipWrappers/WindowsLike/Pkcs7Sign.bat = | > 3 ++ > BaseTools/BinPipWrappers/WindowsLike/Rsa2048Sha256GenerateKeys.bat > | 1 + > BaseTools/BinPipWrappers/WindowsLike/Rsa2048Sha256Sign.bat > | 3 ++ > BaseTools/BinPipWrappers/WindowsLike/Split.bat = | 3 > ++ > BaseTools/BinPipWrappers/WindowsLike/TargetTool.bat = | > 3 ++ > BaseTools/BinPipWrappers/WindowsLike/Trim.bat = | 3 > ++ > BaseTools/BinPipWrappers/WindowsLike/UPT.bat = | 3 > ++ > BaseTools/BinPipWrappers/WindowsLike/build.bat = | 3 > ++ > BaseTools/{BinWrappers =3D> > BinPipWrappers}/WindowsLike/win_build_tools_path_env.yaml | 3 +- > BaseTools/BinWrappers/PosixLike/posix_path_env.yaml = | > 1 + > BaseTools/BinWrappers/WindowsLike/win_build_tools_path_env.yaml > | 1 + > BaseTools/BuildEnv = | 14 +++++- > BaseTools/Scripts/PatchCheck.py = | 1 + > BaseTools/Source/Python/README.md = | 29 > +++++++++++ > BaseTools/toolsetup.bat = | 19 ++++++++ > pip-requirements.txt = | 1 + > 55 files changed, 745 insertions(+), 25 deletions(-) >=20 > diff --git a/.pytool/CISettings.py b/.pytool/CISettings.py index > e6c5ac700ab2..5f71eca1992e 100644 > --- a/.pytool/CISettings.py > +++ b/.pytool/CISettings.py > @@ -22,16 +22,24 @@ class Settings(CiBuildSettingsManager, > UpdateSettingsManager, SetupSettingsManag > self.ActualTargets =3D [] self.ActualArchitectures =3D [= ] > self.ActualToolChainTag =3D ""+ self.UseBuiltInBaseTools =3D None+ > self.ActualScopes =3D None # > ################################################################ > ####################### # # Extra CmdLine > configuration # # > ################################################################ > ####################### # def AddCommandLineOptions(self, > parserObj):- pass+ group =3D > parserObj.add_mutually_exclusive_group()+ group.add_argument("- > force_piptools", "--fpt", dest=3D"force_piptools", action=3D"store_true", > default=3DFalse, help=3D"Force the system to use pip tools")+ > group.add_argument("-no_piptools", "--npt", dest=3D"no_piptools", > action=3D"store_true", default=3DFalse, help=3D"Force the system to not u= se pip > tools") def RetrieveCommandLineOptions(self, args):- pass+ > super().RetrieveCommandLineOptions(args)+ if args.force_piptools:+ > self.UseBuiltInBaseTools =3D True+ if args.no_piptools:+ > self.UseBuiltInBaseTools =3D False # > ################################################################ > ####################### # # Default Support fo= r this Ci > Build #@@ -128,19 +136,38 @@ class > Settings(CiBuildSettingsManager, UpdateSettingsManager, > SetupSettingsManag > def GetActiveScopes(self): ''' return tuple containing scop= es that > should be active for this process '''- scopes =3D ("cibuild", "edk= 2-build", > "host-based-test")+ if self.ActualScopes is None:+ scop= es =3D > ("cibuild", "edk2-build", "host-based-test") - self.ActualToolChai= nTag =3D > shell_environment.GetBuildVars().GetValue("TOOL_CHAIN_TAG", "")+ > self.ActualToolChainTag =3D > shell_environment.GetBuildVars().GetValue("TOOL_CHAIN_TAG", "") - = if > GetHostInfo().os.upper() =3D=3D "LINUX" and > self.ActualToolChainTag.upper().startswith("GCC"):- if "AARCH6= 4" in > self.ActualArchitectures:- scopes +=3D ("gcc_aarch64_linux= ",)- if > "ARM" in self.ActualArchitectures:- scopes +=3D ("gcc_arm_= linux",)- > if "RISCV64" in self.ActualArchitectures:- scopes +=3D > ("gcc_riscv64_unknown",)+ is_linux =3D GetHostInfo().os.upper(= ) =3D=3D > "LINUX" - return scopes+ if self.UseBuiltInBaseTools is= None:+ > is_linux =3D GetHostInfo().os.upper() =3D=3D "LINUX"+ # tr= y and import the > pip module for basetools+ try:+ import = edk2basetools+ > self.UseBuiltInBaseTools =3D True+ except ImportError:+ > self.UseBuiltInBaseTools =3D False+ pass++ = if > self.UseBuiltInBaseTools =3D=3D True:+ scopes +=3D ('pipbu= ild-unix',) if > is_linux else ('pipbuild-win',)+ logging.warning("Using Pi= p Tools > based BaseTools")+ else:+ logging.warning("Fall= ing back to > using in-tree BaseTools")++ if is_linux and > self.ActualToolChainTag.upper().startswith("GCC"):+ if "AA= RCH64" in > self.ActualArchitectures:+ scopes +=3D ("gcc_aarch64_l= inux",)+ > if "ARM" in self.ActualArchitectures:+ scopes +=3D > ("gcc_arm_linux",)+ if "RISCV64" in self.ActualArchitectur= es:+ > scopes +=3D ("gcc_riscv64_unknown",)+ self.ActualScopes =3D sc= opes+ > return self.ActualScopes def GetRequiredSubmodules(self): ''= ' return > iterable containing RequiredSubmodule objects.diff --git > a/BaseTools/BinPipWrappers/PosixLike/AmlToC > b/BaseTools/BinPipWrappers/PosixLike/AmlToC > new file mode 100755 > index 000000000000..1dd28e966288 > --- /dev/null > +++ b/BaseTools/BinPipWrappers/PosixLike/AmlToC > @@ -0,0 +1,14 @@ > +#!/usr/bin/env bash > +#python `dirname $0`/RunToolFromSource.py `basename $0` $* > + > +# If a ${PYTHON_COMMAND} command is available, use it in preference to > +python if command -v ${PYTHON_COMMAND} >/dev/null 2>&1; then > + python_exe=3D${PYTHON_COMMAND} > +fi > + > +full_cmd=3D${BASH_SOURCE:-$0} # see > +http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is > +not a good choice here dir=3D$(dirname "$full_cmd") exe=3D$(basename > +"$full_cmd") > + > +export > PYTHONPATH=3D"$dir/../../Source/Python${PYTHONPATH:+:"$PYTHONPATH"}" > +exec "${python_exe:-python}" "$dir/../../Source/Python/$exe/$exe.py" > "$@" > diff --git a/BaseTools/BinPipWrappers/PosixLike/BPDG > b/BaseTools/BinPipWrappers/PosixLike/BPDG > new file mode 100755 > index 000000000000..a08cbd8de5c5 > --- /dev/null > +++ b/BaseTools/BinPipWrappers/PosixLike/BPDG > @@ -0,0 +1,12 @@ > +#!/usr/bin/env bash > +#python `dirname $0`/RunToolFromSource.py `basename $0` $* > + > +# If a ${PYTHON_COMMAND} command is available, use it in preference to > +python if command -v ${PYTHON_COMMAND} >/dev/null 2>&1; then > + python_exe=3D${PYTHON_COMMAND} > +fi > + > +full_cmd=3D${BASH_SOURCE:-$0} # see > +http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is > +not a good choice here cmd=3D${full_cmd##*/} > + > +exec "${python_exe:-python}" -m edk2basetools.$cmd.EccMain "$@" > diff --git a/BaseTools/BinPipWrappers/PosixLike/BrotliCompress > b/BaseTools/BinPipWrappers/PosixLike/BrotliCompress > new file mode 100755 > index 000000000000..663860bb3e57 > --- /dev/null > +++ b/BaseTools/BinPipWrappers/PosixLike/BrotliCompress > @@ -0,0 +1,34 @@ > +#!/usr/bin/env bash > +# > +# This script will exec Brotli tool with -e/-d options. > +# > +# Copyright (c) 2017 - 2018, Intel Corporation. All rights > +reserved.
# SPDX-License-Identifier: BSD-2-Clause-Patent # QLT=3D"-q > +9 -w 22" > +ARGS=3D > + > +while test $# -gt 0 > +do > + case $1 in > + -e) > + ;; > + -d) > + ARGS+=3D"$1 " > + ;; > + -o|-g) > + ARGS+=3D"$1 $2 " > + shift > + ;; > + -q) > + QLT=3D"$1 $2 " > + shift > + ;; > + *) > + ARGS+=3D"$1 " > + ;; > + esac > + shift > +done > + > +exec Brotli $QLT $ARGS > diff --git a/BaseTools/BinPipWrappers/PosixLike/DevicePath > b/BaseTools/BinPipWrappers/PosixLike/DevicePath > new file mode 100755 > index 000000000000..0945d86d9209 > --- /dev/null > +++ b/BaseTools/BinPipWrappers/PosixLike/DevicePath > @@ -0,0 +1,29 @@ > +#!/usr/bin/env bash > + > +full_cmd=3D${BASH_SOURCE:-$0} # see > +http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is > +not a good choice here dir=3D$(dirname "$full_cmd") cmd=3D${full_cmd##*/= } > + > +if [ -n "$WORKSPACE" ] && [ -e "$WORKSPACE/Conf/BaseToolsCBinaries" ] > +then > + exec "$WORKSPACE/Conf/BaseToolsCBinaries/$cmd" > +elif [ -n "$WORKSPACE" ] && [ -e "$EDK_TOOLS_PATH/Source/C" ] then > + if [ ! -e "$EDK_TOOLS_PATH/Source/C/bin/$cmd" ] > + then > + echo "BaseTools C Tool binary was not found ($cmd)" > + echo "You may need to run:" > + echo " make -C $EDK_TOOLS_PATH/Source/C" > + else > + exec "$EDK_TOOLS_PATH/Source/C/bin/$cmd" "$@" > + fi > +elif [ -e "$dir/../../Source/C/bin/$cmd" ] then > + exec "$dir/../../Source/C/bin/$cmd" "$@" > +else > + echo "Unable to find the real '$cmd' to run" > + echo "This message was printed by" > + echo " $0" > + exit 127 > +fi > + > diff --git a/BaseTools/BinPipWrappers/PosixLike/Ecc > b/BaseTools/BinPipWrappers/PosixLike/Ecc > new file mode 100755 > index 000000000000..598728915095 > --- /dev/null > +++ b/BaseTools/BinPipWrappers/PosixLike/Ecc > @@ -0,0 +1,13 @@ > +#!/usr/bin/env bash > +#python `dirname $0`/RunToolFromSource.py `basename $0` $* > + > +# If a ${PYTHON_COMMAND} command is available, use it in preference to > +python if command -v ${PYTHON_COMMAND} >/dev/null 2>&1; then > + python_exe=3D${PYTHON_COMMAND} > +fi > + > +full_cmd=3D${BASH_SOURCE:-$0} # see > +http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is > +not a good choice here cmd=3D${full_cmd##*/} > + > +export > PYTHONPATH=3D"$dir/../../Source/Python${PYTHONPATH:+:"$PYTHONPATH"}" > +exec "${python_exe:-python}" -m $cmd.EccMain "$@" > diff --git a/BaseTools/BinPipWrappers/PosixLike/EfiRom > b/BaseTools/BinPipWrappers/PosixLike/EfiRom > new file mode 100755 > index 000000000000..0945d86d9209 > --- /dev/null > +++ b/BaseTools/BinPipWrappers/PosixLike/EfiRom > @@ -0,0 +1,29 @@ > +#!/usr/bin/env bash > + > +full_cmd=3D${BASH_SOURCE:-$0} # see > +http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is > +not a good choice here dir=3D$(dirname "$full_cmd") cmd=3D${full_cmd##*/= } > + > +if [ -n "$WORKSPACE" ] && [ -e "$WORKSPACE/Conf/BaseToolsCBinaries" ] > +then > + exec "$WORKSPACE/Conf/BaseToolsCBinaries/$cmd" > +elif [ -n "$WORKSPACE" ] && [ -e "$EDK_TOOLS_PATH/Source/C" ] then > + if [ ! -e "$EDK_TOOLS_PATH/Source/C/bin/$cmd" ] > + then > + echo "BaseTools C Tool binary was not found ($cmd)" > + echo "You may need to run:" > + echo " make -C $EDK_TOOLS_PATH/Source/C" > + else > + exec "$EDK_TOOLS_PATH/Source/C/bin/$cmd" "$@" > + fi > +elif [ -e "$dir/../../Source/C/bin/$cmd" ] then > + exec "$dir/../../Source/C/bin/$cmd" "$@" > +else > + echo "Unable to find the real '$cmd' to run" > + echo "This message was printed by" > + echo " $0" > + exit 127 > +fi > + > diff --git a/BaseTools/BinPipWrappers/PosixLike/GenCrc32 > b/BaseTools/BinPipWrappers/PosixLike/GenCrc32 > new file mode 100755 > index 000000000000..0945d86d9209 > --- /dev/null > +++ b/BaseTools/BinPipWrappers/PosixLike/GenCrc32 > @@ -0,0 +1,29 @@ > +#!/usr/bin/env bash > + > +full_cmd=3D${BASH_SOURCE:-$0} # see > +http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is > +not a good choice here dir=3D$(dirname "$full_cmd") cmd=3D${full_cmd##*/= } > + > +if [ -n "$WORKSPACE" ] && [ -e "$WORKSPACE/Conf/BaseToolsCBinaries" ] > +then > + exec "$WORKSPACE/Conf/BaseToolsCBinaries/$cmd" > +elif [ -n "$WORKSPACE" ] && [ -e "$EDK_TOOLS_PATH/Source/C" ] then > + if [ ! -e "$EDK_TOOLS_PATH/Source/C/bin/$cmd" ] > + then > + echo "BaseTools C Tool binary was not found ($cmd)" > + echo "You may need to run:" > + echo " make -C $EDK_TOOLS_PATH/Source/C" > + else > + exec "$EDK_TOOLS_PATH/Source/C/bin/$cmd" "$@" > + fi > +elif [ -e "$dir/../../Source/C/bin/$cmd" ] then > + exec "$dir/../../Source/C/bin/$cmd" "$@" > +else > + echo "Unable to find the real '$cmd' to run" > + echo "This message was printed by" > + echo " $0" > + exit 127 > +fi > + > diff --git a/BaseTools/BinPipWrappers/PosixLike/GenDepex > b/BaseTools/BinPipWrappers/PosixLike/GenDepex > new file mode 100755 > index 000000000000..df75e43f9ec1 > --- /dev/null > +++ b/BaseTools/BinPipWrappers/PosixLike/GenDepex > @@ -0,0 +1,12 @@ > +#!/usr/bin/env bash > +#python `dirname $0`/RunToolFromSource.py `basename $0` $* > + > +# If a ${PYTHON_COMMAND} command is available, use it in preference to > +python if command -v ${PYTHON_COMMAND} >/dev/null 2>&1; then > + python_exe=3D${PYTHON_COMMAND} > +fi > + > +full_cmd=3D${BASH_SOURCE:-$0} # see > +http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is > +not a good choice here cmd=3D${full_cmd##*/} > + > +exec "${python_exe:-python}" -m edk2basetools.AutoGen.$cmd "$@" > diff --git a/BaseTools/BinPipWrappers/PosixLike/GenFds > b/BaseTools/BinPipWrappers/PosixLike/GenFds > new file mode 100755 > index 000000000000..b27e84eaa210 > --- /dev/null > +++ b/BaseTools/BinPipWrappers/PosixLike/GenFds > @@ -0,0 +1,12 @@ > +#!/usr/bin/env bash > +#python `dirname $0`/RunToolFromSource.py `basename $0` $* > + > +# If a ${PYTHON_COMMAND} command is available, use it in preference to > +python if command -v ${PYTHON_COMMAND} >/dev/null 2>&1; then > + python_exe=3D${PYTHON_COMMAND} > +fi > + > +full_cmd=3D${BASH_SOURCE:-$0} # see > +http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is > +not a good choice here cmd=3D${full_cmd##*/} > + > +exec "${python_exe:-python}" -m edk2basetools.$cmd "$@" > diff --git a/BaseTools/BinPipWrappers/PosixLike/GenFfs > b/BaseTools/BinPipWrappers/PosixLike/GenFfs > new file mode 100755 > index 000000000000..0945d86d9209 > --- /dev/null > +++ b/BaseTools/BinPipWrappers/PosixLike/GenFfs > @@ -0,0 +1,29 @@ > +#!/usr/bin/env bash > + > +full_cmd=3D${BASH_SOURCE:-$0} # see > +http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is > +not a good choice here dir=3D$(dirname "$full_cmd") cmd=3D${full_cmd##*/= } > + > +if [ -n "$WORKSPACE" ] && [ -e "$WORKSPACE/Conf/BaseToolsCBinaries" ] > +then > + exec "$WORKSPACE/Conf/BaseToolsCBinaries/$cmd" > +elif [ -n "$WORKSPACE" ] && [ -e "$EDK_TOOLS_PATH/Source/C" ] then > + if [ ! -e "$EDK_TOOLS_PATH/Source/C/bin/$cmd" ] > + then > + echo "BaseTools C Tool binary was not found ($cmd)" > + echo "You may need to run:" > + echo " make -C $EDK_TOOLS_PATH/Source/C" > + else > + exec "$EDK_TOOLS_PATH/Source/C/bin/$cmd" "$@" > + fi > +elif [ -e "$dir/../../Source/C/bin/$cmd" ] then > + exec "$dir/../../Source/C/bin/$cmd" "$@" > +else > + echo "Unable to find the real '$cmd' to run" > + echo "This message was printed by" > + echo " $0" > + exit 127 > +fi > + > diff --git a/BaseTools/BinPipWrappers/PosixLike/GenFv > b/BaseTools/BinPipWrappers/PosixLike/GenFv > new file mode 100755 > index 000000000000..0945d86d9209 > --- /dev/null > +++ b/BaseTools/BinPipWrappers/PosixLike/GenFv > @@ -0,0 +1,29 @@ > +#!/usr/bin/env bash > + > +full_cmd=3D${BASH_SOURCE:-$0} # see > +http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is > +not a good choice here dir=3D$(dirname "$full_cmd") cmd=3D${full_cmd##*/= } > + > +if [ -n "$WORKSPACE" ] && [ -e "$WORKSPACE/Conf/BaseToolsCBinaries" ] > +then > + exec "$WORKSPACE/Conf/BaseToolsCBinaries/$cmd" > +elif [ -n "$WORKSPACE" ] && [ -e "$EDK_TOOLS_PATH/Source/C" ] then > + if [ ! -e "$EDK_TOOLS_PATH/Source/C/bin/$cmd" ] > + then > + echo "BaseTools C Tool binary was not found ($cmd)" > + echo "You may need to run:" > + echo " make -C $EDK_TOOLS_PATH/Source/C" > + else > + exec "$EDK_TOOLS_PATH/Source/C/bin/$cmd" "$@" > + fi > +elif [ -e "$dir/../../Source/C/bin/$cmd" ] then > + exec "$dir/../../Source/C/bin/$cmd" "$@" > +else > + echo "Unable to find the real '$cmd' to run" > + echo "This message was printed by" > + echo " $0" > + exit 127 > +fi > + > diff --git a/BaseTools/BinPipWrappers/PosixLike/GenFw > b/BaseTools/BinPipWrappers/PosixLike/GenFw > new file mode 100755 > index 000000000000..0945d86d9209 > --- /dev/null > +++ b/BaseTools/BinPipWrappers/PosixLike/GenFw > @@ -0,0 +1,29 @@ > +#!/usr/bin/env bash > + > +full_cmd=3D${BASH_SOURCE:-$0} # see > +http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is > +not a good choice here dir=3D$(dirname "$full_cmd") cmd=3D${full_cmd##*/= } > + > +if [ -n "$WORKSPACE" ] && [ -e "$WORKSPACE/Conf/BaseToolsCBinaries" ] > +then > + exec "$WORKSPACE/Conf/BaseToolsCBinaries/$cmd" > +elif [ -n "$WORKSPACE" ] && [ -e "$EDK_TOOLS_PATH/Source/C" ] then > + if [ ! -e "$EDK_TOOLS_PATH/Source/C/bin/$cmd" ] > + then > + echo "BaseTools C Tool binary was not found ($cmd)" > + echo "You may need to run:" > + echo " make -C $EDK_TOOLS_PATH/Source/C" > + else > + exec "$EDK_TOOLS_PATH/Source/C/bin/$cmd" "$@" > + fi > +elif [ -e "$dir/../../Source/C/bin/$cmd" ] then > + exec "$dir/../../Source/C/bin/$cmd" "$@" > +else > + echo "Unable to find the real '$cmd' to run" > + echo "This message was printed by" > + echo " $0" > + exit 127 > +fi > + > diff --git a/BaseTools/BinPipWrappers/PosixLike/GenPatchPcdTable > b/BaseTools/BinPipWrappers/PosixLike/GenPatchPcdTable > new file mode 100755 > index 000000000000..9d143c7fc6c2 > --- /dev/null > +++ b/BaseTools/BinPipWrappers/PosixLike/GenPatchPcdTable > @@ -0,0 +1,12 @@ > +#!/usr/bin/env bash > +#python `dirname $0`/RunToolFromSource.py `basename $0` $* > + > +# If a ${PYTHON_COMMAND} command is available, use it in preference to > +python if command -v ${PYTHON_COMMAND} >/dev/null 2>&1; then > + python_exe=3D${PYTHON_COMMAND} > +fi > + > +full_cmd=3D${BASH_SOURCE:-$0} # see > +http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is > +not a good choice here cmd=3D${full_cmd##*/} > + > +exec "${python_exe:-python}" -m edk2basetools.$cmd.$cmd "$@" > diff --git a/BaseTools/BinPipWrappers/PosixLike/GenSec > b/BaseTools/BinPipWrappers/PosixLike/GenSec > new file mode 100755 > index 000000000000..0945d86d9209 > --- /dev/null > +++ b/BaseTools/BinPipWrappers/PosixLike/GenSec > @@ -0,0 +1,29 @@ > +#!/usr/bin/env bash > + > +full_cmd=3D${BASH_SOURCE:-$0} # see > +http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is > +not a good choice here dir=3D$(dirname "$full_cmd") cmd=3D${full_cmd##*/= } > + > +if [ -n "$WORKSPACE" ] && [ -e "$WORKSPACE/Conf/BaseToolsCBinaries" ] > +then > + exec "$WORKSPACE/Conf/BaseToolsCBinaries/$cmd" > +elif [ -n "$WORKSPACE" ] && [ -e "$EDK_TOOLS_PATH/Source/C" ] then > + if [ ! -e "$EDK_TOOLS_PATH/Source/C/bin/$cmd" ] > + then > + echo "BaseTools C Tool binary was not found ($cmd)" > + echo "You may need to run:" > + echo " make -C $EDK_TOOLS_PATH/Source/C" > + else > + exec "$EDK_TOOLS_PATH/Source/C/bin/$cmd" "$@" > + fi > +elif [ -e "$dir/../../Source/C/bin/$cmd" ] then > + exec "$dir/../../Source/C/bin/$cmd" "$@" > +else > + echo "Unable to find the real '$cmd' to run" > + echo "This message was printed by" > + echo " $0" > + exit 127 > +fi > + > diff --git a/BaseTools/BinPipWrappers/PosixLike/GenerateCapsule > b/BaseTools/BinPipWrappers/PosixLike/GenerateCapsule > new file mode 100755 > index 000000000000..366a268802c4 > --- /dev/null > +++ b/BaseTools/BinPipWrappers/PosixLike/GenerateCapsule > @@ -0,0 +1,12 @@ > +#!/usr/bin/env bash > +#python `dirname $0`/RunToolFromSource.py `basename $0` $* > + > +# If a ${PYTHON_COMMAND} command is available, use it in preference to > +python if command -v ${PYTHON_COMMAND} >/dev/null 2>&1; then > + python_exe=3D${PYTHON_COMMAND} > +fi > + > +full_cmd=3D${BASH_SOURCE:-$0} # see > +http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is > +not a good choice here cmd=3D${full_cmd##*/} > + > +exec "${python_exe:-python}" -m edk2basetools.Capsule.$cmd "$@" > diff --git a/BaseTools/BinPipWrappers/PosixLike/LzmaCompress > b/BaseTools/BinPipWrappers/PosixLike/LzmaCompress > new file mode 100755 > index 000000000000..0945d86d9209 > --- /dev/null > +++ b/BaseTools/BinPipWrappers/PosixLike/LzmaCompress > @@ -0,0 +1,29 @@ > +#!/usr/bin/env bash > + > +full_cmd=3D${BASH_SOURCE:-$0} # see > +http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is > +not a good choice here dir=3D$(dirname "$full_cmd") cmd=3D${full_cmd##*/= } > + > +if [ -n "$WORKSPACE" ] && [ -e "$WORKSPACE/Conf/BaseToolsCBinaries" ] > +then > + exec "$WORKSPACE/Conf/BaseToolsCBinaries/$cmd" > +elif [ -n "$WORKSPACE" ] && [ -e "$EDK_TOOLS_PATH/Source/C" ] then > + if [ ! -e "$EDK_TOOLS_PATH/Source/C/bin/$cmd" ] > + then > + echo "BaseTools C Tool binary was not found ($cmd)" > + echo "You may need to run:" > + echo " make -C $EDK_TOOLS_PATH/Source/C" > + else > + exec "$EDK_TOOLS_PATH/Source/C/bin/$cmd" "$@" > + fi > +elif [ -e "$dir/../../Source/C/bin/$cmd" ] then > + exec "$dir/../../Source/C/bin/$cmd" "$@" > +else > + echo "Unable to find the real '$cmd' to run" > + echo "This message was printed by" > + echo " $0" > + exit 127 > +fi > + > diff --git a/BaseTools/BinPipWrappers/PosixLike/LzmaF86Compress > b/BaseTools/BinPipWrappers/PosixLike/LzmaF86Compress > new file mode 100755 > index 000000000000..b55352ae4c79 > --- /dev/null > +++ b/BaseTools/BinPipWrappers/PosixLike/LzmaF86Compress > @@ -0,0 +1,19 @@ > +#!/usr/bin/env bash > +# > +# This script will exec LzmaCompress tool with --f86 option that enables > converter for x86 code. > +# > +# (C) Copyright 2016 Hewlett Packard Enterprise Development LP
# > +Copyright (c) 2012, Intel Corporation. All rights reserved.
# > +SPDX-License-Identifier: BSD-2-Clause-Patent # > + > +for arg; do > + case $arg in > + -e|-d) > + set -- "$@" --f86 > + break > + ;; > + esac > +done > + > +exec LzmaCompress "$@" > diff --git a/BaseTools/BinPipWrappers/PosixLike/PatchPcdValue > b/BaseTools/BinPipWrappers/PosixLike/PatchPcdValue > new file mode 100755 > index 000000000000..9d143c7fc6c2 > --- /dev/null > +++ b/BaseTools/BinPipWrappers/PosixLike/PatchPcdValue > @@ -0,0 +1,12 @@ > +#!/usr/bin/env bash > +#python `dirname $0`/RunToolFromSource.py `basename $0` $* > + > +# If a ${PYTHON_COMMAND} command is available, use it in preference to > +python if command -v ${PYTHON_COMMAND} >/dev/null 2>&1; then > + python_exe=3D${PYTHON_COMMAND} > +fi > + > +full_cmd=3D${BASH_SOURCE:-$0} # see > +http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is > +not a good choice here cmd=3D${full_cmd##*/} > + > +exec "${python_exe:-python}" -m edk2basetools.$cmd.$cmd "$@" > diff --git a/BaseTools/BinPipWrappers/PosixLike/Pkcs7Sign > b/BaseTools/BinPipWrappers/PosixLike/Pkcs7Sign > new file mode 100755 > index 000000000000..9d143c7fc6c2 > --- /dev/null > +++ b/BaseTools/BinPipWrappers/PosixLike/Pkcs7Sign > @@ -0,0 +1,12 @@ > +#!/usr/bin/env bash > +#python `dirname $0`/RunToolFromSource.py `basename $0` $* > + > +# If a ${PYTHON_COMMAND} command is available, use it in preference to > +python if command -v ${PYTHON_COMMAND} >/dev/null 2>&1; then > + python_exe=3D${PYTHON_COMMAND} > +fi > + > +full_cmd=3D${BASH_SOURCE:-$0} # see > +http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is > +not a good choice here cmd=3D${full_cmd##*/} > + > +exec "${python_exe:-python}" -m edk2basetools.$cmd.$cmd "$@" > diff --git > a/BaseTools/BinPipWrappers/PosixLike/Rsa2048Sha256GenerateKeys > b/BaseTools/BinPipWrappers/PosixLike/Rsa2048Sha256GenerateKeys > new file mode 100755 > index 000000000000..aca2f3a6fe2a > --- /dev/null > +++ b/BaseTools/BinPipWrappers/PosixLike/Rsa2048Sha256GenerateKeys > @@ -0,0 +1,12 @@ > +#!/usr/bin/env bash > +#python `dirname $0`/RunToolFromSource.py `basename $0` $* > + > +# If a ${PYTHON_COMMAND} command is available, use it in preference to > +python if command -v ${PYTHON_COMMAND} >/dev/null 2>&1; then > + python_exe=3D${PYTHON_COMMAND} > +fi > + > +full_cmd=3D${BASH_SOURCE:-$0} # see > +http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is > +not a good choice here cmd=3D${full_cmd##*/} > + > +exec "${python_exe:-python}" -m edk2basetools.Rsa2048Sha256Sign.$cmd > "$@" > diff --git a/BaseTools/BinPipWrappers/PosixLike/Rsa2048Sha256Sign > b/BaseTools/BinPipWrappers/PosixLike/Rsa2048Sha256Sign > new file mode 100755 > index 000000000000..068364070518 > --- /dev/null > +++ b/BaseTools/BinPipWrappers/PosixLike/Rsa2048Sha256Sign > @@ -0,0 +1,12 @@ > +#!/usr/bin/env bash > +#python `dirname $0`/RunToolFromSource.py `basename $0` $* > + > +# If a ${PYTHON_COMMAND} command is available, use it in preference to > +python if command -v ${PYTHON_COMMAND} >/dev/null 2>&1; then > + python_exe=3D${PYTHON_COMMAND} > +fi > + > +full_cmd=3D${BASH_SOURCE:-$0} # see > +http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is > +not a good choice here cmd=3D${full_cmd##*/} > + > +exec "${python_exe:-python}" -m edk2basetools.$cmd.$cmd "$@" > \ No newline at end of file > diff --git a/BaseTools/BinPipWrappers/PosixLike/Split > b/BaseTools/BinPipWrappers/PosixLike/Split > new file mode 100755 > index 000000000000..0945d86d9209 > --- /dev/null > +++ b/BaseTools/BinPipWrappers/PosixLike/Split > @@ -0,0 +1,29 @@ > +#!/usr/bin/env bash > + > +full_cmd=3D${BASH_SOURCE:-$0} # see > +http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is > +not a good choice here dir=3D$(dirname "$full_cmd") cmd=3D${full_cmd##*/= } > + > +if [ -n "$WORKSPACE" ] && [ -e "$WORKSPACE/Conf/BaseToolsCBinaries" ] > +then > + exec "$WORKSPACE/Conf/BaseToolsCBinaries/$cmd" > +elif [ -n "$WORKSPACE" ] && [ -e "$EDK_TOOLS_PATH/Source/C" ] then > + if [ ! -e "$EDK_TOOLS_PATH/Source/C/bin/$cmd" ] > + then > + echo "BaseTools C Tool binary was not found ($cmd)" > + echo "You may need to run:" > + echo " make -C $EDK_TOOLS_PATH/Source/C" > + else > + exec "$EDK_TOOLS_PATH/Source/C/bin/$cmd" "$@" > + fi > +elif [ -e "$dir/../../Source/C/bin/$cmd" ] then > + exec "$dir/../../Source/C/bin/$cmd" "$@" > +else > + echo "Unable to find the real '$cmd' to run" > + echo "This message was printed by" > + echo " $0" > + exit 127 > +fi > + > diff --git a/BaseTools/BinPipWrappers/PosixLike/TargetTool > b/BaseTools/BinPipWrappers/PosixLike/TargetTool > new file mode 100755 > index 000000000000..9d143c7fc6c2 > --- /dev/null > +++ b/BaseTools/BinPipWrappers/PosixLike/TargetTool > @@ -0,0 +1,12 @@ > +#!/usr/bin/env bash > +#python `dirname $0`/RunToolFromSource.py `basename $0` $* > + > +# If a ${PYTHON_COMMAND} command is available, use it in preference to > +python if command -v ${PYTHON_COMMAND} >/dev/null 2>&1; then > + python_exe=3D${PYTHON_COMMAND} > +fi > + > +full_cmd=3D${BASH_SOURCE:-$0} # see > +http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is > +not a good choice here cmd=3D${full_cmd##*/} > + > +exec "${python_exe:-python}" -m edk2basetools.$cmd.$cmd "$@" > diff --git a/BaseTools/BinPipWrappers/PosixLike/TianoCompress > b/BaseTools/BinPipWrappers/PosixLike/TianoCompress > new file mode 100755 > index 000000000000..0945d86d9209 > --- /dev/null > +++ b/BaseTools/BinPipWrappers/PosixLike/TianoCompress > @@ -0,0 +1,29 @@ > +#!/usr/bin/env bash > + > +full_cmd=3D${BASH_SOURCE:-$0} # see > +http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is > +not a good choice here dir=3D$(dirname "$full_cmd") cmd=3D${full_cmd##*/= } > + > +if [ -n "$WORKSPACE" ] && [ -e "$WORKSPACE/Conf/BaseToolsCBinaries" ] > +then > + exec "$WORKSPACE/Conf/BaseToolsCBinaries/$cmd" > +elif [ -n "$WORKSPACE" ] && [ -e "$EDK_TOOLS_PATH/Source/C" ] then > + if [ ! -e "$EDK_TOOLS_PATH/Source/C/bin/$cmd" ] > + then > + echo "BaseTools C Tool binary was not found ($cmd)" > + echo "You may need to run:" > + echo " make -C $EDK_TOOLS_PATH/Source/C" > + else > + exec "$EDK_TOOLS_PATH/Source/C/bin/$cmd" "$@" > + fi > +elif [ -e "$dir/../../Source/C/bin/$cmd" ] then > + exec "$dir/../../Source/C/bin/$cmd" "$@" > +else > + echo "Unable to find the real '$cmd' to run" > + echo "This message was printed by" > + echo " $0" > + exit 127 > +fi > + > diff --git a/BaseTools/BinPipWrappers/PosixLike/Trim > b/BaseTools/BinPipWrappers/PosixLike/Trim > new file mode 100755 > index 000000000000..0bd14ee03872 > --- /dev/null > +++ b/BaseTools/BinPipWrappers/PosixLike/Trim > @@ -0,0 +1,13 @@ > +#!/usr/bin/env bash > +#python `dirname $0`/RunToolFromSource.py `basename $0` $* > + > +# If a ${PYTHON_COMMAND} command is available, use it in preference to > +python if command -v ${PYTHON_COMMAND} >/dev/null 2>&1; then > + python_exe=3D${PYTHON_COMMAND} > +fi > + > +full_cmd=3D${BASH_SOURCE:-$0} # see > +http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is > +not a good choice here cmd=3D$(basename "$full_cmd") > + > +exec "${python_exe:-python}" -m edk2basetools.$cmd.$cmd "$@" > + > diff --git a/BaseTools/BinPipWrappers/PosixLike/UPT > b/BaseTools/BinPipWrappers/PosixLike/UPT > new file mode 100755 > index 000000000000..068364070518 > --- /dev/null > +++ b/BaseTools/BinPipWrappers/PosixLike/UPT > @@ -0,0 +1,12 @@ > +#!/usr/bin/env bash > +#python `dirname $0`/RunToolFromSource.py `basename $0` $* > + > +# If a ${PYTHON_COMMAND} command is available, use it in preference to > +python if command -v ${PYTHON_COMMAND} >/dev/null 2>&1; then > + python_exe=3D${PYTHON_COMMAND} > +fi > + > +full_cmd=3D${BASH_SOURCE:-$0} # see > +http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is > +not a good choice here cmd=3D${full_cmd##*/} > + > +exec "${python_exe:-python}" -m edk2basetools.$cmd.$cmd "$@" > \ No newline at end of file > diff --git a/BaseTools/BinPipWrappers/PosixLike/VfrCompile > b/BaseTools/BinPipWrappers/PosixLike/VfrCompile > new file mode 100755 > index 000000000000..0945d86d9209 > --- /dev/null > +++ b/BaseTools/BinPipWrappers/PosixLike/VfrCompile > @@ -0,0 +1,29 @@ > +#!/usr/bin/env bash > + > +full_cmd=3D${BASH_SOURCE:-$0} # see > +http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is > +not a good choice here dir=3D$(dirname "$full_cmd") cmd=3D${full_cmd##*/= } > + > +if [ -n "$WORKSPACE" ] && [ -e "$WORKSPACE/Conf/BaseToolsCBinaries" ] > +then > + exec "$WORKSPACE/Conf/BaseToolsCBinaries/$cmd" > +elif [ -n "$WORKSPACE" ] && [ -e "$EDK_TOOLS_PATH/Source/C" ] then > + if [ ! -e "$EDK_TOOLS_PATH/Source/C/bin/$cmd" ] > + then > + echo "BaseTools C Tool binary was not found ($cmd)" > + echo "You may need to run:" > + echo " make -C $EDK_TOOLS_PATH/Source/C" > + else > + exec "$EDK_TOOLS_PATH/Source/C/bin/$cmd" "$@" > + fi > +elif [ -e "$dir/../../Source/C/bin/$cmd" ] then > + exec "$dir/../../Source/C/bin/$cmd" "$@" > +else > + echo "Unable to find the real '$cmd' to run" > + echo "This message was printed by" > + echo " $0" > + exit 127 > +fi > + > diff --git a/BaseTools/BinPipWrappers/PosixLike/VolInfo > b/BaseTools/BinPipWrappers/PosixLike/VolInfo > new file mode 100755 > index 000000000000..0945d86d9209 > --- /dev/null > +++ b/BaseTools/BinPipWrappers/PosixLike/VolInfo > @@ -0,0 +1,29 @@ > +#!/usr/bin/env bash > + > +full_cmd=3D${BASH_SOURCE:-$0} # see > +http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is > +not a good choice here dir=3D$(dirname "$full_cmd") cmd=3D${full_cmd##*/= } > + > +if [ -n "$WORKSPACE" ] && [ -e "$WORKSPACE/Conf/BaseToolsCBinaries" ] > +then > + exec "$WORKSPACE/Conf/BaseToolsCBinaries/$cmd" > +elif [ -n "$WORKSPACE" ] && [ -e "$EDK_TOOLS_PATH/Source/C" ] then > + if [ ! -e "$EDK_TOOLS_PATH/Source/C/bin/$cmd" ] > + then > + echo "BaseTools C Tool binary was not found ($cmd)" > + echo "You may need to run:" > + echo " make -C $EDK_TOOLS_PATH/Source/C" > + else > + exec "$EDK_TOOLS_PATH/Source/C/bin/$cmd" "$@" > + fi > +elif [ -e "$dir/../../Source/C/bin/$cmd" ] then > + exec "$dir/../../Source/C/bin/$cmd" "$@" > +else > + echo "Unable to find the real '$cmd' to run" > + echo "This message was printed by" > + echo " $0" > + exit 127 > +fi > + > diff --git a/BaseTools/BinPipWrappers/PosixLike/build > b/BaseTools/BinPipWrappers/PosixLike/build > new file mode 100755 > index 000000000000..9d143c7fc6c2 > --- /dev/null > +++ b/BaseTools/BinPipWrappers/PosixLike/build > @@ -0,0 +1,12 @@ > +#!/usr/bin/env bash > +#python `dirname $0`/RunToolFromSource.py `basename $0` $* > + > +# If a ${PYTHON_COMMAND} command is available, use it in preference to > +python if command -v ${PYTHON_COMMAND} >/dev/null 2>&1; then > + python_exe=3D${PYTHON_COMMAND} > +fi > + > +full_cmd=3D${BASH_SOURCE:-$0} # see > +http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is > +not a good choice here cmd=3D${full_cmd##*/} > + > +exec "${python_exe:-python}" -m edk2basetools.$cmd.$cmd "$@" > diff --git a/BaseTools/BinWrappers/PosixLike/posix_path_env.yaml > b/BaseTools/BinPipWrappers/PosixLike/posix_path_env.yaml > similarity index 74% > copy from BaseTools/BinWrappers/PosixLike/posix_path_env.yaml > copy to BaseTools/BinPipWrappers/PosixLike/posix_path_env.yaml > index 8b32e010bb1d..830670305c0c 100644 > --- a/BaseTools/BinWrappers/PosixLike/posix_path_env.yaml > +++ b/BaseTools/BinPipWrappers/PosixLike/posix_path_env.yaml > @@ -1,10 +1,11 @@ > -## @file-# Set this folder on the path for all linux builds-#-# Copyrigh= t (c) > Microsoft Corporation.-# SPDX-License-Identifier: BSD-2-Clause-Patent-##-= {- > "scope": "global-nix",- "flags": ["set_path"]-}+## @file > +# Set this folder on the path for all linux builds # # Copyright (c) > +Microsoft Corporation. > +# SPDX-License-Identifier: BSD-2-Clause-Patent ## { > + "scope": "pipbuild-unix", > + "override_id": "binwrappers", > + "flags": ["set_path"] > +} > diff --git a/BaseTools/BinPipWrappers/WindowsLike/AmlToC.bat > b/BaseTools/BinPipWrappers/WindowsLike/AmlToC.bat > new file mode 100644 > index 000000000000..d347d6484467 > --- /dev/null > +++ b/BaseTools/BinPipWrappers/WindowsLike/AmlToC.bat > @@ -0,0 +1,3 @@ > +@setlocal+@set ToolName=3D%~n0%+@%PYTHON_COMMAND% -m > +edk2basetools.%ToolName%.%ToolName% %*diff --git > +a/BaseTools/BinPipWrappers/WindowsLike/BPDG.bat > +b/BaseTools/BinPipWrappers/WindowsLike/BPDG.bat > new file mode 100644 > index 000000000000..d347d6484467 > --- /dev/null > +++ b/BaseTools/BinPipWrappers/WindowsLike/BPDG.bat > @@ -0,0 +1,3 @@ > +@setlocal+@set ToolName=3D%~n0%+@%PYTHON_COMMAND% -m > +edk2basetools.%ToolName%.%ToolName% %*diff --git > +a/BaseTools/BinPipWrappers/WindowsLike/Ecc.bat > +b/BaseTools/BinPipWrappers/WindowsLike/Ecc.bat > new file mode 100644 > index 000000000000..16a0a799a43b > --- /dev/null > +++ b/BaseTools/BinPipWrappers/WindowsLike/Ecc.bat > @@ -0,0 +1,3 @@ > +@setlocal+@set ToolName=3D%~n0%+@%PYTHON_COMMAND% -m > +edk2basetools.%ToolName%.EccMain %*diff --git > +a/BaseTools/BinPipWrappers/WindowsLike/GenDepex.bat > +b/BaseTools/BinPipWrappers/WindowsLike/GenDepex.bat > new file mode 100644 > index 000000000000..481b5ac47d24 > --- /dev/null > +++ b/BaseTools/BinPipWrappers/WindowsLike/GenDepex.bat > @@ -0,0 +1,3 @@ > +@setlocal+@set ToolName=3D%~n0%+@%PYTHON_COMMAND% -m > +edk2basetools.AutoGen.%ToolName% %*diff --git > +a/BaseTools/BinPipWrappers/WindowsLike/GenFds.bat > +b/BaseTools/BinPipWrappers/WindowsLike/GenFds.bat > new file mode 100644 > index 000000000000..d347d6484467 > --- /dev/null > +++ b/BaseTools/BinPipWrappers/WindowsLike/GenFds.bat > @@ -0,0 +1,3 @@ > +@setlocal+@set ToolName=3D%~n0%+@%PYTHON_COMMAND% -m > +edk2basetools.%ToolName%.%ToolName% %*diff --git > +a/BaseTools/BinPipWrappers/WindowsLike/GenPatchPcdTable.bat > +b/BaseTools/BinPipWrappers/WindowsLike/GenPatchPcdTable.bat > new file mode 100644 > index 000000000000..d347d6484467 > --- /dev/null > +++ b/BaseTools/BinPipWrappers/WindowsLike/GenPatchPcdTable.bat > @@ -0,0 +1,3 @@ > +@setlocal+@set ToolName=3D%~n0%+@%PYTHON_COMMAND% -m > +edk2basetools.%ToolName%.%ToolName% %*diff --git > +a/BaseTools/BinPipWrappers/WindowsLike/GenerateCapsule.bat > +b/BaseTools/BinPipWrappers/WindowsLike/GenerateCapsule.bat > new file mode 100644 > index 000000000000..34c43ac7fc99 > --- /dev/null > +++ b/BaseTools/BinPipWrappers/WindowsLike/GenerateCapsule.bat > @@ -0,0 +1 @@ > +@%PYTHON_COMMAND% -m > edk2basetools.Capsule.GenerateCapsule %*diff --git > +a/BaseTools/BinPipWrappers/WindowsLike/PatchPcdValue.bat > +b/BaseTools/BinPipWrappers/WindowsLike/PatchPcdValue.bat > new file mode 100644 > index 000000000000..d347d6484467 > --- /dev/null > +++ b/BaseTools/BinPipWrappers/WindowsLike/PatchPcdValue.bat > @@ -0,0 +1,3 @@ > +@setlocal+@set ToolName=3D%~n0%+@%PYTHON_COMMAND% -m > +edk2basetools.%ToolName%.%ToolName% %*diff --git > +a/BaseTools/BinPipWrappers/WindowsLike/Pkcs7Sign.bat > +b/BaseTools/BinPipWrappers/WindowsLike/Pkcs7Sign.bat > new file mode 100644 > index 000000000000..d347d6484467 > --- /dev/null > +++ b/BaseTools/BinPipWrappers/WindowsLike/Pkcs7Sign.bat > @@ -0,0 +1,3 @@ > +@setlocal+@set ToolName=3D%~n0%+@%PYTHON_COMMAND% -m > +edk2basetools.%ToolName%.%ToolName% %*diff --git > +a/BaseTools/BinPipWrappers/WindowsLike/Rsa2048Sha256GenerateKeys.b > at > +b/BaseTools/BinPipWrappers/WindowsLike/Rsa2048Sha256GenerateKeys. > bat > new file mode 100644 > index 000000000000..cdc2e3ea373d > --- /dev/null > +++ > b/BaseTools/BinPipWrappers/WindowsLike/Rsa2048Sha256GenerateKeys.b > at > @@ -0,0 +1 @@ > +@%PYTHON_COMMAND% -m > +edk2basetools.Rsa2048Sha256Sign.Rsa2048Sha256GenerateKeys %*diff -- > git > +a/BaseTools/BinPipWrappers/WindowsLike/Rsa2048Sha256Sign.bat > +b/BaseTools/BinPipWrappers/WindowsLike/Rsa2048Sha256Sign.bat > new file mode 100644 > index 000000000000..d347d6484467 > --- /dev/null > +++ b/BaseTools/BinPipWrappers/WindowsLike/Rsa2048Sha256Sign.bat > @@ -0,0 +1,3 @@ > +@setlocal+@set ToolName=3D%~n0%+@%PYTHON_COMMAND% -m > +edk2basetools.%ToolName%.%ToolName% %*diff --git > +a/BaseTools/BinPipWrappers/WindowsLike/Split.bat > +b/BaseTools/BinPipWrappers/WindowsLike/Split.bat > new file mode 100644 > index 000000000000..d347d6484467 > --- /dev/null > +++ b/BaseTools/BinPipWrappers/WindowsLike/Split.bat > @@ -0,0 +1,3 @@ > +@setlocal+@set ToolName=3D%~n0%+@%PYTHON_COMMAND% -m > +edk2basetools.%ToolName%.%ToolName% %*diff --git > +a/BaseTools/BinPipWrappers/WindowsLike/TargetTool.bat > +b/BaseTools/BinPipWrappers/WindowsLike/TargetTool.bat > new file mode 100644 > index 000000000000..d347d6484467 > --- /dev/null > +++ b/BaseTools/BinPipWrappers/WindowsLike/TargetTool.bat > @@ -0,0 +1,3 @@ > +@setlocal+@set ToolName=3D%~n0%+@%PYTHON_COMMAND% -m > +edk2basetools.%ToolName%.%ToolName% %*diff --git > +a/BaseTools/BinPipWrappers/WindowsLike/Trim.bat > +b/BaseTools/BinPipWrappers/WindowsLike/Trim.bat > new file mode 100644 > index 000000000000..d347d6484467 > --- /dev/null > +++ b/BaseTools/BinPipWrappers/WindowsLike/Trim.bat > @@ -0,0 +1,3 @@ > +@setlocal+@set ToolName=3D%~n0%+@%PYTHON_COMMAND% -m > +edk2basetools.%ToolName%.%ToolName% %*diff --git > +a/BaseTools/BinPipWrappers/WindowsLike/UPT.bat > +b/BaseTools/BinPipWrappers/WindowsLike/UPT.bat > new file mode 100644 > index 000000000000..d347d6484467 > --- /dev/null > +++ b/BaseTools/BinPipWrappers/WindowsLike/UPT.bat > @@ -0,0 +1,3 @@ > +@setlocal+@set ToolName=3D%~n0%+@%PYTHON_COMMAND% -m > +edk2basetools.%ToolName%.%ToolName% %*diff --git > +a/BaseTools/BinPipWrappers/WindowsLike/build.bat > +b/BaseTools/BinPipWrappers/WindowsLike/build.bat > new file mode 100644 > index 000000000000..d347d6484467 > --- /dev/null > +++ b/BaseTools/BinPipWrappers/WindowsLike/build.bat > @@ -0,0 +1,3 @@ > +@setlocal+@set ToolName=3D%~n0%+@%PYTHON_COMMAND% -m > +edk2basetools.%ToolName%.%ToolName% %*diff --git > +a/BaseTools/BinWrappers/WindowsLike/win_build_tools_path_env.yaml > +b/BaseTools/BinPipWrappers/WindowsLike/win_build_tools_path_env.ya > ml > similarity index 70% > copy from > BaseTools/BinWrappers/WindowsLike/win_build_tools_path_env.yaml > copy to > BaseTools/BinPipWrappers/WindowsLike/win_build_tools_path_env.yaml > index 83f5856e75c6..9fdbe1bcb06b 100644 > --- a/BaseTools/BinWrappers/WindowsLike/win_build_tools_path_env.yaml > +++ > b/BaseTools/BinPipWrappers/WindowsLike/win_build_tools_path_env.yaml > @@ -5,6 +5,7 @@ > # SPDX-License-Identifier: BSD-2-Clause-Patent ## {- "scope": "global-w= in",+ > "scope": "pipbuild-win",+ "override_id": "binwrappers", "flags": > ["set_path"] }diff --git > a/BaseTools/BinWrappers/PosixLike/posix_path_env.yaml > b/BaseTools/BinWrappers/PosixLike/posix_path_env.yaml > index 8b32e010bb1d..99529235ec9a 100644 > --- a/BaseTools/BinWrappers/PosixLike/posix_path_env.yaml > +++ b/BaseTools/BinWrappers/PosixLike/posix_path_env.yaml > @@ -5,6 +5,7 @@ > # SPDX-License-Identifier: BSD-2-Clause-Patent ## {+ "id": "binwrappers= ", > "scope": "global-nix", "flags": ["set_path"] }diff --git > a/BaseTools/BinWrappers/WindowsLike/win_build_tools_path_env.yaml > b/BaseTools/BinWrappers/WindowsLike/win_build_tools_path_env.yaml > index 83f5856e75c6..43da76f354e5 100644 > --- a/BaseTools/BinWrappers/WindowsLike/win_build_tools_path_env.yaml > +++ > b/BaseTools/BinWrappers/WindowsLike/win_build_tools_path_env.yaml > @@ -5,6 +5,7 @@ > # SPDX-License-Identifier: BSD-2-Clause-Patent ## {+ "id": "binwrappers= ", > "scope": "global-win", "flags": ["set_path"] }diff --git a/BaseTools/Bu= ildEnv > b/BaseTools/BuildEnv > index 5943bb9ef908..275f4c5901aa 100755 > --- a/BaseTools/BuildEnv > +++ b/BaseTools/BuildEnv > @@ -46,7 +46,7 @@ RestorePreviousConfiguration() { > done > fi > fi > - > + > PREVIOUS_CONF_FILE=3D$CONF_PATH/BuildEnv.sh > if [ -e $PREVIOUS_CONF_FILE ] > then > @@ -198,7 +198,17 @@ AddEdkToolsToPath() { >=20 > EDK_TOOLS_PATH_BIN=3D`GetEdkToolsPathBinDirectory` >=20 > - AddDirToStartOfPath $EDK_TOOLS_PATH/BinWrappers/PosixLike > + # check if the edk2basetools pip package is available if > + $PYTHON_COMMAND -c "import edk2basetools" &> /dev/null; then > + # if it is, use the pip version of the wrappers > + echo "Using Pip Basetools" > + AddDirToStartOfPath $EDK_TOOLS_PATH/BinPipWrappers/PosixLike > + else > + echo "Using EDK2 in-source Basetools" > + AddDirToStartOfPath $EDK_TOOLS_PATH/BinWrappers/PosixLike > + fi > + > + > AddDirToStartOfPath $EDK_TOOLS_PATH_BIN >=20 > } > diff --git a/BaseTools/Scripts/PatchCheck.py > b/BaseTools/Scripts/PatchCheck.py index 68c984ed0e4d..80754e763c5a > 100755 > --- a/BaseTools/Scripts/PatchCheck.py > +++ b/BaseTools/Scripts/PatchCheck.py > @@ -359,6 +359,7 @@ class GitDiffCheck: > self.force_notabs =3D True if self.filen= ame.endswith('.sh') or > \ self.filename.startswith('BaseTools/BinWrappers/Pos= ixLike/') or > \+ self.filename.startswith('BaseTools/BinPipWrappers/= PosixLike/') > or \ self.filename.startswith('BaseTools/Bin/CYGWIN_N= T-5.1- > i686/') or \ self.filename =3D=3D 'BaseTools/BuildEnv= ': #diff > --git a/BaseTools/Source/Python/README.md > b/BaseTools/Source/Python/README.md > new file mode 100644 > index 000000000000..56f5b0ff027b > --- /dev/null > +++ b/BaseTools/Source/Python/README.md > @@ -0,0 +1,29 @@ > +# Edk2 Basetools++This folder has traditionally held the source of > +Python based tools used by EDK2. +The official repo this source has > +moved to https://github.com/tianocore/edk2-basetools.+This folder will > +remain in the tree until the next stable release (expected > +202102).+There is a new folder under Basetools `BinPipWrappers` that > +uses the pip module rather than this tree for Basetools.+By adding the > +scope `pipbuild-win` or `pipbuild-unix` (depending on your host > +system), the SDE will use the +`BinPipWrappers` instead of the regular > +`BinWrappers`.++## Why Move It?++The discussion is on the mailing list. > +The RFC is here: https://edk2.groups.io/g/rfc/topic/74009714#270+The > +benefits allow for the Basetools project to be used separately from > +EDK2 itself as well as offering it in a+globally accessible manner. > ++This makes it much easier to build a module using Basetools. > ++Separating the Basetools into their own repo allows for easier CI and > +contribution process.+Additional pros, cons, and process can be found > +on the mailing list.++## How Do I Install It?++By default, EDK2 is tied > +to and tested with a specific version of the Basetools through > +`pip-requirements.txt`.+You can simply run:++```bash+pip install -r > +pip-requirements.txt+```++This will install the required module, > +thought we strongly suggest setting up a virtual > +environment.+Additionally, you can also install a local clone of the > +Basetools as well as a specific git commit.diff --git > +a/BaseTools/toolsetup.bat b/BaseTools/toolsetup.bat > index 61ebf4ae09bc..4b5256ab6e93 100755 > --- a/BaseTools/toolsetup.bat > +++ b/BaseTools/toolsetup.bat > @@ -393,12 +393,31 @@ goto end > goto check_freezer_path ) ++ :check_freezer_path > endlocal++ %PYTHON_COMMAND% -c "import edk2basetools" >NUL 2>NUL+ > if %ERRORLEVEL% EQU 0 (+ goto use_pip_basetools+ ) else (+ goto > use_builtin_basetools+ )++:use_builtin_basetools+ @echo Using EDK2 in- > source Basetools if defined BASETOOLS_PYTHON_SOURCE goto > print_python_info set > "PATH=3D%BASE_TOOLS_PATH%\BinWrappers\WindowsLike;%PATH%" set > BASETOOLS_PYTHON_SOURCE=3D%BASE_TOOLS_PATH%\Source\Python set > PYTHONPATH=3D%BASETOOLS_PYTHON_SOURCE%;%PYTHONPATH%+ goto > print_python_info++:use_pip_basetools+ @echo Using Pip Basetools+ set > "PATH=3D%BASE_TOOLS_PATH%\BinPipWrappers\WindowsLike;%PATH%"+ > set BASETOOLS_PYTHON_SOURCE=3Dedk2basetools+ goto > print_python_info :print_python_info echo PATH =3D %PAT= H%diff -- > git a/pip-requirements.txt b/pip-requirements.txt > index 0fecd37f2a83..aea2e6ece431 100644 > --- a/pip-requirements.txt > +++ b/pip-requirements.txt > @@ -14,4 +14,5 @@ > edk2-pytool-library=3D=3D0.10.* edk2-pytool-extensions~=3D0.13.3+edk2- > basetools=3D=3D0.1.2 antlr4-python3-runtime=3D=3D4.7.1-- > 2.29.0.vfs.0.0