summaryrefslogtreecommitdiff
path: root/Platform
diff options
context:
space:
mode:
authorLu, ShifeiX A <shifeix.a.lu@intel.com>2017-10-30 09:58:51 +0800
committerzwei4 <david.wei@intel.com>2017-10-30 13:29:20 +0800
commit0c5f7928cb8c527529a1bba8551b6eb0d879546e (patch)
tree162bb739b99e5d857a54dff0644f46ba54fb3b31 /Platform
parent65aa0a6fb3ef02c70e08f96d0209a5879da877de (diff)
downloadedk2-platforms-0c5f7928cb8c527529a1bba8551b6eb0d879546e.tar.xz
Build script.
Enhance build script. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jarlstrom, Laurie <laurie.jarlstrom@intel.com> Signed-off-by: lushifex <shifeix.a.lu@intel.com>
Diffstat (limited to 'Platform')
-rw-r--r--Platform/BroxtonPlatformPkg/BuildBxtBios.bat (renamed from Platform/BroxtonPlatformPkg/BuildBios.bat)7
-rw-r--r--Platform/BroxtonPlatformPkg/BuildBxtBios.sh (renamed from Platform/BroxtonPlatformPkg/BuildBios.sh)10
-rw-r--r--Platform/BroxtonPlatformPkg/BuildIFWI.bat12
-rwxr-xr-xPlatform/BroxtonPlatformPkg/BuildIFWI.sh16
4 files changed, 26 insertions, 19 deletions
diff --git a/Platform/BroxtonPlatformPkg/BuildBios.bat b/Platform/BroxtonPlatformPkg/BuildBxtBios.bat
index 04fe6cc58d..7804dc58f7 100644
--- a/Platform/BroxtonPlatformPkg/BuildBios.bat
+++ b/Platform/BroxtonPlatformPkg/BuildBxtBios.bat
@@ -44,8 +44,7 @@ if exist conf\.cache rmdir /q/s conf\.cache
:: Override tools_def.txt
echo Creating Conf folder and build config files...
if not exist %WORKSPACE%\Conf md %WORKSPACE%\Conf
-copy /y %CORE_PATH%\BaseTools\Conf\*.template %WORKSPACE%\Conf\*.txt
-copy /y %WORKSPACE%\%PLATFORM_PATH%\DeviceCommonPkg\Override\BaseTools\Conf\tools_def.template %WORKSPACE%\Conf\tools_def.txt
+copy /y %WORKSPACE%\BaseTools\Conf\*.template %WORKSPACE%\Conf\*.txt
:: Setup EDK environment. Edksetup puts new copies of target.txt, tools_def.txt, build_rule.txt in WorkSpace\Conf
:: Also run edksetup as soon as possible to avoid it from changing environment variables we're overriding
@@ -576,9 +575,9 @@ goto :EOF
:Usage
echo.
echo ***************************************************************************
-echo Build BIOS Rom for BXT platforms.
+echo Build Edk II BIOS Rom for BXT platforms.
echo.
-echo Usage: BuildBios.bat [options] ^<PlatformType^> ^<BuildTarget^>
+echo Usage: %0 [options] ^<PlatformType^> ^<BuildTarget^>
echo.
echo. /? Display this help text
echo /l Log a copy of the build output to EDK2.log
diff --git a/Platform/BroxtonPlatformPkg/BuildBios.sh b/Platform/BroxtonPlatformPkg/BuildBxtBios.sh
index b6127e296b..d0b677fb77 100644
--- a/Platform/BroxtonPlatformPkg/BuildBios.sh
+++ b/Platform/BroxtonPlatformPkg/BuildBxtBios.sh
@@ -98,6 +98,9 @@ for (( i=1; i<=$#; ))
if [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/X64" ]; then
Arch=X64
shift
+ elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/MN" ]; then
+ BoardId=MN
+ shift
elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/BG" ]; then
BoardId=BG
shift
@@ -232,11 +235,6 @@ fi
./Platform/BroxtonPlatformPkg/Common/Tools/GenBiosId/GenBiosId -i Conf/BiosId.env -o $BUILD_PATH/$Arch/BiosId.bin
-
-echo
-echo "**** Replace DebugLib.h to save space.... ****"
-cp PlatformTools/GCC/DebugLib.h Core/MdePkg/Include/Library/
-
echo
echo "**** Copy ResetVector to original folder ****"
echo "**** Due to nasm can't execute in Ubuntu ****"
@@ -246,6 +244,8 @@ echo "Invoking EDK2 build..."
build $Build_Flags
+echo "check if Build was successful"
+
##**********************************************************************
## Post Build processing and cleanup
##**********************************************************************
diff --git a/Platform/BroxtonPlatformPkg/BuildIFWI.bat b/Platform/BroxtonPlatformPkg/BuildIFWI.bat
index 504258040e..a27362ae0a 100644
--- a/Platform/BroxtonPlatformPkg/BuildIFWI.bat
+++ b/Platform/BroxtonPlatformPkg/BuildIFWI.bat
@@ -2,6 +2,7 @@
SetLocal EnableDelayedExpansion EnableExtensions
:: Assign initial values
+set thisscript=%0
set exitCode=0
set "Build_Flags= "
set Arch=X64
@@ -116,7 +117,7 @@ if /i "%~1"=="/m" (
:: Require 2 input parameters
if "%~2"=="" (
echo. & echo -- ERROR: Not Enough Arguments Provided
- echo -- Please review the Help screen "/?" -- & echo.
+ echo -- Please review the Help screen %thisscript% "/?" -- & echo.
goto exit
)
@@ -129,8 +130,8 @@ echo ===========================================================================
echo Build_IFWI: Calling BIOS build Script...
echo.
-echo - call BuildBios.bat %buildthread% %Build_Flags% %Platform_Type% %Build_Target%
-call %WORKSPACE%\%PLATFORM_PATH%\BuildBios.bat %buildthread% %Build_Flags% %Platform_Type% %Build_Target%
+echo - call BuildBxtBios.bat %buildthread% %Build_Flags% %Platform_Type% %Build_Target%
+call %WORKSPACE%\%PLATFORM_PATH%\BuildBxtBios.bat %buildthread% %Build_Flags% %Platform_Type% %Build_Target%
if ErrorLevel 1 (
echo echo -- Error Building BIOS & echo.
set exitCode=1
@@ -170,7 +171,7 @@ if ErrorLevel 1 (
)
echo.
echo Build_IFWI is finished.
-echo The final IFWI file is located in Stitch\
+echo The final IFWI file is located in %WORKSPACE%\%PLATFORM_PATH%\Common\Tools\Stitch\
echo ======================================================================
@@ -180,11 +181,12 @@ goto Exit
if /i "%SkipUsageFlag%" == "TRUE" goto Exit
echo Script to build BIOS firmware and stitch the entire IFWI.
echo.
-echo Usage: BuildIFWI.bat [options] ^<PlatformType^> ^<BuildTarget^>
+echo Usage: %thisscript% [options] ^<PlatformType^> ^<BuildTarget^>
echo.
echo. /? Display this help text
echo /l Log a copy of the build output to EDK2.log
echo /c CleanAll before building
+echo /m Set the build thread count to number of processors
echo /FspW Build FSP and FSP Wrapper
echo /x64 Set Arch to X64 (default)
echo /vs08 Set compiler to VisualStudio 2008
diff --git a/Platform/BroxtonPlatformPkg/BuildIFWI.sh b/Platform/BroxtonPlatformPkg/BuildIFWI.sh
index 73766ccb4d..f5fb4b4a97 100755
--- a/Platform/BroxtonPlatformPkg/BuildIFWI.sh
+++ b/Platform/BroxtonPlatformPkg/BuildIFWI.sh
@@ -19,10 +19,12 @@ function Usage () {
echo
echo "Usage: BuildIFWI.sh Build_Flags Platform_Type Build_Target"
echo
- echo " Build_Flags: /A Set FabId to A (default: FAB_B)"
- echo " Build_Flags: /B Set FabId to B (default: FAB_B)"
- echo " Platform_Type [optional]: Broxton "
- echo " Build_Target: Release, Debug "
+ echo " Build_Flags: /MN Minnow3 Board (default: MN) "
+ echo " Build_Flags: /BG Benson Glacier Board "
+ echo " Build_Flags: /A Set FabId to A (default: FAB_B) "
+ echo " Build_Flags: /B Set FabId to B (default: FAB_B) "
+ echo " Platform_Type [optional]: Broxton "
+ echo " Build_Target: Release, Debug "
echo
echo "Press any key......"
read
@@ -56,6 +58,10 @@ for (( i=1; i<=$#; ))
Arch=X64
Build_Flags="$Build_Flags /x64"
shift
+ elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/MN" ]; then
+ BoardId=MN
+ Build_Flags="$Build_Flags /MN"
+ shift
elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/BG" ]; then
BoardId=BG
Build_Flags="$Build_Flags /BG"
@@ -94,7 +100,7 @@ fi
## Build BIOS
echo "======================================================================"
echo "Build_IFWI: Calling BIOS build Script..."
-bash Platform/BroxtonPlatformPkg/BuildBios.sh $Build_Flags $Platform_Type $Build_Target
+bash Platform/BroxtonPlatformPkg/BuildBxtBios.sh $Build_Flags $Platform_Type $Build_Target
echo
echo Finished Building Process.