From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.100, mailfrom: chasel.chiu@intel.com) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by groups.io with SMTP; Sun, 16 Jun 2019 22:50:55 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Jun 2019 22:50:54 -0700 X-ExtLoop1: 1 Received: from pgsmsx113.gar.corp.intel.com ([10.108.55.202]) by orsmga006.jf.intel.com with ESMTP; 16 Jun 2019 22:50:53 -0700 Received: from pgsmsx111.gar.corp.intel.com ([169.254.2.124]) by pgsmsx113.gar.corp.intel.com ([169.254.6.32]) with mapi id 14.03.0439.000; Mon, 17 Jun 2019 13:50:17 +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/3 V2] Platform/Intel:Add build parameter to support Binary Cache Thread-Topic: [PATCH 2/3 V2] Platform/Intel:Add build parameter to support Binary Cache Thread-Index: AdUkyvrJGpXQVg5xQGqTbrTD9HBTPwABYsgA Date: Mon, 17 Jun 2019 05:50:17 +0000 Message-ID: <3C3EFB470A303B4AB093197B6777CCEC503561D3@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.2.0.6 dlp-reaction: no-action x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNWFmZWY2NzYtNDM2OS00N2EyLWJmNTctYTk0ZGVjNjRmZGViIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiWEI0Qkd4TFZYR01aK3BheEJwU0lCSVkxbkVUeWQzQ1wvK3NLMlwvMm1laVpGMlBmYzE5VUtuWFB2bWdnSlpqQlJJIn0= x-ctpclassification: CTP_NT x-originating-ip: [172.30.20.205] 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: Monday, June 17, 2019 1:11 PM > 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/3 V2] Platform/Intel:Add build parameter to support Bin= ary > Cache >=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 > 09eceddeff..c01b953d16 100644 > --- a/Platform/Intel/build_bios.py > +++ b/Platform/Intel/build_bios.py > @@ -343,6 +343,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"]] @@ > -353,6 +354,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") > @@ -858,6 +863,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 > @@ -934,6 +950,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