public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Steven Shi" <steven.shi@intel.com>
To: devel@edk2.groups.io
Cc: chasel.chiu@intel.com, shifei.a.lu@intel.com,
	liming.gao@intel.com, dandan.bi@intel.com,
	michael.a.kubacki@intel.com
Subject: [PATCH 1/2] KabylakeOpenBoardPkg/KabylakeRvp3: Extend build to support Binary Cache
Date: Thu,  9 May 2019 11:21:18 +0800	[thread overview]
Message-ID: <20190509032119.2084-2-steven.shi@intel.com> (raw)
In-Reply-To: <20190509032119.2084-1-steven.shi@intel.com>

REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1784

Need extend the options in the Kabylake build bld.bat file
to support Binary Cache.
---
 .../KabylakeOpenBoardPkg/KabylakeRvp3/bld.bat | 24 +++++++++++++++++--
 1 file changed, 22 insertions(+), 2 deletions(-)

diff --git a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/bld.bat b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/bld.bat
index e0ad5eefdc..f9a12d565a 100644
--- a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/bld.bat
+++ b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/bld.bat
@@ -68,6 +68,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
@@ -93,6 +98,20 @@ 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
@@ -105,11 +124,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.
@@ -128,7 +148,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.17.1.windows.2


  reply	other threads:[~2019-05-09  3:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-09  3:21 [PATCH 0/2] Add batch option to support build Binary Cache Steven Shi
2019-05-09  3:21 ` Steven Shi [this message]
2019-05-09  3:21 ` [PATCH 2/2] PurleyOpenBoardPkg/BoardMtOlympus: Extend build to support " Steven Shi
2019-05-10  5:12   ` Lu, Shifei A
2019-05-10  5:43   ` Chiu, Chasel
2019-05-09  3:37 ` [PATCH 0/2] Add batch option to support build " Liming Gao
2019-05-09  4:07   ` Steven Shi
2019-05-10 17:14 ` Kubacki, Michael A

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=20190509032119.2084-2-steven.shi@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