From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.115, mailfrom: chasel.chiu@intel.com) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by groups.io with SMTP; Thu, 30 May 2019 18:58:35 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 May 2019 18:58:35 -0700 X-ExtLoop1: 1 Received: from pgsmsx107.gar.corp.intel.com ([10.221.44.105]) by orsmga004.jf.intel.com with ESMTP; 30 May 2019 18:58:34 -0700 Received: from pgsmsx111.gar.corp.intel.com ([169.254.2.3]) by PGSMSX107.gar.corp.intel.com ([169.254.7.128]) with mapi id 14.03.0415.000; Fri, 31 May 2019 09:57:58 +0800 From: "Chiu, Chasel" To: "Fan, ZhijuX" , "devel@edk2.groups.io" CC: "Gao, Liming" , "Feng, Bob C" , "Shi, Steven" , "Lu, Shifei A" , "Zhou, Bowen" , "Oram, Isaac W" , "Kubacki, Michael A" , "Desimone, Nathaniel L" Subject: Re: [PATCH 2/4] Platform/Intel:Add build parameter to support Binary Cache Thread-Topic: [PATCH 2/4] Platform/Intel:Add build parameter to support Binary Cache Thread-Index: AdUXUXluG7BhePX8Qe2OhKzwJsBNSgAAsXcA Date: Fri, 31 May 2019 01:57:58 +0000 Message-ID: <3C3EFB470A303B4AB093197B6777CCEC50339AA8@PGSMSX111.gar.corp.intel.com> References: In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.600.7 dlp-reaction: no-action x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZTdiMWNiNzUtNzRiOS00NmZjLThlNmUtYmEyMjg4N2MwM2ZjIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiT2p1VXNxNnN0Z3JpSjJ4T1ozOWlHQVllSDZmaEpYT3hcL3NOWHRxRWtkZngwTmY4aFwvXC8yTlJSS3JDbVNXNGpmeSJ9 x-ctpclassification: CTP_NT x-originating-ip: [172.30.20.206] MIME-Version: 1.0 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Chasel Chiu > -----Original Message----- > From: Fan, ZhijuX > Sent: Friday, May 31, 2019 9:38 AM > To: devel@edk2.groups.io > Cc: Gao, Liming ; Feng, Bob C ; > Shi, Steven ; Lu, Shifei A ;= Zhou, > Bowen ; Oram, Isaac W ; > Chiu, Chasel ; Kubacki, Michael A > ; Desimone, Nathaniel L > > Subject: [PATCH 2/4] Platform/Intel:Add build parameter to support Binary > Cache >=20 > BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=3D1784 > BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=3D1785 >=20 > Need extend the options in the Intel/build_bios.py file to support Binary= Cache. >=20 > --hash: > Enable hash-based caching during build process. > --binary-destination: > Generate a cache of binary files in the specified directory. > --binary-source: > Consume a cache of binary files from the specified directory. >=20 > Cc: Liming Gao > Cc: Bob Feng > Cc: Steven Shi > Cc: Shifei A Lu > Cc: Xiaohu Zhou > Cc: Isaac W Oram > Cc: Chasel Chiu > Cc: Michael Kubacki > Cc: Nate DeSimone > Signed-off-by: Zhiju.Fan > --- > Platform/Intel/build_bios.py | 27 +++++++++++++++++++++++++++ > 1 file changed, 27 insertions(+) >=20 > diff --git a/Platform/Intel/build_bios.py b/Platform/Intel/build_bios.py = index > 9f8d78f6e8..628b127417 100644 > --- a/Platform/Intel/build_bios.py > +++ b/Platform/Intel/build_bios.py > @@ -333,6 +333,7 @@ def build(config): > print(" SILENT_MODE =3D ", config.get("SILENT_MODE")) > print(" REBUILD_MODE =3D ", config.get("REBUILD_MODE")) > print(" BUILD_ROM_ONLY =3D ", config.get("BUILD_ROM_ONLY")) > + print(" BINARY_CACHE_CMD_LINE =3D ", config.get("HASH"), > + config.get("BINARY_CACHE_CMD_LINE")) > print("=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D") >=20 > command =3D ["build", "-n", config["NUMBER_OF_PROCESSORS"]] @@ > -343,6 +344,10 @@ def build(config): > if config["EXT_BUILD_FLAGS"] and config["EXT_BUILD_FLAGS"] !=3D "": > command.append(config["EXT_BUILD_FLAGS"]) >=20 > + if config.get('BINARY_CACHE_CMD_LINE'): > + command.append(config['HASH']) > + command.append(config['BINARY_CACHE_CMD_LINE']) > + > if config.get("SILENT_MODE", "FALSE") =3D=3D "TRUE": > command.append("--silent") > command.append("--quiet") > @@ -848,6 +853,17 @@ def get_cmd_config_arguments(arguments): > if arguments.fspapi is True: > result["API_MODE_FSP_WRAPPER_BUILD"] =3D "TRUE" >=20 > + if not arguments.UseHashCache: > + result['BINARY_CACHE_CMD_LINE'] =3D '' > + elif arguments.BinCacheDest: > + result['HASH'] =3D '--hash' > + result['BINARY_CACHE_CMD_LINE'] =3D '--binary-destination=3D%s' = % > arguments.BinCacheDest > + elif arguments.BinCacheSource: > + result['HASH'] =3D '--hash' > + result['BINARY_CACHE_CMD_LINE'] =3D '--binary-source=3D%s' % > arguments.BinCacheSource > + else: > + result['BINARY_CACHE_CMD_LINE'] =3D '' > + > return result >=20 >=20 > @@ -924,6 +940,17 @@ def get_cmd_arguments(build_config): > parser.add_argument("--fspapi", help=3D"API mode fsp wrapper build > enabled", > action=3D'store_true', dest=3D"fspapi") >=20 > + parser.add_argument("--hash", action=3D"store_true", > dest=3D"UseHashCache", default=3DFalse, > + help=3D"Enable hash-based caching during build > + process.") > + > + parser.add_argument("--binary-destination", help=3D"Generate a cache= of > binary \ > + files in the specified directory.", > + action=3D'store', dest=3D"BinCacheDest") > + > + parser.add_argument("--binary-source", help=3D"Consume a cache of bi= nary > files \ > + from the specified directory.", > + action=3D'store', dest=3D"BinCacheSource") > + > return parser.parse_args() >=20 >=20 > -- > 2.14.1.windows.1