public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH 0/2] Add batch option to support build Binary Cache
@ 2019-05-09  3:21 Steven Shi
  2019-05-09  3:21 ` [PATCH 1/2] KabylakeOpenBoardPkg/KabylakeRvp3: Extend build to support " Steven Shi
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Steven Shi @ 2019-05-09  3:21 UTC (permalink / raw)
  To: devel; +Cc: chasel.chiu, shifei.a.lu, liming.gao, dandan.bi,
	michael.a.kubacki

This patch serial is to extend the options in the Kabylake and Purley
build batch file to support build Binary Cache produce and consume switch.


Steven Shi (2):
  KabylakeOpenBoardPkg/KabylakeRvp3: Extend build to support Binary
    Cache
  PurleyOpenBoardPkg/BoardMtOlympus: Extend build to support Binary
    Cache

 .../KabylakeOpenBoardPkg/KabylakeRvp3/bld.bat | 24 +++++++++++++++++--
 .../PurleyOpenBoardPkg/BoardMtOlympus/bld.bat | 18 ++++++++++++--
 .../BoardMtOlympus/prebuild.bat               |  4 ++--
 3 files changed, 40 insertions(+), 6 deletions(-)

-- 
2.17.1.windows.2


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 1/2] KabylakeOpenBoardPkg/KabylakeRvp3: Extend build to support Binary Cache
  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
  2019-05-09  3:21 ` [PATCH 2/2] PurleyOpenBoardPkg/BoardMtOlympus: " Steven Shi
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 8+ messages in thread
From: Steven Shi @ 2019-05-09  3:21 UTC (permalink / raw)
  To: devel; +Cc: chasel.chiu, shifei.a.lu, liming.gao, dandan.bi,
	michael.a.kubacki

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


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/2] PurleyOpenBoardPkg/BoardMtOlympus: Extend build to support Binary Cache
  2019-05-09  3:21 [PATCH 0/2] Add batch option to support build Binary Cache Steven Shi
  2019-05-09  3:21 ` [PATCH 1/2] KabylakeOpenBoardPkg/KabylakeRvp3: Extend build to support " Steven Shi
@ 2019-05-09  3:21 ` 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-10 17:14 ` Kubacki, Michael A
  3 siblings, 2 replies; 8+ messages in thread
From: Steven Shi @ 2019-05-09  3:21 UTC (permalink / raw)
  To: devel; +Cc: chasel.chiu, shifei.a.lu, liming.gao, dandan.bi,
	michael.a.kubacki

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

Extend the options in the Purley build batch file to support
Binary Cache produce and consume switch.
---
 .../PurleyOpenBoardPkg/BoardMtOlympus/bld.bat  | 18 ++++++++++++++++--
 .../BoardMtOlympus/prebuild.bat                |  4 ++--
 2 files changed, 18 insertions(+), 4 deletions(-)

diff --git a/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/bld.bat b/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/bld.bat
index a66d19e66e..eda749af36 100644
--- a/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/bld.bat
+++ b/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/bld.bat
@@ -16,6 +16,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() ----
 
 ::**********************************************************************
@@ -34,6 +39,15 @@ if /I "%1"=="clean" (
   goto :EOF
 )
 
+if /I "%1"=="cache-produce" (
+  set BINARY_CACHE_CMD_LINE= --hash --binary-destination=%BINARY_CACHE_PATH%
+)
+
+if /I "%1"=="cache-consume" (
+  set BINARY_CACHE_CMD_LINE= --hash --binary-source=%BINARY_CACHE_PATH%
+)
+
+
 shift
 GOTO :parseCmdLine
 
@@ -92,8 +106,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 81a9634d51..880e6417ac 100644
--- a/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/prebuild.bat
+++ b/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/prebuild.bat
@@ -188,8 +188,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.17.1.windows.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 0/2] Add batch option to support build Binary Cache
  2019-05-09  3:21 [PATCH 0/2] Add batch option to support build Binary Cache Steven Shi
  2019-05-09  3:21 ` [PATCH 1/2] KabylakeOpenBoardPkg/KabylakeRvp3: Extend build to support " Steven Shi
  2019-05-09  3:21 ` [PATCH 2/2] PurleyOpenBoardPkg/BoardMtOlympus: " Steven Shi
@ 2019-05-09  3:37 ` Liming Gao
  2019-05-09  4:07   ` Steven Shi
  2019-05-10 17:14 ` Kubacki, Michael A
  3 siblings, 1 reply; 8+ messages in thread
From: Liming Gao @ 2019-05-09  3:37 UTC (permalink / raw)
  To: Shi, Steven, devel@edk2.groups.io
  Cc: Chiu, Chasel, Lu, Shifei A, Bi, Dandan, Kubacki, Michael A

Steven:
  Could you let user specify BinCache directory instead of hard code name?

Thanks
Liming
> -----Original Message-----
> From: Shi, Steven
> Sent: Thursday, May 9, 2019 11:21 AM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel <chasel.chiu@intel.com>; Lu, Shifei A <shifei.a.lu@intel.com>; Gao, Liming <liming.gao@intel.com>; Bi, Dandan
> <dandan.bi@intel.com>; Kubacki, Michael A <michael.a.kubacki@intel.com>
> Subject: [PATCH 0/2] Add batch option to support build Binary Cache
> 
> This patch serial is to extend the options in the Kabylake and Purley
> build batch file to support build Binary Cache produce and consume switch.
> 
> 
> Steven Shi (2):
>   KabylakeOpenBoardPkg/KabylakeRvp3: Extend build to support Binary
>     Cache
>   PurleyOpenBoardPkg/BoardMtOlympus: Extend build to support Binary
>     Cache
> 
>  .../KabylakeOpenBoardPkg/KabylakeRvp3/bld.bat | 24 +++++++++++++++++--
>  .../PurleyOpenBoardPkg/BoardMtOlympus/bld.bat | 18 ++++++++++++--
>  .../BoardMtOlympus/prebuild.bat               |  4 ++--
>  3 files changed, 40 insertions(+), 6 deletions(-)
> 
> --
> 2.17.1.windows.2


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 0/2] Add batch option to support build Binary Cache
  2019-05-09  3:37 ` [PATCH 0/2] Add batch option to support build " Liming Gao
@ 2019-05-09  4:07   ` Steven Shi
  0 siblings, 0 replies; 8+ messages in thread
From: Steven Shi @ 2019-05-09  4:07 UTC (permalink / raw)
  To: Gao, Liming, devel@edk2.groups.io
  Cc: Chiu, Chasel, Lu, Shifei A, Bi, Dandan, Kubacki, Michael A

Hi Liming,
User can override the BinCache by set BINARY_CACHE_PATH environment variable, see below code in the patch. The BinCache is only used if user doesn't set the binary cache path variable.

+@if not defined BINARY_CACHE_PATH (
+  echo Info: BINARY_CACHE_PATH is empty, use BinCache as default
+  SET BINARY_CACHE_PATH=BinCache
+)
+


Thanks
Steven Shi

> -----Original Message-----
> From: Gao, Liming
> Sent: Thursday, May 9, 2019 11:37 AM
> To: Shi, Steven <steven.shi@intel.com>; devel@edk2.groups.io
> Cc: Chiu, Chasel <chasel.chiu@intel.com>; Lu, Shifei A <shifei.a.lu@intel.com>;
> Bi, Dandan <dandan.bi@intel.com>; Kubacki, Michael A
> <michael.a.kubacki@intel.com>
> Subject: RE: [PATCH 0/2] Add batch option to support build Binary Cache
> 
> Steven:
>   Could you let user specify BinCache directory instead of hard code name?
> 
> Thanks
> Liming
> > -----Original Message-----
> > From: Shi, Steven
> > Sent: Thursday, May 9, 2019 11:21 AM
> > To: devel@edk2.groups.io
> > Cc: Chiu, Chasel <chasel.chiu@intel.com>; Lu, Shifei A
> <shifei.a.lu@intel.com>; Gao, Liming <liming.gao@intel.com>; Bi, Dandan
> > <dandan.bi@intel.com>; Kubacki, Michael A <michael.a.kubacki@intel.com>
> > Subject: [PATCH 0/2] Add batch option to support build Binary Cache
> >
> > This patch serial is to extend the options in the Kabylake and Purley
> > build batch file to support build Binary Cache produce and consume switch.
> >
> >
> > Steven Shi (2):
> >   KabylakeOpenBoardPkg/KabylakeRvp3: Extend build to support Binary
> >     Cache
> >   PurleyOpenBoardPkg/BoardMtOlympus: Extend build to support Binary
> >     Cache
> >
> >  .../KabylakeOpenBoardPkg/KabylakeRvp3/bld.bat | 24 +++++++++++++++++-
> -
> >  .../PurleyOpenBoardPkg/BoardMtOlympus/bld.bat | 18 ++++++++++++--
> >  .../BoardMtOlympus/prebuild.bat               |  4 ++--
> >  3 files changed, 40 insertions(+), 6 deletions(-)
> >
> > --
> > 2.17.1.windows.2


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/2] PurleyOpenBoardPkg/BoardMtOlympus: Extend build to support Binary Cache
  2019-05-09  3:21 ` [PATCH 2/2] PurleyOpenBoardPkg/BoardMtOlympus: " Steven Shi
@ 2019-05-10  5:12   ` Lu, Shifei A
  2019-05-10  5:43   ` Chiu, Chasel
  1 sibling, 0 replies; 8+ messages in thread
From: Lu, Shifei A @ 2019-05-10  5:12 UTC (permalink / raw)
  To: Shi, Steven, devel@edk2.groups.io
  Cc: Chiu, Chasel, Gao, Liming, Bi, Dandan, Kubacki, Michael A,
	Lu, Shifei A

Reviewed-by: Lu, shifei <shifei.a.lu@intel.com>

> -----Original Message-----
> From: Shi, Steven
> Sent: Thursday, May 9, 2019 11:21 AM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel <chasel.chiu@intel.com>; Lu, Shifei A
> <shifei.a.lu@intel.com>; Gao, Liming <liming.gao@intel.com>; Bi, Dandan
> <dandan.bi@intel.com>; Kubacki, Michael A <michael.a.kubacki@intel.com>
> Subject: [PATCH 2/2] PurleyOpenBoardPkg/BoardMtOlympus: Extend build
> to support Binary Cache
> 
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1785
> 
> Extend the options in the Purley build batch file to support
> Binary Cache produce and consume switch.
> ---
>  .../PurleyOpenBoardPkg/BoardMtOlympus/bld.bat  | 18
> ++++++++++++++++--
>  .../BoardMtOlympus/prebuild.bat                |  4 ++--
>  2 files changed, 18 insertions(+), 4 deletions(-)
> 
> diff --git a/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/bld.bat
> b/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/bld.bat
> index a66d19e66e..eda749af36 100644
> --- a/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/bld.bat
> +++ b/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/bld.bat
> @@ -16,6 +16,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() ----
> 
>  ::*********************************************************
> *************
> @@ -34,6 +39,15 @@ if /I "%1"=="clean" (
>    goto :EOF
>  )
> 
> +if /I "%1"=="cache-produce" (
> +  set BINARY_CACHE_CMD_LINE= --hash --binary-
> destination=%BINARY_CACHE_PATH%
> +)
> +
> +if /I "%1"=="cache-consume" (
> +  set BINARY_CACHE_CMD_LINE= --hash --binary-
> source=%BINARY_CACHE_PATH%
> +)
> +
> +
>  shift
>  GOTO :parseCmdLine
> 
> @@ -92,8 +106,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 81a9634d51..880e6417ac 100644
> --- a/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/prebuild.bat
> +++ b/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/prebuild.bat
> @@ -188,8 +188,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.17.1.windows.2


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/2] PurleyOpenBoardPkg/BoardMtOlympus: Extend build to support Binary Cache
  2019-05-09  3:21 ` [PATCH 2/2] PurleyOpenBoardPkg/BoardMtOlympus: " Steven Shi
  2019-05-10  5:12   ` Lu, Shifei A
@ 2019-05-10  5:43   ` Chiu, Chasel
  1 sibling, 0 replies; 8+ messages in thread
From: Chiu, Chasel @ 2019-05-10  5:43 UTC (permalink / raw)
  To: Shi, Steven, devel@edk2.groups.io
  Cc: Lu, Shifei A, Gao, Liming, Bi, Dandan, Kubacki, Michael A


Reviewed-by: Chasel Chiu <chasel.chiu@intel.com>

> -----Original Message-----
> From: Shi, Steven
> Sent: Thursday, May 9, 2019 11:21 AM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel <chasel.chiu@intel.com>; Lu, Shifei A <shifei.a.lu@intel.com>;
> Gao, Liming <liming.gao@intel.com>; Bi, Dandan <dandan.bi@intel.com>;
> Kubacki, Michael A <michael.a.kubacki@intel.com>
> Subject: [PATCH 2/2] PurleyOpenBoardPkg/BoardMtOlympus: Extend build to
> support Binary Cache
> 
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1785
> 
> Extend the options in the Purley build batch file to support Binary Cache produce
> and consume switch.
> ---
>  .../PurleyOpenBoardPkg/BoardMtOlympus/bld.bat  | 18
> ++++++++++++++++--
>  .../BoardMtOlympus/prebuild.bat                |  4 ++--
>  2 files changed, 18 insertions(+), 4 deletions(-)
> 
> diff --git a/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/bld.bat
> b/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/bld.bat
> index a66d19e66e..eda749af36 100644
> --- a/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/bld.bat
> +++ b/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/bld.bat
> @@ -16,6 +16,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() ----
> 
>  ::**************************************************************
> ********
> @@ -34,6 +39,15 @@ if /I "%1"=="clean" (
>    goto :EOF
>  )
> 
> +if /I "%1"=="cache-produce" (
> +  set BINARY_CACHE_CMD_LINE= --hash
> +--binary-destination=%BINARY_CACHE_PATH%
> +)
> +
> +if /I "%1"=="cache-consume" (
> +  set BINARY_CACHE_CMD_LINE= --hash
> --binary-source=%BINARY_CACHE_PATH%
> +)
> +
> +
>  shift
>  GOTO :parseCmdLine
> 
> @@ -92,8 +106,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 81a9634d51..880e6417ac 100644
> --- a/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/prebuild.bat
> +++ b/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/prebuild.bat
> @@ -188,8 +188,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.17.1.windows.2


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 0/2] Add batch option to support build Binary Cache
  2019-05-09  3:21 [PATCH 0/2] Add batch option to support build Binary Cache Steven Shi
                   ` (2 preceding siblings ...)
  2019-05-09  3:37 ` [PATCH 0/2] Add batch option to support build " Liming Gao
@ 2019-05-10 17:14 ` Kubacki, Michael A
  3 siblings, 0 replies; 8+ messages in thread
From: Kubacki, Michael A @ 2019-05-10 17:14 UTC (permalink / raw)
  To: Shi, Steven, devel@edk2.groups.io
  Cc: Chiu, Chasel, Lu, Shifei A, Gao, Liming, Bi, Dandan

Hi Steven,

We have Python build scripts now and those need to be
updated with this change. The batch scripts will be deleted
soon and only exist at the moment for a brief grace period.
Please update the Python scripts.

Also, update the Python build section in Readme.md to
describe this change including how the user can change
the binary cache path.

Thanks,
Michael

> -----Original Message-----
> From: Shi, Steven
> Sent: Wednesday, May 8, 2019 8:21 PM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel <chasel.chiu@intel.com>; Lu, Shifei A
> <shifei.a.lu@intel.com>; Gao, Liming <liming.gao@intel.com>; Bi, Dandan
> <dandan.bi@intel.com>; Kubacki, Michael A <michael.a.kubacki@intel.com>
> Subject: [PATCH 0/2] Add batch option to support build Binary Cache
> 
> This patch serial is to extend the options in the Kabylake and Purley build
> batch file to support build Binary Cache produce and consume switch.
> 
> 
> Steven Shi (2):
>   KabylakeOpenBoardPkg/KabylakeRvp3: Extend build to support Binary
>     Cache
>   PurleyOpenBoardPkg/BoardMtOlympus: Extend build to support Binary
>     Cache
> 
>  .../KabylakeOpenBoardPkg/KabylakeRvp3/bld.bat | 24 +++++++++++++++++-
> -  .../PurleyOpenBoardPkg/BoardMtOlympus/bld.bat | 18 ++++++++++++--
>  .../BoardMtOlympus/prebuild.bat               |  4 ++--
>  3 files changed, 40 insertions(+), 6 deletions(-)
> 
> --
> 2.17.1.windows.2


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-05-10 17:14 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-09  3:21 [PATCH 0/2] Add batch option to support build Binary Cache Steven Shi
2019-05-09  3:21 ` [PATCH 1/2] KabylakeOpenBoardPkg/KabylakeRvp3: Extend build to support " Steven Shi
2019-05-09  3:21 ` [PATCH 2/2] PurleyOpenBoardPkg/BoardMtOlympus: " 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox