From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.115; helo=mga14.intel.com; envelope-from=liming.gao@intel.com; receiver=edk2-devel@lists.01.org Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id DC45921F322CB for ; Wed, 27 Sep 2017 00:18:45 -0700 (PDT) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Sep 2017 00:21:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,444,1500966000"; d="scan'208";a="1018909197" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga003.jf.intel.com with ESMTP; 27 Sep 2017 00:21:14 -0700 Received: from fmsmsx123.amr.corp.intel.com (10.18.125.38) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 27 Sep 2017 00:20:13 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by fmsmsx123.amr.corp.intel.com (10.18.125.38) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 27 Sep 2017 00:20:13 -0700 Received: from shsmsx152.ccr.corp.intel.com ([169.254.6.93]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.159]) with mapi id 14.03.0319.002; Wed, 27 Sep 2017 15:20:10 +0800 From: "Gao, Liming" To: "Zhu, Yonghong" , "edk2-devel@lists.01.org" CC: "Kinney, Michael D" , "Shaw, Kevin W" Thread-Topic: [Patch V2] Build spec: add description for build with binary cache Thread-Index: AQHTMRNMszYZXIXpPkizN0O5/aD6mqLIX/Dw Date: Wed, 27 Sep 2017 07:20:10 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E15E0DE@SHSMSX152.ccr.corp.intel.com> References: <1505803680-15860-1-git-send-email-yonghong.zhu@intel.com> In-Reply-To: <1505803680-15860-1-git-send-email-yonghong.zhu@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [Patch V2] Build spec: add description for build with binary cache X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Sep 2017 07:18:46 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Liming Gao >-----Original Message----- >From: Zhu, Yonghong >Sent: Tuesday, September 19, 2017 2:48 PM >To: edk2-devel@lists.01.org >Cc: Gao, Liming ; Kinney, Michael D >; Shaw, Kevin W >Subject: [Patch V2] Build spec: add description for build with binary cach= e > >V2: >change the option name to --binary-destination and --binary-source. > >fixes:https://bugzilla.tianocore.org/show_bug.cgi?id=3D689 >Cc: Liming Gao >Cc: Michael Kinney >Cc: Kevin W Shaw >Contributed-under: TianoCore Contribution Agreement 1.1 >Signed-off-by: Yonghong Zhu >--- > .../82_auto-generation_process.md | 20 +++++++++++++++= +++++ > README.md | 1 + > appendix_d_buildexe_command/d4_usage.md | 19 >+++++++++++++++---- > 3 files changed, 36 insertions(+), 4 deletions(-) > >diff --git a/8_pre-build_autogen_stage/82_auto-generation_process.md >b/8_pre-build_autogen_stage/82_auto-generation_process.md >index 671a7d5..f2ddf32 100644 >--- a/8_pre-build_autogen_stage/82_auto-generation_process.md >+++ b/8_pre-build_autogen_stage/82_auto-generation_process.md >@@ -1031,10 +1031,30 @@ maximum command line length. The default >value is 4096. > **Note:** The following `FLAGS` options are included in the response file= : > `PP_FLAGS`, `CC_FLAGS`, `VFRPP_FLAGS`, `APP_FLAGS`, `ASLPP_FLAGS`, >`ASLCC_FLAGS`, > and `ASM_FLAGS`. > ********** > >+#### 8.2.4.15 Build with Binary Cache >+ >+**build** tool provides three new options for binary cache feature. >+--hash enables hash-based caching during build process. when --hash is >enabled, >+build tool will base on the module hash value to do the incremental build= , >without >+--hash, build tool will base on the timestamp to do the incremental build= . -- >hash >+option use md5 method to get every hash value, DSC/FDF, tools_def.txt, >build_rule.txt >+and build command are calculated as global hash value, Package DEC and it= s >include >+header files are calculated as package hash value, Module source files an= d its >INF >+file are calculated as module hash value. Library hash value will combine= the >global >+hash value and its dependent package hash value. Driver hash value will >combine the >+global hash value, its dependent package hash value and its linked librar= y >hash value. >+When --hash and --binary-destination are specified, build tool will copy = the >generated >+binary files for each module into the directory specified by binary- >destination at the >+build phase. Binary-destination directory caches all the generated binary= files. >+When --hash and --binary-source are specified, build tool will try to get= the >binary >+files from the binary source directory at the build phase. If the cached = binary >has >+the same hash value, it will be directly used. Otherwise, build tool will >compile the >+source files and generate the binary files. >+ > ### 8.2.5 Post processing > > Once all files are parsed, the build tools will do following work for eac= h EDK > II module: > >diff --git a/README.md b/README.md >index 52abb6a..ca59a35 100644 >--- a/README.md >+++ b/README.md >@@ -215,5 +215,6 @@ Copyright (c) 2008-2017, Intel Corporation. All rights >reserved. > | | [#523](https://bugzilla.tianocore.org/show_bug.cgi?id=3D52= 3) Build >spec: add EBNF for the --pcd syntax in the Section D.4 >| | > | | [#517](https://bugzilla.tianocore.org/show_bug.cgi?id=3D51= 7) Build >spec: chapter 5.2.2 Guided Tools add description for Pkcs7Sign tool and >BrotliCompress tool >| | > | | [#481](https://bugzilla.tianocore.org/show_bug.cgi?id=3D48= 1) Build >Spec: add clarification for not used Pcd that build tool will not do addit= ional >checks on its value >| | > | | [#518](https://bugzilla.tianocore.org/show_bug.cgi?id=3D51= 8) Build >Spec: Update Precedence of PCD Values >| | > | | [#669](https://bugzilla.tianocore.org/show_bug.cgi?id=3D66= 9) Build >Spec: Add multi-arg support to PREBUILD/POSTBUILD >| | >+| | [#689](https://bugzilla.tianocore.org/show_bug.cgi?id=3D68= 9) Build >spec: add description for build with binary cache >| | >diff --git a/appendix_d_buildexe_command/d4_usage.md >b/appendix_d_buildexe_command/d4_usage.md >index b71f2d0..c901266 100644 >--- a/appendix_d_buildexe_command/d4_usage.md >+++ b/appendix_d_buildexe_command/d4_usage.md >@@ -32,19 +32,20 @@ > ## D.4 Usage > > ```ini > Usage: build.exe [options] > [all|fds|genc|genmake|clean|cleanall|cleanlib|modules|libraries|run] >-Copyright (c) 2007 - 2014, Intel Corporation All rights reserved. >+Copyright (c) 2007 - 2017, Intel Corporation All rights reserved. > > Options: > --version show program's version number and exit > -h, --help show this help message and exit > -a TARGETARCH, --arch=3DTARGETARCH >- ARCHS is one of list: IA32, X64, IPF, ARM, or EBC= , >- which overrides target.txt's TARGET_ARCH definiti= on. >- To specify more archs, please repeat this option. >+ ARCHS is one of list: IA32, X64, IPF, ARM, AARCH6= 4 or >+ EBC, which overrides target.txt's TARGET_ARCH >+ definition. To specify more archs, please repeat = this >+ option. > -p PLATFORMFILE, --platform=3DPLATFORMFILE > Build the platform specified by the DSC file name > argument, overriding target.txt's ACTIVE_PLATFORM > definition. > -m MODULEFILE, --module=3DMODULEFILE >@@ -112,10 +113,20 @@ Options: > -N, --no-cache Disable build cache mechanism > --conf=3DCONFDIRECTORY Specify the customized Conf directory. > --check-usage Check usage content of entries listed in INF file= . > --ignore-sources Focus to a binary build and ignore all source fil= es > --pcd=3DOPTIONPCD Set PCD value by command line. Format: >"PcdName=3DValue" >+ -l COMMANDLENGTH, --cmd-len=3DCOMMANDLENGTH >+ Specify the maximum line length of build command. >+ Default is 4096. >+ --hash Enable hash-based caching during build process. >+ --binary-destination=3DBINCACHEDEST >+ Generate a cache of binary files in the specified >+ directory. >+ --binary-source=3DBINCACHESOURCE >+ Consume a cache of binary files from the specifie= d >+ directory. > ``` > > ### D.4.1 Debug Levels > > The numeric debug levels are defined as integer values 0-9. >-- >2.6.1.windows.1