public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
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>,
	"Lu, Shifei A" <shifei.a.lu@intel.com>,
	"Zhou, Bowen" <bowen.zhou@intel.com>,
	"Oram, Isaac W" <isaac.w.oram@intel.com>
Subject: [PATCH 3/3 V2] PurleyOpenBoardPkg:Extend options in bld.bat to support Binary Cache
Date: Mon, 17 Jun 2019 05:11:15 +0000	[thread overview]
Message-ID: <FAD0D7E0AE0FA54D987F6E72435CAFD50AF824DD@SHSMSX101.ccr.corp.intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 3635 bytes --]

BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1785

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: Shifei A Lu <shifei.a.lu@intel.com>
Cc: Xiaohu Zhou <bowen.zhou@intel.com>
Cc: Isaac W Oram <isaac.w.oram@intel.com>
Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com>
---
 Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/bld.bat      | 17 +++++++++++++++--
 Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/prebuild.bat |  4 ++--
 2 files changed, 17 insertions(+), 4 deletions(-)

diff --git a/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/bld.bat b/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/bld.bat
index f624be03a9..4c809426f2 100644
--- a/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/bld.bat
+++ b/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/bld.bat
@@ -10,6 +10,11 @@ REM Run setlocal to take a snapshot of the environment variables.  endlocal is c
 setlocal
 set SCRIPT_ERROR=0
 
+@if not defined BINARY_CACHE_PATH (
+  echo Info: BINARY_CACHE_PATH is empty, use BinCache as default
+  SET BINARY_CACHE_PATH=BinCache
+)
+
 REM ---- Do NOT use :: for comments Inside of code blocks() ----
 
 ::**********************************************************************
@@ -28,6 +33,14 @@ if /I "%1"=="clean" (
   goto :EOF
 )
 
+@if "%~1" == "cache-produce" (
+  SET BINARY_CACHE_CMD_LINE= --hash --binary-destination=%BINARY_CACHE_PATH%
+)
+
+@if "%~1" == "cache-consume" (
+  SET BINARY_CACHE_CMD_LINE= --hash --binary-source=%BINARY_CACHE_PATH%
+)
+
 shift
 GOTO :parseCmdLine
 
@@ -86,8 +99,8 @@ echo                          Build Start
 echo.
 echo --------------------------------------------------------------------
 echo.
-echo build %BUILD_CMD_LINE% --log=%BUILD_LOG% %BUILD_REPORT_FLAGS%
-call build %BUILD_CMD_LINE% --log=%BUILD_LOG% %BUILD_REPORT_FLAGS%
+echo build %BUILD_CMD_LINE% --log=%BUILD_LOG% %BUILD_REPORT_FLAGS% %BINARY_CACHE_CMD_LINE%
+call build %BUILD_CMD_LINE% --log=%BUILD_LOG% %BUILD_REPORT_FLAGS% %BINARY_CACHE_CMD_LINE%
 echo --------------------------------------------------------------------
 echo.
 echo                          Build End
diff --git a/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/prebuild.bat b/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/prebuild.bat
index d9c1442ea1..4aba30adce 100644
--- a/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/prebuild.bat
+++ b/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/prebuild.bat
@@ -182,8 +182,8 @@ set PRE_BUILD_CMD_LINE=%BUILD_CMD_LINE% -D MAX_SOCKET=%MAX_SOCKET%
 set PRE_BUILD_LOG=%WORKSPACE%\Build\prebuild.log
 set PRE_BUILD_REPORT=%WORKSPACE%\Build\preBuildReport.txt
 
-echo build %PRE_BUILD_CMD_LINE% -m %BOARD_PKG%\Acpi\BoardAcpiDxe\Dsdt.inf -y %PRE_BUILD_REPORT% --log=%PRE_BUILD_LOG%
-call build %PRE_BUILD_CMD_LINE% -m %BOARD_PKG%\Acpi\BoardAcpiDxe\Dsdt.inf -y %PRE_BUILD_REPORT% --log=%PRE_BUILD_LOG%
+echo build %PRE_BUILD_CMD_LINE% -m %BOARD_PKG%\Acpi\BoardAcpiDxe\Dsdt.inf -y %PRE_BUILD_REPORT% --log=%PRE_BUILD_LOG% %BINARY_CACHE_CMD_LINE%
+call build %PRE_BUILD_CMD_LINE% -m %BOARD_PKG%\Acpi\BoardAcpiDxe\Dsdt.inf -y %PRE_BUILD_REPORT% --log=%PRE_BUILD_LOG% %BINARY_CACHE_CMD_LINE%
 if %ERRORLEVEL% NEQ 0 EXIT /b %ERRORLEVEL%
 
 @REM PSYS == FIX0
-- 
2.14.1.windows.1


[-- Attachment #2: winmail.dat --]
[-- Type: application/ms-tnef, Size: 4804 bytes --]

                 reply	other threads:[~2019-06-17  5:11 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=FAD0D7E0AE0FA54D987F6E72435CAFD50AF824DD@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