From: "Fan, ZhijuX" <zhijux.fan@intel.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: "Gao, Liming" <liming.gao@intel.com>,
"Feng, Bob C" <bob.c.feng@intel.com>,
"Shi, Steven" <steven.shi@intel.com>,
"Chiu, Chasel" <chasel.chiu@intel.com>,
"Kubacki, Michael A" <michael.a.kubacki@intel.com>,
"Desimone, Nathaniel L" <nathaniel.l.desimone@intel.com>
Subject: [PATCH 3/4] KabylakeOpenBoardPkg:Extend options in bld.bat to support Binary Cache
Date: Fri, 31 May 2019 01:40:12 +0000 [thread overview]
Message-ID: <FAD0D7E0AE0FA54D987F6E72435CAFD50AF6EB9F@SHSMSX101.ccr.corp.intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 2916 bytes --]
BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1784
Need extend the options in the Kabylake build bld.bat file to
support Binary Cache.
BINARY_CACHE_PATH:
if BINARY_CACHE_PATH is empty, use BinCache as default path
Add "cache-produce" and "cache-consume" to command line,
Used to generate and use Binary Cache files.
Cc: Liming Gao <liming.gao@intel.com>
Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Steven Shi <steven.shi@intel.com>
Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Michael Kubacki <michael.a.kubacki@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
---
Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/bld.bat | 23 +++++++++++++++++++++--
1 file changed, 21 insertions(+), 2 deletions(-)
diff --git a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/bld.bat b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/bld.bat
index 449660b75d..af397a3115 100644
--- a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/bld.bat
+++ b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/bld.bat
@@ -62,6 +62,11 @@ copy /y /b %WORKSPACE_FSP_BIN%\KabylakeFspBinPkg\Fsp_Rebased_S.fd+%WORKSPACE_FSP
@SET REBUILD_MODE=
@SET BUILD_ROM_ONLY=
+@if not defined BINARY_CACHE_PATH (
+ echo Info: BINARY_CACHE_PATH is empty, use BinCache as default
+ SET BINARY_CACHE_PATH=BinCache
+)
+
:: Loop through arguements until all are processed
:BUILD_FLAGS_LOOP
@@ -87,6 +92,19 @@ copy /y /b %WORKSPACE_FSP_BIN%\KabylakeFspBinPkg\Fsp_Rebased_S.fd+%WORKSPACE_FSP
shift
goto BUILD_FLAGS_LOOP
)
+
+@if "%~1" == "cache-produce" (
+ SET BINARY_CACHE_CMD_LINE= --hash --binary-destination=%BINARY_CACHE_PATH%
+ shift
+ goto BUILD_FLAGS_LOOP
+)
+
+@if "%~1" == "cache-consume" (
+ SET BINARY_CACHE_CMD_LINE= --hash --binary-source=%BINARY_CACHE_PATH%
+ shift
+ goto BUILD_FLAGS_LOOP
+)
+
:: Unknown build flag.
shift
goto BUILD_FLAGS_LOOP
@@ -99,11 +117,12 @@ goto BUILD_FLAGS_LOOP
@echo SILENT_MODE = %SILENT_MODE%
@echo REBUILD_MODE = %REBUILD_MODE%
@echo BUILD_ROM_ONLY = %BUILD_ROM_ONLY%
+@echo BINARY_CACHE_CMD_LINE = %BINARY_CACHE_CMD_LINE%
@echo.
@if %SILENT_MODE% EQU TRUE goto BldSilent
-call build -n %NUMBER_OF_PROCESSORS% %REBUILD_MODE% %EXT_BUILD_FLAGS%
+call build -n %NUMBER_OF_PROCESSORS% %REBUILD_MODE% %EXT_BUILD_FLAGS% %BINARY_CACHE_CMD_LINE%
@if %ERRORLEVEL% NEQ 0 goto BldFail
@echo.
@@ -122,7 +141,7 @@ call %WORKSPACE_PLATFORM%\%PROJECT%\postbuild.bat %BUILD_ROM_ONLY%
@echo ************************************************************************ >> Build.log
@echo. >> Build.log
-call build -n %NUMBER_OF_PROCESSORS% %REBUILD_MODE% %EXT_BUILD_FLAGS% 1>>Build.log 2>&1
+call build -n %NUMBER_OF_PROCESSORS% %REBUILD_MODE% %EXT_BUILD_FLAGS% %BINARY_CACHE_CMD_LINE% 1>>Build.log 2>&1
@if %ERRORLEVEL% NEQ 0 goto BldFail
@echo. >> Build.log
--
2.14.1.windows.1
[-- Attachment #2: winmail.dat --]
[-- Type: application/ms-tnef, Size: 4563 bytes --]
reply other threads:[~2019-05-31 1:40 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=FAD0D7E0AE0FA54D987F6E72435CAFD50AF6EB9F@SHSMSX101.ccr.corp.intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox