From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.31, mailfrom: zailiang.sun@intel.com) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by groups.io with SMTP; Mon, 22 Jul 2019 18:31:01 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Jul 2019 18:31:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,297,1559545200"; d="scan'208";a="196945669" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga002.fm.intel.com with ESMTP; 22 Jul 2019 18:31:01 -0700 Received: from fmsmsx608.amr.corp.intel.com (10.18.126.88) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 22 Jul 2019 18:31:00 -0700 Received: from fmsmsx608.amr.corp.intel.com (10.18.126.88) by fmsmsx608.amr.corp.intel.com (10.18.126.88) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Mon, 22 Jul 2019 18:30:46 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by fmsmsx608.amr.corp.intel.com (10.18.126.88) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Mon, 22 Jul 2019 18:30:46 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.110]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.134]) with mapi id 14.03.0439.000; Tue, 23 Jul 2019 09:30:44 +0800 From: "Sun, Zailiang" To: "Kinney, Michael D" , "devel@edk2.groups.io" CC: "Qian, Yi" , Gary Lin Subject: Re: [edk2-platforms Patch V3 05/12] Vlv2Tbl2DevicePkg: Convert BAT/sh Build scripts to Python Thread-Topic: [edk2-platforms Patch V3 05/12] Vlv2Tbl2DevicePkg: Convert BAT/sh Build scripts to Python Thread-Index: AQHVQOEXzHh6G4I8Q0icWVIc0SVeH6bXarbA Date: Tue, 23 Jul 2019 01:30:44 +0000 Message-ID: <7CB7EF03E15B5D48981329A508747A9850C99061@SHSMSX104.ccr.corp.intel.com> References: <20190722225859.24724-1-michael.d.kinney@intel.com> <20190722225859.24724-6-michael.d.kinney@intel.com> In-Reply-To: <20190722225859.24724-6-michael.d.kinney@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: zailiang.sun@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Zailiang Sun > -----Original Message----- > From: Kinney, Michael D > Sent: Tuesday, July 23, 2019 6:59 AM > To: devel@edk2.groups.io > Cc: Sun, Zailiang ; Qian, Yi ; > Gary Lin > Subject: [edk2-platforms Patch V3 05/12] Vlv2Tbl2DevicePkg: Convert BAT/s= h > Build scripts to Python >=20 > Convert Build_IFWI and bld_vlv BAT/sh scripts to OS > independent python script PeBuild.py. This script > generates the BiosId file. Standard EDK II build > commands are used to build FW images and capsules. >=20 > * Sample VS2015x86 commands for IA32/X64 and DEBUG/RELEASE > build -a IA32 -a X64 -t VS2015x86 -p Vlv2TbltDevicePkg\PlatformPkgX64.d= sc > build -a IA32 -a X64 -t VS2015x86 -p Vlv2TbltDevicePkg\PlatformPkgX64.d= sc > build -a IA32 -t VS2015x86 -p Vlv2TbltDevicePkg\PlatformPkgIA32.= dsc > build -a IA32 -t VS2015x86 -p Vlv2TbltDevicePkg\PlatformPkgIA32.= dsc >=20 > * Sample GCC5 commands for IA32/X64 and DEBUG/RELEASE > build -a IA32 -a X64 -n 5 -t GCC5 -p Vlv2TbltDevicePkg/PlatformPkgX64.d= sc > build -a IA32 -a X64 -n 5 -t GCC5 -p Vlv2TbltDevicePkg/PlatformPkgX64.d= sc > build -a IA32 -n 5 -t GCC5 -p Vlv2TbltDevicePkg/PlatformPkgIA32.= dsc > build -a IA32 -n 5 -t GCC5 -p Vlv2TbltDevicePkg/PlatformPkgIA32.= dsc >=20 > Cc: Zailiang Sun > Cc: Yi Qian > Cc: Gary Lin > Signed-off-by: Michael D Kinney > --- > .../Intel/Vlv2TbltDevicePkg/Build_IFWI.bat | 118 ------ > .../Intel/Vlv2TbltDevicePkg/Build_IFWI.sh | 100 ----- > .../Vlv2TbltDevicePkg/PlatformCapsule.fdf | 48 --- > .../Vlv2TbltDevicePkg/PlatformCapsuleIA32.dsc | 39 -- > .../Vlv2TbltDevicePkg/PlatformCapsuleX64.dsc | 39 -- > .../Intel/Vlv2TbltDevicePkg/PlatformPkg.fdf | 30 +- > .../Vlv2TbltDevicePkg/PlatformPkgIA32.dsc | 13 +- > .../Vlv2TbltDevicePkg/PlatformPkgX64.dsc | 13 +- > Platform/Intel/Vlv2TbltDevicePkg/PreBuild.py | 348 ++++++++++++++++++ > Platform/Intel/Vlv2TbltDevicePkg/Readme.md | 64 ++-- > Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.bat | 303 --------------- > Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh | 222 ----------- > 12 files changed, 433 insertions(+), 904 deletions(-) > delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/Build_IFWI.bat > delete mode 100755 Platform/Intel/Vlv2TbltDevicePkg/Build_IFWI.sh > delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/PlatformCapsule.fdf > delete mode 100644 > Platform/Intel/Vlv2TbltDevicePkg/PlatformCapsuleIA32.dsc > delete mode 100644 > Platform/Intel/Vlv2TbltDevicePkg/PlatformCapsuleX64.dsc > create mode 100644 Platform/Intel/Vlv2TbltDevicePkg/PreBuild.py > delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.bat > delete mode 100755 Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh >=20 > diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Build_IFWI.bat > b/Platform/Intel/Vlv2TbltDevicePkg/Build_IFWI.bat > deleted file mode 100644 > index f65aa61f4a..0000000000 > --- a/Platform/Intel/Vlv2TbltDevicePkg/Build_IFWI.bat > +++ /dev/null > @@ -1,118 +0,0 @@ > -@REM @file > -@REM Windows batch file to build BIOS ROM > -@REM > -@REM Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<= BR> > -@REM SPDX-License-Identifier: BSD-2-Clause-Patent > -@REM > - > -@echo off > - > -SetLocal EnableDelayedExpansion EnableExtensions > - > -:: Assign initial values > -set exitCode=3D0 > -set "Build_Flags=3D " > -set PLATFORM_PACKAGE=3DVlv2TbltDevicePkg > - > -set PLATFORM_PATH=3D%WORKSPACE% > -if not exist %PLATFORM_PATH%\%PLATFORM_PACKAGE% ( > - if defined PACKAGES_PATH ( > - for %%i IN (%PACKAGES_PATH%) DO ( > - if exist %%~fi\%PLATFORM_PACKAGE% ( > - set PLATFORM_PATH=3D%%~fi > - goto PlatformPackageFound > - ) > - ) > - ) else ( > - echo. > - echo !!! ERROR !!! Cannot find %PLATFORM_PACKAGE% !!! > - echo. > - goto Exit > - ) > -) > -:PlatformPackageFound > - > -:: Parse Optional arguments > -:OptLoop > -if /i "%~1"=3D=3D"/?" goto Usage > - > -if /i "%~1"=3D=3D"/l" ( > - set Build_Flags=3D%Build_Flags% /l > - shift > - goto OptLoop > -) > -if /i "%~1"=3D=3D"/y" ( > - set Build_Flags=3D%Build_Flags% /y > - shift > - goto OptLoop > -) > -if /i "%~1"=3D=3D"/m" ( > - set Build_Flags=3D%Build_Flags% /m > - shift > - goto OptLoop > -) > -if /i "%~1" =3D=3D "/c" ( > - set Build_Flags=3D%Build_Flags% /c > - shift > - goto OptLoop > -) > -if /i "%~1"=3D=3D"/x64" ( > - set Build_Flags=3D%Build_Flags% /x64 > - shift > - goto OptLoop > -) > -if /i "%~1"=3D=3D"/IA32" ( > - set Build_Flags=3D%Build_Flags% /IA32 > - shift > - goto OptLoop > -) > - > -:: Require 2 input parameters > -if "%~2"=3D=3D"" goto Usage > - > -:: Assign required arguments > -set Platform_Type=3D%~1 > -set Build_Target=3D%~2 > - > -:: Build BIOS > -echo > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > -echo Build_IFWI: Calling BIOS build Script... > - > - > call %PLATFORM_PATH%\%PLATFORM_PACKAGE%\bld_vlv.bat %Build_Flag > s% %Platform_Type% %Build_Target% > - > -if %ERRORLEVEL% NEQ 0 ( > - echo echo -- Error Building BIOS & echo. > - set exitCode=3D1 > - goto exit > -) > -echo. > -echo Finished Building BIOS. > -goto Exit > - > -:Usage > -echo Script to build BIOS firmware and stitch the entire IFWI. > -echo. > -echo Usage: Build_IFWI.bat [options] PlatformType BuildTarget > -echo. > -echo /c CleanAll > -echo /l Generate build log file > -echo /y Generate build report file > -echo /m Enable multi-processor build > -echo /IA32 Set Arch to IA32 (default: X64) > -echo /X64 Set Arch to X64 (default: X64) > -echo. > -echo Platform Types: MNW2 > -echo Build Targets: Debug, Release (default: Debug) > -echo. > -echo Examples: > -echo Build_IFWI.bat MNW2 debug : X64 Debug build for Minnow= Max > -echo Build_IFWI.bat /IA32 MNW2 release : IA32 Release build for > MinnowMax > -echo. > -set exitCode=3D1 > - > -:Exit > -@REM CD to platform package. > -cd %PLATFORM_PATH% > -exit /b %exitCode% > - > -EndLocal > diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Build_IFWI.sh > b/Platform/Intel/Vlv2TbltDevicePkg/Build_IFWI.sh > deleted file mode 100755 > index 153c8c5fae..0000000000 > --- a/Platform/Intel/Vlv2TbltDevicePkg/Build_IFWI.sh > +++ /dev/null > @@ -1,100 +0,0 @@ > -#!/usr/bin/env bash > - > ##******************************************************** > ************** > -## Function define > - > ##******************************************************** > ************** > -function Usage ( ) { > - echo > - echo "Script to build BIOS firmware and stitch the entire IFWI." > - echo > - echo "Usage: Build_IFWI.sh [options] PlatformType BuildTarget" > - echo > - echo " /c CleanAll" > - echo " /l Generate build log file" > - echo " /y Generate build report file" > - echo " /m Enable multi-processor build" > - echo " /IA32 Set Arch to IA32 (default: X64)" > - echo " /X64 Set Arch to X64 (default: X64)" > - echo > - echo " Platform Types: MNW2" > - echo " Build Targets: Debug, Release (default: Debug)" > - echo > - echo "Examples:" > - echo " Build_IFWI.sh MNW2 debug : X64 Debug build for > MinnowMax" > - echo " Build_IFWI.sh /IA32 MNW2 release : IA32 Release build for > MinnowMax" > - echo > - exit 0 > -} > - > -set -e > - > -## Assign initial values > -exitCode=3D0 > -Build_Flags=3D > - > -## Check whether WORKSPACE is set or not > -if [[ -z "$WORKSPACE" ]]; then > - echo "Please export WORKSPACE before running Build_IFWI.sh" > - echo "See the details in Readme.md" > - exit 1 > -fi > - > -## Create $WORKSPACE/Conf if necessary > -if [ ! -d $WORKSPACE/Conf ]; then > - mkdir $WORKSPACE/Conf > -fi > - > -## Parse Optional arguments > -if [ "$1" =3D=3D "/?" ]; then > - Usage > -fi > - > -for (( i=3D1; i<=3D$#; )) > - do > - if [ "$(echo $1 | tr 'a-z' 'A-Z')" =3D=3D "/L" ]; then > - Build_Flags=3D"$Build_Flags /l" > - shift > - elif [ "$(echo $1 | tr 'a-z' 'A-Z')" =3D=3D "/Y" ]; then > - Build_Flags=3D"$Build_Flags /y" > - shift > - elif [ "$(echo $1 | tr 'a-z' 'A-Z')" =3D=3D "/M" ]; then > - Build_Flags=3D"$Build_Flags /m" > - shift > - elif [ "$(echo $1 | tr 'a-z' 'A-Z')" =3D=3D "/C" ]; then > - Build_Flags=3D"$Build_Flags /c" > - shift > - elif [ "$(echo $1 | tr 'a-z' 'A-Z')" =3D=3D "/X64" ]; then > - Build_Flags=3D"$Build_Flags /x64" > - shift > - elif [ "$(echo $1 | tr 'a-z' 'A-Z')" =3D=3D "/IA32" ]; then > - Build_Flags=3D"$Build_Flags /IA32" > - shift > - else > - break > - fi > - done > - > -## Require 2 input parameters > -if [ "$2" =3D=3D "" ]; then > - Usage > -fi > - > -## Assign required arguments > -Platform_Type=3D$1 > -Build_Target=3D$2 > - > -## Build BIOS > -echo > "=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D" > -echo "Build_IFWI: Calling BIOS build Script..." > -. bld_vlv.sh $Build_Flags $Platform_Type $Build_Target > - > -echo > -echo Finished Building BIOS. > - > -## Start Integration process > -echo > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > -echo Skip "Build_IFWI: Calling IFWI Stitching Script..." > - > -echo > -echo Build_IFWI is finished. > -echo The final IFWI file is located in Stitch > -echo > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformCapsule.fdf > b/Platform/Intel/Vlv2TbltDevicePkg/PlatformCapsule.fdf > deleted file mode 100644 > index d8b0074d6a..0000000000 > --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformCapsule.fdf > +++ /dev/null > @@ -1,48 +0,0 @@ > -## @file > -# FDF file of Platform capsule. > -# > -# Copyright (c) 2016 - 2019, Intel Corporation. > -# > -# SPDX-License-Identifier: BSD-2-Clause-Patent > -# > -## > - > -[FV.SystemFirmwareUpdateCargo] > -FvAlignment =3D 16 > -ERASE_POLARITY =3D 1 > -MEMORY_MAPPED =3D TRUE > -STICKY_WRITE =3D TRUE > -LOCK_CAP =3D TRUE > -LOCK_STATUS =3D TRUE > -WRITE_DISABLED_CAP =3D TRUE > -WRITE_ENABLED_CAP =3D TRUE > -WRITE_STATUS =3D TRUE > -WRITE_LOCK_CAP =3D TRUE > -WRITE_LOCK_STATUS =3D TRUE > -READ_DISABLED_CAP =3D TRUE > -READ_ENABLED_CAP =3D TRUE > -READ_STATUS =3D TRUE > -READ_LOCK_CAP =3D TRUE > -READ_LOCK_STATUS =3D TRUE > - > -FILE RAW =3D AF9C9EB2-12AD-4D3E-A4D4-96F6C9966215 { # > PcdEdkiiSystemFirmwareFileGuid > - > $(WORKSPACE)/$(OUTPUT_DIRECTORY)/$(TARGET)_$(TOOL_CHAIN_TAG)/F > V/Vlv.ROM > - } > - > -[FmpPayload.FmpPayloadSystemFirmwareRsa2048] > -IMAGE_HEADER_INIT_VERSION =3D 0x02 > -IMAGE_TYPE_ID =3D 4096267b-da0a-42eb-b5eb-fef31d207cb4 # > PcdSystemFmpCapsuleImageTypeIdGuid > -IMAGE_INDEX =3D 0x1 > -HARDWARE_INSTANCE =3D 0x0 > -MONOTONIC_COUNT =3D 0x2 > -CERTIFICATE_GUID =3D A7717414-C616-4977-9420-844712A735BF # > RSA2048SHA256 > - > -FILE DATA =3D > $(WORKSPACE)/$(OUTPUT_DIRECTORY)/$(TARGET)_$(TOOL_CHAIN_TAG)/F > V/SYSTEMFIRMWAREUPDATECARGO.Fv > - > -[Capsule.Vlv2Rec] > -CAPSULE_GUID =3D 6dcbd5ed-e82d-4c44-bda1-7194199ad92a # > gEfiFmpCapsuleGuid > -CAPSULE_FLAGS =3D PersistAcrossReset,InitiateReset > -CAPSULE_HEADER_SIZE =3D 0x20 > -CAPSULE_HEADER_INIT_VERSION =3D 0x1 > - > -FMP_PAYLOAD =3D FmpPayloadSystemFirmwareRsa2048 > diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformCapsuleIA32.dsc > b/Platform/Intel/Vlv2TbltDevicePkg/PlatformCapsuleIA32.dsc > deleted file mode 100644 > index 246347b8fa..0000000000 > --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformCapsuleIA32.dsc > +++ /dev/null > @@ -1,39 +0,0 @@ > -#/** @file > -# Platform capsule description. > -# > -# Copyright (c) 2016 - 2019, Intel Corporation. All rights reserved.
> -# > -# SPDX-License-Identifier: BSD-2-Clause-Patent > -# > -# > -#**/ > - > -[Defines] > - PLATFORM_NAME =3D Vlv2TbltDevicePkg > - PLATFORM_GUID =3D EE87F258-6ECC-4415-B1D8-23771BEE26E= 7 > - PLATFORM_VERSION =3D 0.1 > - FLASH_DEFINITION =3D Vlv2TbltDevicePkg/PlatformCapsule.f= df > - OUTPUT_DIRECTORY =3D Build/Vlv2TbltDevicePkgIA32 > - SUPPORTED_ARCHITECTURES =3D IA32|X64 > - BUILD_TARGETS =3D DEBUG|RELEASE > - SKUID_IDENTIFIER =3D DEFAULT > - POSTBUILD =3D python > Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleAll.py > - > - > ########################################################## > ######################################### > -# > -# Components Section - list of the modules and components that will be > processed by compilation > -# tools and the EDK II tools to generate PE32/PE32+= /Coff image > files. > -# > -# Note: The EDK II DSC file is not used to specify how compiled binary > images get placed > -# into firmware volume images. This section is just a list of modu= les to > compile from > -# source into UEFI-compliant binaries. > -# It is the FDF file that contains information on combining binary= files into > firmware > -# volume images, whose concept is beyond UEFI and is described in = PI > specification. > -# Binary modules do not need to be listed in this section, as they= should > be > -# specified in the FDF file. For example: Shell binary, FAT binary= (Fat.efi), > -# Logo (Logo.bmp), and etc. > -# There may also be modules listed in this section that are not re= quired in > the FDF file, > -# When a module listed here is excluded from FDF file, then UEFI- > compliant binary will be > -# generated for it, but the binary will not be put into any firmwa= re > volume. > -# > - > ########################################################## > ######################################### > diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformCapsuleX64.dsc > b/Platform/Intel/Vlv2TbltDevicePkg/PlatformCapsuleX64.dsc > deleted file mode 100644 > index 68bde30f83..0000000000 > --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformCapsuleX64.dsc > +++ /dev/null > @@ -1,39 +0,0 @@ > -#/** @file > -# Platform capsule description. > -# > -# Copyright (c) 2016 - 2019, Intel Corporation. All rights reserved.
> -# > -# SPDX-License-Identifier: BSD-2-Clause-Patent > -# > -# > -#**/ > - > -[Defines] > - PLATFORM_NAME =3D Vlv2TbltDevicePkg > - PLATFORM_GUID =3D EE87F258-6ECC-4415-B1D8-23771BEE26E= 7 > - PLATFORM_VERSION =3D 0.1 > - FLASH_DEFINITION =3D Vlv2TbltDevicePkg/PlatformCapsule.f= df > - OUTPUT_DIRECTORY =3D Build/Vlv2TbltDevicePkgX64 > - SUPPORTED_ARCHITECTURES =3D IA32|X64 > - BUILD_TARGETS =3D DEBUG|RELEASE > - SKUID_IDENTIFIER =3D DEFAULT > - POSTBUILD =3D python > Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleAll.py > - > - > ########################################################## > ######################################### > -# > -# Components Section - list of the modules and components that will be > processed by compilation > -# tools and the EDK II tools to generate PE32/PE32+= /Coff image > files. > -# > -# Note: The EDK II DSC file is not used to specify how compiled binary > images get placed > -# into firmware volume images. This section is just a list of modu= les to > compile from > -# source into UEFI-compliant binaries. > -# It is the FDF file that contains information on combining binary= files into > firmware > -# volume images, whose concept is beyond UEFI and is described in = PI > specification. > -# Binary modules do not need to be listed in this section, as they= should > be > -# specified in the FDF file. For example: Shell binary, FAT binary= (Fat.efi), > -# Logo (Logo.bmp), and etc. > -# There may also be modules listed in this section that are not re= quired in > the FDF file, > -# When a module listed here is excluded from FDF file, then UEFI- > compliant binary will be > -# generated for it, but the binary will not be put into any firmwa= re > volume. > -# > - > ########################################################## > ######################################### > diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.fdf > b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.fdf > index e958c1ebf2..48058b663a 100644 > --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.fdf > +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.fdf > @@ -711,9 +711,8 @@ [FV.FVMAIN_COMPACT] > !endif > } >=20 > -[FV.SETUP_DATA] > -BlockSize =3D $(FLASH_BLOCK_SIZE) > -#NumBlocks =3D 0x10 > +!if $(RECOVERY_ENABLE) > +[FV.SystemFirmwareUpdateCargo] > FvAlignment =3D 16 > ERASE_POLARITY =3D 1 > MEMORY_MAPPED =3D TRUE > @@ -731,6 +730,31 @@ [FV.SETUP_DATA] > READ_LOCK_CAP =3D TRUE > READ_LOCK_STATUS =3D TRUE >=20 > +FILE RAW =3D AF9C9EB2-12AD-4D3E-A4D4-96F6C9966215 { # > PcdEdkiiSystemFirmwareFileGuid > + FD =3D Vlv > +# > $(WORKSPACE)/$(OUTPUT_DIRECTORY)/$(TARGET)_$(TOOL_CHAIN_TAG)/F > V/Vlv.fd > + } > + > +[FmpPayload.FmpPayloadSystemFirmwareRsa2048] > +IMAGE_HEADER_INIT_VERSION =3D 0x02 > +IMAGE_TYPE_ID =3D 4096267b-da0a-42eb-b5eb-fef31d207cb4 # > PcdSystemFmpCapsuleImageTypeIdGuid > +IMAGE_INDEX =3D 0x1 > +HARDWARE_INSTANCE =3D 0x0 > +MONOTONIC_COUNT =3D 0x2 > +CERTIFICATE_GUID =3D A7717414-C616-4977-9420-844712A735BF # > RSA2048SHA256 > + > +FV =3D SystemFirmwareUpdateCargo > +#FILE DATA =3D > $(WORKSPACE)/$(OUTPUT_DIRECTORY)/$(TARGET)_$(TOOL_CHAIN_TAG)/F > V/SYSTEMFIRMWAREUPDATECARGO.Fv > + > +[Capsule.Vlv2Rec] > +CAPSULE_GUID =3D 6dcbd5ed-e82d-4c44-bda1-7194199ad92a # > gEfiFmpCapsuleGuid > +CAPSULE_FLAGS =3D PersistAcrossReset,InitiateReset > +CAPSULE_HEADER_SIZE =3D 0x20 > +CAPSULE_HEADER_INIT_VERSION =3D 0x1 > + > +FMP_PAYLOAD =3D FmpPayloadSystemFirmwareRsa2048 > +!endif > + >=20 > ########################################################## > ###################### > # > # Rules are use with the [FV] section's module INF type to define > diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc > b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc > index 121ebc9eee..5149dd5aa4 100644 > --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc > +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc > @@ -23,6 +23,8 @@ [Defines] > BUILD_TARGETS =3D DEBUG|RELEASE > SKUID_IDENTIFIER =3D DEFAULT > VPD_TOOL_GUID =3D 8C3D856A-9BE6-468E-850A-24F7A8= D38E08 > + PREBUILD =3D python Vlv2TbltDevicePkg/PreBu= ild.py > + POSTBUILD =3D python > Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleAll.py >=20 > DEFINE RC_BINARY_RELEASE =3D TRUE > # > @@ -213,7 +215,7 @@ [LibraryClasses.common] >=20 > TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/Tp > mMeasurementLibNull.inf > !endif >=20 > - BiosIdLib|BoardModulePkg/Library/BiosIdLib/DxeBiosIdLib.inf > + BiosIdLib|BoardModulePkg/Library/BiosIdLib/DxeBiosIdLib.inf >=20 > StallSmmLib|Vlv2TbltDevicePkg/Library/StallSmmLib/StallSmmLib.inf >=20 > @@ -242,6 +244,10 @@ [LibraryClasses.common] >=20 > BootLogoLib|MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf >=20 > +!if $(RECOVERY_ENABLE) > + > EdkiiSystemCapsuleLib|SignedCapsulePkg/Library/EdkiiSystemCapsuleLib/Ed > kiiSystemCapsuleLib.inf > +!endif > + > [LibraryClasses.IA32.SEC] > !if $(PERFORMANCE_ENABLE) =3D=3D TRUE >=20 > PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanc > eLibNull.inf > @@ -718,11 +724,10 @@ [PcdsDynamicExDefault.common.DEFAULT] > gEfiVLVTokenSpaceGuid.PcdCpuSmramCpuDataAddress|0 > gEfiVLVTokenSpaceGuid.PcdCpuLockBoxSize|0 > gEfiSecurityPkgTokenSpaceGuid.PcdUserPhysicalPresence|TRUE > - > -[PcdsDynamicExDefault.X64.DEFAULT] > + > gEfiMdeModulePkgTokenSpaceGuid.PcdSystemFmpCapsuleImageTypeIdGu > id|{GUID("$(FMP_MINNOW_MAX_SYSTEM)")}|VOID*|0x10 > !if $(RECOVERY_ENABLE) > + > gEfiSignedCapsulePkgTokenSpaceGuid.PcdEdkiiSystemFirmwareImageDescri > ptor|{0x0}|VOID*|0x100 >=20 > gEfiSignedCapsulePkgTokenSpaceGuid.PcdEdkiiSystemFirmwareFileGuid|{G > UID("AF9C9EB2-12AD-4D3E-A4D4-96F6C9966215")}|VOID*|0x10 > - > gEfiMdeModulePkgTokenSpaceGuid.PcdSystemFmpCapsuleImageTypeIdGu > id|{GUID("4096267b-da0a-42eb-b5eb-fef31d207cb4")}|VOID*|0x10 > !endif >=20 > [PcdsDynamicExVpd.common.DEFAULT] > diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc > b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc > index 3e4087f919..466512242c 100644 > --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc > +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc > @@ -23,6 +23,8 @@ [Defines] > BUILD_TARGETS =3D DEBUG|RELEASE > SKUID_IDENTIFIER =3D DEFAULT > VPD_TOOL_GUID =3D 8C3D856A-9BE6-468E-850A-24F7A8= D38E08 > + PREBUILD =3D python Vlv2TbltDevicePkg/PreBu= ild.py > + POSTBUILD =3D python > Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleAll.py >=20 > DEFINE RC_BINARY_RELEASE =3D TRUE > # > @@ -215,7 +217,7 @@ [LibraryClasses.common] >=20 > TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/Tp > mMeasurementLibNull.inf > !endif >=20 > - BiosIdLib|BoardModulePkg/Library/BiosIdLib/DxeBiosIdLib.inf > + BiosIdLib|BoardModulePkg/Library/BiosIdLib/DxeBiosIdLib.inf >=20 > StallSmmLib|Vlv2TbltDevicePkg/Library/StallSmmLib/StallSmmLib.inf >=20 > @@ -244,6 +246,10 @@ [LibraryClasses.common] >=20 > BootLogoLib|MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf >=20 > +!if $(RECOVERY_ENABLE) > + > EdkiiSystemCapsuleLib|SignedCapsulePkg/Library/EdkiiSystemCapsuleLib/Ed > kiiSystemCapsuleLib.inf > +!endif > + > [LibraryClasses.IA32.SEC] > !if $(PERFORMANCE_ENABLE) =3D=3D TRUE >=20 > PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanc > eLibNull.inf > @@ -720,11 +726,10 @@ [PcdsDynamicExDefault.common.DEFAULT] > gEfiVLVTokenSpaceGuid.PcdCpuSmramCpuDataAddress|0 > gEfiVLVTokenSpaceGuid.PcdCpuLockBoxSize|0 > gEfiSecurityPkgTokenSpaceGuid.PcdUserPhysicalPresence|TRUE > - > -[PcdsDynamicExDefault.X64.DEFAULT] > + > gEfiMdeModulePkgTokenSpaceGuid.PcdSystemFmpCapsuleImageTypeIdGu > id|{GUID("$(FMP_MINNOW_MAX_SYSTEM)")}|VOID*|0x10 > !if $(RECOVERY_ENABLE) > + > gEfiSignedCapsulePkgTokenSpaceGuid.PcdEdkiiSystemFirmwareImageDescri > ptor|{0x0}|VOID*|0x100 >=20 > gEfiSignedCapsulePkgTokenSpaceGuid.PcdEdkiiSystemFirmwareFileGuid|{G > UID("AF9C9EB2-12AD-4D3E-A4D4-96F6C9966215")}|VOID*|0x10 > - > gEfiMdeModulePkgTokenSpaceGuid.PcdSystemFmpCapsuleImageTypeIdGu > id|{GUID("4096267b-da0a-42eb-b5eb-fef31d207cb4")}|VOID*|0x10 > !endif >=20 > [PcdsDynamicExVpd.common.DEFAULT] > diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PreBuild.py > b/Platform/Intel/Vlv2TbltDevicePkg/PreBuild.py > new file mode 100644 > index 0000000000..220515c809 > --- /dev/null > +++ b/Platform/Intel/Vlv2TbltDevicePkg/PreBuild.py > @@ -0,0 +1,348 @@ > +## @file > +# PreBuild operations for Vlv2TbltDevicePkg > +# > +# Copyright (c) 2019, Intel Corporation. All rights reserved.
> +# > +# SPDX-License-Identifier: BSD-2-Clause-Patent > +# > + > +''' > +PreBuild > +''' > + > +import os > +import sys > +import argparse > +import subprocess > +import glob > +import shutil > +import struct > +import datetime > + > +# > +# Globals for help information > +# > +__prog__ =3D 'PreBuild' > +__copyright__ =3D 'Copyright (c) 2019, Intel Corporation. All rights r= eserved.' > +__description__ =3D 'Vlv2Tbl2DevicePkg pre-build operations.\n' > + > +# > +# Globals > +# > +gWorkspace =3D '' > +gBaseToolsPath =3D '' > +gArgs =3D None > + > +def LogAlways(Message): > + sys.stdout.write (__prog__ + ': ' + Message + '\n') > + sys.stdout.flush() > + > +def Log(Message): > + global gArgs > + if not gArgs.Verbose: > + return > + sys.stdout.write (__prog__ + ': ' + Message + '\n') > + sys.stdout.flush() > + > +def Error(Message, ExitValue=3D1): > + sys.stderr.write (__prog__ + ': ERROR: ' + Message + '\n') > + sys.exit (ExitValue) > + > +def RelativePath(target): > + global gWorkspace > + Log('RelativePath' + target) > + return os.path.relpath (target, gWorkspace) > + > +def NormalizePath(target): > + if isinstance(target, tuple): > + return os.path.normpath (os.path.join (*target)) > + else: > + return os.path.normpath (target) > + > +def RemoveFile(target): > + target =3D NormalizePath(target) > + if not target or target =3D=3D os.pathsep: > + Error ('RemoveFile() invalid target') > + if os.path.exists(target): > + os.remove (target) > + Log ('remove %s' % (RelativePath (target))) > + > +def RemoveDirectory(target): > + target =3D NormalizePath(target) > + if not target or target =3D=3D os.pathsep: > + Error ('RemoveDirectory() invalid target') > + if os.path.exists(target): > + Log ('rmdir %s' % (RelativePath (target))) > + shutil.rmtree(target) > + > +def CreateDirectory(target): > + target =3D NormalizePath(target) > + if not os.path.exists(target): > + Log ('mkdir %s' % (RelativePath (target))) > + os.makedirs (target) > + > +def Copy(src, dst): > + src =3D NormalizePath(src) > + dst =3D NormalizePath(dst) > + for File in glob.glob(src): > + Log ('copy %s -> %s' % (RelativePath (File), RelativePath (dst))= ) > + shutil.copy (File, dst) > + > +def GenCapsuleDevice (BaseName, PayloadFileName, Guid, Version, Lsv, > CapsulesPath, CapsulesSubDir): > + global gBaseToolsPath > + LogAlways ('Generate Capsule: {0} {1:08x} {2:08x} {3}'.format (Guid, > Version, Lsv, PayloadFileName)) > + > + VersionString =3D '.'.join([str(ord(x)) for x in struct.pack('>I', > Version).decode()]) > + > + FmpCapsuleFile =3D NormalizePath ((CapsulesPath, CapsulesSubDir, > BaseName + '.' + VersionString + '.cap')) > + Command =3D GenerateCapsuleCommand.format ( > + FMP_CAPSULE_GUID =3D Guid, > + FMP_CAPSULE_VERSION =3D Version, > + FMP_CAPSULE_LSV =3D Lsv, > + BASE_TOOLS_PATH =3D gBaseToolsPath, > + FMP_CAPSULE_FILE =3D FmpCapsuleFile, > + FMP_CAPSULE_PAYLOAD =3D PayloadFileName > + ) > + Command =3D ' '.join(Command.splitlines()).strip() > + if gArgs.Verbose: > + Command =3D Command + ' -v' > + > + Log (Command) > + > + Process =3D subprocess.Popen(Command, stdin=3Dsubprocess.PIPE, > stdout=3Dsubprocess.PIPE, stderr=3Dsubprocess.PIPE, shell=3DTrue) > + ProcessOutput =3D Process.communicate() > + > + if Process.returncode =3D=3D 0: > + Log (ProcessOutput[0].decode()) > + else: > + LogAlways (Command) > + LogAlways (ProcessOutput[0].decode()) > + Error ('GenerateCapsule returned an error') > + > + Copy (PayloadFileName, (CapsulesPath, 'firmware.bin')) > + MetaInfoXml =3D MetaInfoXmlTemplate > + MetaInfoXml =3D MetaInfoXml.replace ('FMP_CAPSULE_GUID', Guid) > + MetaInfoXml =3D MetaInfoXml.replace ('FMP_CAPSULE_BASE_NAME', > BaseName) > + MetaInfoXml =3D MetaInfoXml.replace > ('FMP_CAPSULE_VERSION_DECIMAL', str(Version)) > + MetaInfoXml =3D MetaInfoXml.replace ('FMP_CAPSULE_STRING', > VersionString) > + MetaInfoXml =3D MetaInfoXml.replace ('FMP_CAPSULE_DATE', > str(datetime.date.today())) > + f =3D open (NormalizePath ((CapsulesPath, 'firmware.metainfo.xml')),= 'w') > + f.write(MetaInfoXml) > + f.close() > + > + f =3D open (NormalizePath ((CapsulesPath, 'Lvfs.ddf')), 'w') > + f.write(LvfsDdfTemplate) > + f.close() > + > + if sys.platform =3D=3D "win32": > + Command =3D 'makecab /f ' + NormalizePath ((CapsulesPath, 'Lvfs.= ddf')) > + else: > + Command =3D 'gcab --create firmware.cab firmware.bin > firmware.metainfo.xml' > + Log (Command) > + > + Process =3D subprocess.Popen(Command, cwd=3DCapsulesPath, > stdin=3Dsubprocess.PIPE, stdout=3Dsubprocess.PIPE, stderr=3Dsubprocess.PI= PE, > shell=3DTrue) > + ProcessOutput =3D Process.communicate() > + > + if Process.returncode =3D=3D 0: > + Log (ProcessOutput[0].decode()) > + else: > + LogAlways (Command) > + LogAlways (ProcessOutput[0].decode()) > + Error ('GenerateCapsule returned an error') > + > + FmpCabinetFile =3D NormalizePath ((CapsulesPath, CapsulesSubDir, > BaseName + '.' + VersionString + '.cab')) > + > + Copy ((CapsulesPath, 'firmware.cab'), FmpCabinetFile) > + > + RemoveFile ((CapsulesPath, 'firmware.cab')) > + RemoveFile ((CapsulesPath, 'setup.inf')) > + RemoveFile ((CapsulesPath, 'setup.rpt')) > + RemoveFile ((CapsulesPath, 'Lvfs.ddf')) > + RemoveFile ((CapsulesPath, 'firmware.metainfo.xml')) > + RemoveFile ((CapsulesPath, 'firmware.bin')) > + > +BiosIdTemplate =3D ''' > +BOARD_ID =3D MNW2MAX > +BOARD_REV =3D $BOARD_REV > +BOARD_EXT =3D $ARCH > +VERSION_MAJOR =3D 0090 > +BUILD_TYPE =3D $BUILD_TYPE > +VERSION_MINOR =3D 01 > +''' > + > + > +if __name__ =3D=3D '__main__': > + # > + # Create command line argument parser object > + # > + parser =3D argparse.ArgumentParser ( > + prog =3D __prog__, > + description =3D __description__ + __copyright__, > + conflict_handler =3D 'resolve' > + ) > + parser.add_argument ( > + '-a', '--arch', dest =3D 'Arch', nargs =3D '+', action =3D = 'append', > + required =3D True, > + help =3D '''ARCHS is one of list: IA32, X64, IPF, ARM, AARC= H64 or EBC, > + which overrides target.txt's TARGET_ARCH definiti= on. To > + specify more archs, please repeat this option.''' > + ) > + parser.add_argument ( > + '-t', '--tagname', dest =3D 'ToolChain', required =3D True, > + help =3D '''Using the Tool Chain Tagname to build the platf= orm, > + overriding target.txt's TOOL_CHAIN_TAG definition= .''' > + ) > + parser.add_argument ( > + '-p', '--platform', dest =3D 'PlatformFile', required =3D T= rue, > + help =3D '''Build the platform specified by the DSC file na= me argument, > + overriding target.txt's ACTIVE_PLATFORM definitio= n.''' > + ) > + parser.add_argument ( > + '-b', '--buildtarget', dest =3D 'BuildTarget', required =3D= True, > + help =3D '''Using the TARGET to build the platform, overrid= ing > + target.txt's TARGET definition.''' > + ) > + parser.add_argument ( > + '--conf=3D', dest =3D 'ConfDirectory', required =3D True, > + help =3D '''Specify the customized Conf directory.''' > + ) > + parser.add_argument ( > + '-D', '--define', dest =3D 'Define', nargs=3D'*', action = =3D 'append', > + help =3D '''Macro: "Name [=3D Value]".''' > + ) > + parser.add_argument ( > + '-v', '--verbose', dest =3D 'Verbose', action =3D 'store_tr= ue', > + help =3D '''Turn on verbose output with informational messa= ges > printed''' > + ) > + parser.add_argument ( > + '--package', dest =3D 'Package', nargs =3D '*', action =3D = 'append', > + help =3D '''The directory name of a package of tests to cop= y''' > + ) > + > + # > + # Parse command line arguments > + # > + gArgs, remaining =3D parser.parse_known_args() > + gArgs.BuildType =3D 'all' > + for BuildType in ['all', 'fds', 'genc', 'genmake', 'clean', 'cleanal= l', 'modules', > 'libraries', 'run']: > + if BuildType in remaining: > + gArgs.BuildType =3D BuildType > + remaining.remove(BuildType) > + break > + gArgs.Remaining =3D ' '.join(remaining) > + > + # > + # Get WORKSPACE environment variable > + # > + try: > + gWorkspace =3D os.environ['WORKSPACE'] > + except: > + Error ('WORKSPACE environment variable not set') > + > + # > + # Get PACKAGES_PATH and generate prioritized list of paths > + # > + PathList =3D [gWorkspace] > + try: > + PathList +=3D os.environ['PACKAGES_PATH'].split(os.pathsep) > + except: > + pass > + > + # > + # Determine full path to BaseTools > + # > + Vlv2Tbl2DevicePkgPath =3D '' > + for Path in PathList: > + if gBaseToolsPath =3D=3D '': > + if os.path.exists (os.path.join (Path, 'BaseTools')): > + gBaseToolsPath =3D os.path.join (Path, 'BaseTools') > + if Vlv2Tbl2DevicePkgPath =3D=3D '': > + if os.path.exists (os.path.join (Path, 'Vlv2TbltDevicePkg'))= : > + Vlv2Tbl2DevicePkgPath =3D os.path.join (Path, 'Vlv2TbltD= evicePkg') > + if gBaseToolsPath =3D=3D '': > + Error ('Can not find BaseTools in WORKSPACE or PACKAGES_PATH') > + if Vlv2Tbl2DevicePkgPath =3D=3D '': > + Error ('Can not find Vlv2Tbl2DevicePkg in WORKSPACE or > PACKAGES_PATH') > + > + # > + # Parse OUTPUT_DIRECTORY from DSC file > + # > + for Path in PathList: > + if os.path.exists (os.path.join (Path, gArgs.PlatformFile)): > + Dsc =3D open (os.path.join (Path, gArgs.PlatformFile), 'r').= readlines() > + break > + for Line in Dsc: > + if Line.strip().startswith('OUTPUT_DIRECTORY'): > + OutputDirectory =3D Line.strip().split('=3D')[1].strip() > + break > + > + # > + # Determine full paths to EDK II build directory, EDK II build outpu= t > + # directory and the CPU arch of the UEFI phase. > + # > + CommandDir =3D os.path.dirname(sys.argv[0]) > + EdkiiBuildDir =3D os.path.join (gWorkspace, OutputDirectory) > + EdkiiBuildOutput =3D os.path.join (EdkiiBuildDir, gArgs.BuildTarget = + '_' + > gArgs.ToolChain) > + UefiArch =3D gArgs.Arch[0][0] > + if len (gArgs.Arch) > 1: > + if ['X64'] in gArgs.Arch: > + UefiArch =3D 'X64' > + > + if gArgs.BuildType =3D=3D 'run': > + Error ("'run' target not supported") > + if gArgs.BuildType =3D=3D 'clean': > + sys.exit (0) > + > + # > + # Create output directories to put BiosId files > + # > + try: > + CreateDirectory ((gWorkspace, 'Build')) > + except: > + pass > + try: > + CreateDirectory ((EdkiiBuildDir)) > + except: > + pass > + try: > + CreateDirectory ((EdkiiBuildOutput)) > + except: > + pass > + > + # > + # Generate BiosId files > + # > + BiosId =3D BiosIdTemplate > + if sys.platform =3D=3D "win32": > + # Built from a Windows Host OS > + BiosId =3D BiosId.replace ('$BOARD_REV', 'W') > + else: > + # Built from a Linux/Unix/Mac Host OS > + BiosId =3D BiosId.replace ('$BOARD_REV', 'L') > + if UefiArch =3D=3D 'X64': > + BiosId =3D BiosId.replace ('$ARCH', 'X64') > + else: > + BiosId =3D BiosId.replace ('$ARCH', 'I32') > + BiosId =3D BiosId.replace ('$BUILD_TYPE', gArgs.BuildTarget[0]) > + > + BiosIdFileName =3D NormalizePath ((EdkiiBuildOutput, 'BiosId.env')) > + f =3D open (BiosIdFileName, 'w') > + f.write(BiosId) > + f.close() > + > + Command =3D 'python ' + NormalizePath ((Vlv2Tbl2DevicePkgPath, > '../Tools/GenBiosId/GenBiosId.py')) > + Command =3D Command + ' -i ' + BiosIdFileName > + Command =3D Command + ' -o ' + NormalizePath ((EdkiiBuildOutput, > 'BiosId.bin')) > + Command =3D Command + ' -ot ' + NormalizePath ((EdkiiBuildOutput, > 'BiosId.txt')) > + > + LogAlways (Command) > + > + Process =3D subprocess.Popen(Command, stdin=3Dsubprocess.PIPE, > stdout=3Dsubprocess.PIPE, stderr=3Dsubprocess.PIPE, shell=3DTrue) > + ProcessOutput =3D Process.communicate() > + > + if Process.returncode =3D=3D 0: > + Log (ProcessOutput[0].decode()) > + else: > + LogAlways (Command) > + LogAlways (ProcessOutput[0].decode()) > + Error ('GenBiosId returned an error') > diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Readme.md > b/Platform/Intel/Vlv2TbltDevicePkg/Readme.md > index 97180ef7af..94f15ccd67 100644 > --- a/Platform/Intel/Vlv2TbltDevicePkg/Readme.md > +++ b/Platform/Intel/Vlv2TbltDevicePkg/Readme.md > @@ -57,12 +57,15 @@ powershell Expand-Archive nasm-2.13.03-win64.zip . >=20 > set WORKSPACE=3D%CD% > set PACKAGES_PATH=3D%WORKSPACE%\edk2;%WORKSPACE%\edk2- > platforms\Silicon\Intel;%WORKSPACE%\edk2- > platforms\Platform\Intel;%WORKSPACE%\edk2-non-osi\Silicon\Intel > +set EDK_TOOLS_PATH=3D%WORKSPACE%\edk2\BaseTools > path=3D%path%;%WORKSPACE%\openssl-1.0.2r-x64_86-win64 > set NASM_PREFIX=3D%WORKSPACE%\nasm-2.13.03\ >=20 > -cd edk2-platforms\Platform\Intel\Vlv2TbltDevicePkg > +cd %WORKSPACE%\edk2 >=20 > -Build_IFWI.bat /m MNW2 Debug > +edksetup.bat Rebuild > + > +build -a IA32 -a X64 -n 5 -t VS2015x86 -b DEBUG -p > Vlv2TbltDevicePkg\PlatformPkgX64.dsc > ``` >=20 > Once all the code and tools are downloaded and installed, only the follo= wing > @@ -72,8 +75,14 @@ directory used to install the source and binaries. > ``` > set WORKSPACE=3D%CD% > set PACKAGES_PATH=3D%WORKSPACE%\edk2;%WORKSPACE%\edk2- > platforms\Silicon\Intel;%WORKSPACE%\edk2- > platforms\Platform\Intel;%WORKSPACE%\edk2-non-osi\Silicon\Intel > +set EDK_TOOLS_PATH=3D%WORKSPACE%\edk2\BaseTools > path=3D%path%;%WORKSPACE%\openssl-1.0.2r-x64_86-win64 > set NASM_PREFIX=3D%WORKSPACE%\nasm-2.13.03\ > + > +cd %WORKSPACE%\edk2 > + > +edksetup.bat Rebuild > + > ``` >=20 > Once the environment is setup, the MinnowBoard MAX firmware and > capsules can be > @@ -82,39 +91,43 @@ rebuilt using the following commands. > * Build X64 Debug Image with report file >=20 > ``` > -cd edk2-platforms\Platform\Intel\Vlv2TbltDevicePkg > -Build_IFWI.bat /m /y MNW2 Debug > +build -a IA32 -a X64 -n 5 -t VS2015x86 -b DEBUG -p > Vlv2TbltDevicePkg\PlatformPkgX64.dsc -y Vlv.report > ``` >=20 > * Build X64 Release Image with build log >=20 > ``` > -cd edk2-platforms\Platform\Intel\Vlv2TbltDevicePkg > -Build_IFWI.bat /m /l MNW2 Release > +build -a IA32 -a X64 -n 5 -t VS2015x86 -b RELEASE > Vlv2TbltDevicePkg\PlatformPkgX64.dsc -j Vlv.log > ``` >=20 > * Build IA32 Debug Image >=20 > ``` > -cd edk2-platforms\Platform\Intel\Vlv2TbltDevicePkg > -Build_IFWI.bat /m /IA32 MNW2 Debug > +build -a IA32 -n 5 -t VS2015x86 -b DEBUG -p > Vlv2TbltDevicePkg\PlatformPkgIA32.dsc > ``` >=20 > The generated firmware image is the build output directory below > WORKSPACE. For > exampple, the X64 Debug Image is at: >=20 > -`Build\Vlv2TbltDevicePkg\DEBUG_VS2015x86\FV\Vlv.ROM` > +`Build\Vlv2TbltDevicePkgX64\DEBUG_VS2015x86\FV\Vlv.fd` >=20 > And the IA32 Release image is at: >=20 > -`Build\Vlv2TbltDevicePkgIA32\RELEASE_VS2015x86\FV\Vlv.ROM` > +`Build\Vlv2TbltDevicePkgIA32\RELEASE_VS2015x86\FV\Vlv.fd` >=20 > The X64 CapsuleApp and generated UEFI Capsules are in the directory >=20 > -`Build\Vlv2TbltDevicePkg\Capsules` > +`Build\Vlv2TbltDevicePkgX64\Capsules` >=20 > # Linux Pre-requisites >=20 > +* git > +* python > +* iasl > +* nasm > +* openssl > +* gcab > + > # Download and Build MinnowMax using Linux/GCC >=20 > Run the script below from an empty directory. The script clones the EDK= II > @@ -132,10 +145,12 @@ git clone https://github.com/tianocore/edk2- > platforms.git > git clone https://github.com/tianocore/edk2-non-osi.git >=20 > export WORKSPACE=3D$PWD > +export PACKAGES_PATH=3D$WORKSPACE/edk2:$WORKSPACE/edk2- > platforms/Silicon/Intel:$WORKSPACE/edk2- > platforms/Platform/Intel:$WORKSPACE/edk2-non-osi/Silicon/Intel > +cd $WORKSPACE/edk2 >=20 > -cd edk2-platforms/Platform/Intel/Vlv2TbltDevicePkg > +. edksetup.sh >=20 > -./Build_IFWI.sh /m MNW2 Debug > +build -a IA32 -a X64 -n 5 -t GCC5 -b DEBUG -p > Vlv2TbltDevicePkg/PlatformPkgX64.dsc > ``` >=20 > Once all the code is downloaded and installed, only the following comman= ds > are > @@ -143,7 +158,11 @@ required to setup the environment. Run these from > the same directory used to > install the source and binaries. >=20 > ``` > -export WORKSPACE=3D$PWD/edk2 > +export WORKSPACE=3D$PWD > +export PACKAGES_PATH=3D$WORKSPACE/edk2:$WORKSPACE/edk2- > platforms/Silicon/Intel:$WORKSPACE/edk2- > platforms/Platform/Intel:$WORKSPACE/edk2-non-osi/Silicon/Intel > +cd $WORKSPACE/edk2 > + > +. edksetup.sh > ``` >=20 > Once the environment is setup, the MinnowBoard MAX firmware and > capsules can be > @@ -152,36 +171,33 @@ rebuilt using the following commands. > * Build X64 Debug Image with report file >=20 > ``` > -cd edk2-platforms/Platform/Intel/Vlv2TbltDevicePkg > -./Build_IFWI.sh /m /y MNW2 Debug > +build -a IA32 -a X64 -n 5 -t GCC5 -b DEBUG -p > Vlv2TbltDevicePkg/PlatformPkgX64.dsc -y Vlv.report > ``` >=20 > * Build X64 Release Image with build log >=20 > ``` > -cd edk2-platforms/Platform/Intel/Vlv2TbltDevicePkg > -./Build_IFWI.sh /m /l MNW2 Release > +build -a IA32 -a X64 -n 5 -t GCC5 -b RELEASE -p > Vlv2TbltDevicePkg/PlatformPkgX64.dsc -j Vlv.log > ``` >=20 > * Build IA32 Debug Image >=20 > ``` > -cd edk2-platforms/Platform/Intel/Vlv2TbltDevicePkg > -./Build_IFWI.sh /m /IA32 MNW2 Debug > +build -a IA32 -n 5 -t GCC5 -b DEBUG -p > Vlv2TbltDevicePkg/PlatformPkgIA32.dsc > ``` >=20 > The generated firmware image is the build output directory below > WORKSPACE. For > exampple, the X64 Debug Image is at: >=20 > -`Build/Vlv2TbltDevicePkg/DEBUG_GCC5/FV/Vlv.ROM` > +`Build/Vlv2TbltDevicePkgX64/DEBUG_GCC5/FV/Vlv.fd` >=20 > And the IA32 Release image is at: >=20 > -`Build/Vlv2TbltDevicePkgIA32/RELEASE_GCC5/FV/Vlv.ROM` > +`Build/Vlv2TbltDevicePkgIA32/RELEASE_GCC5/FV/Vlv.fd` >=20 > The X64 CapsuleApp and generated UEFI Capsules are in the directory >=20 > -`Build/Vlv2TbltDevicePkg/Capsules` > +`Build/Vlv2TbltDevicePkgX64/Capsules` >=20 > # Use DediProg to update FLASH image on a MinnowBoard MAX Target >=20 > @@ -192,7 +208,7 @@ The X64 CapsuleApp and generated UEFI Capsules are > in the directory > * Boot MinnowBoard MAX to the Boot Manager > * Boot the `EFI Internal Shell` boot option > * Mount the USB FLASH Drive (usually `FS1`) > -* Use `cd` command to go to `Capsules/TestCert` directory > +* Use `cd` command to go to `Capsules/TestCert_*` directory > * Run the following command to apply all four capsules >=20 > ``` > diff --git a/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.bat > b/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.bat > deleted file mode 100644 > index fb634c490c..0000000000 > --- a/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.bat > +++ /dev/null > @@ -1,303 +0,0 @@ > -@REM @file > -@REM Windows batch file to build BIOS ROM > -@REM > -@REM Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<= BR> > -@REM SPDX-License-Identifier: BSD-2-Clause-Patent > -@REM > - > -@echo off > -setlocal EnableDelayedExpansion EnableExtensions > -echo. > -echo %date% %time% > -echo. > - > - > ::********************************************************* > ************* > -:: Initial Setup > - > ::********************************************************* > ************* > -if %WORKSPACE:~-1%=3D=3D\ set WORKSPACE=3D%WORKSPACE:~0,-1% > -set /a build_threads=3D1 > -set "Build_Flags=3D " > -set exitCode=3D0 > -set Arch=3DX64 > -set GenLog=3DFALSE > -set GenReport=3DFALSE > -set Clean=3DFALSE > -set PLATFORM_NAME=3DVlv2TbltDevicePkg > - > - > ::********************************************************* > ************* > -:: Detect full path to the edk2 repo > - > ::********************************************************* > ************* > -set CORE_PATH=3D%WORKSPACE% > -if not exist %CORE_PATH%\edksetup.bat ( > - if defined PACKAGES_PATH ( > - for %%i IN (%PACKAGES_PATH%) DO ( > - if exist %%~fi\edksetup.bat ( > - set CORE_PATH=3D%%~fi > - goto CorePathFound > - ) > - ) > - ) else ( > - echo. > - echo !!! ERROR !!! Cannot find edksetup.bat !!! > - echo. > - goto BldFail > - ) > -) > -:CorePathFound > - > - > ::********************************************************* > ************* > -:: Detect full path to the Vlv2TbltDevicePkg > - > ::********************************************************* > ************* > -set PLATFORM_PACKAGE=3D%WORKSPACE%\%PLATFORM_NAME% > -if not exist %PLATFORM_PACKAGE% ( > - if defined PACKAGES_PATH ( > - for %%i IN (%PACKAGES_PATH%) DO ( > - if exist %%~fi\%PLATFORM_NAME% ( > - set PLATFORM_PACKAGE=3D%%~fi\%PLATFORM_NAME% > - goto PlatformPackageFound > - ) > - ) > - ) else ( > - echo. > - echo !!! ERROR !!! Cannot find %PLATFORM_NAME% !!! > - echo. > - goto BldFail > - ) > -) > -:PlatformPackageFound > - > -cd %CORE_PATH% > - > - > ::********************************************************* > ************* > -:: Run edksetup.bat and make sure tools are up to date > - > ::********************************************************* > ************* > - > -call %CORE_PATH%\edksetup.bat Rebuild > -@echo off > - > - > ::********************************************************* > ************* > -:: Parse command line arguments > - > ::********************************************************* > ************* > - > -:: Optional arguments > -:OptLoop > -if /i "%~1"=3D=3D"/?" goto Usage > - > -if /i "%~1"=3D=3D"/l" ( > - set GenLog=3DTRUE > - shift > - goto OptLoop > -) > -if /i "%~1"=3D=3D"/y" ( > - set GenReport=3DTRUE > - shift > - goto OptLoop > -) > -if /i "%~1"=3D=3D"/m" ( > - if defined NUMBER_OF_PROCESSORS ( > - set /a build_threads=3D%NUMBER_OF_PROCESSORS%+1 > - ) > - shift > - goto OptLoop > -) > -if /i "%~1" =3D=3D "/c" ( > - set Clean=3DTRUE > - shift > - goto OptLoop > -) > - > -if /i "%~1"=3D=3D"/x64" ( > - set Arch=3DX64 > - shift > - goto OptLoop > -) > -if /i "%~1"=3D=3D"/IA32" ( > - set Arch=3DIA32 > - shift > - goto OptLoop > -) > - > -:: Required argument(s) > -if "%~1"=3D=3D"" goto Usage > - > -if /i "%~2" =3D=3D "RELEASE" ( > - set target=3DRELEASE > -) else ( > - set target=3DDEBUG > -) > - > - > ::********************************************************* > ************* > -:: Detect TOOL_CHAIN_TAG > - > ::********************************************************* > ************* > - > -echo. > -echo Setting the Build environment for > VS2015/VS2013/VS2012/VS2010/VS2008... > -if defined VS140COMNTOOLS ( > - if not defined VSINSTALLDIR call "%VS140COMNTOOLS%\vsvars32.bat" > - if /I "%VS140COMNTOOLS%" =3D=3D "C:\Program Files\Microsoft Visual Stu= dio > 14.0\Common7\Tools\" ( > - set TOOL_CHAIN_TAG=3DVS2015 > - ) else ( > - set TOOL_CHAIN_TAG=3DVS2015x86 > - ) > -) else if defined VS120COMNTOOLS ( > - if not defined VSINSTALLDIR call "%VS120COMNTOOLS%\vsvars32.bat" > - if /I "%VS120COMNTOOLS%" =3D=3D "C:\Program Files\Microsoft Visual Stu= dio > 12.0\Common7\Tools\" ( > - set TOOL_CHAIN_TAG=3DVS2013 > - ) else ( > - set TOOL_CHAIN_TAG=3DVS2013x86 > - ) > -) else if defined VS110COMNTOOLS ( > - if not defined VSINSTALLDIR call "%VS110COMNTOOLS%\vsvars32.bat" > - if /I "%VS110COMNTOOLS%" =3D=3D "C:\Program Files\Microsoft Visual Stu= dio > 11.0\Common7\Tools\" ( > - set TOOL_CHAIN_TAG=3DVS2012 > - ) else ( > - set TOOL_CHAIN_TAG=3DVS2012x86 > - ) > -) else if defined VS100COMNTOOLS ( > - if not defined VSINSTALLDIR call "%VS100COMNTOOLS%\vsvars32.bat" > - if /I "%VS100COMNTOOLS%" =3D=3D "C:\Program Files\Microsoft Visual Stu= dio > 10.0\Common7\Tools\" ( > - set TOOL_CHAIN_TAG=3DVS2010 > - ) else ( > - set TOOL_CHAIN_TAG=3DVS2010x86 > - ) > -) else if defined VS90COMNTOOLS ( > - if not defined VSINSTALLDIR call "%VS90COMNTOOLS%\vsvars32.bat" > - if /I "%VS90COMNTOOLS%" =3D=3D "C:\Program Files\Microsoft Visual Stud= io > 9.0\Common7\Tools\" ( > - set TOOL_CHAIN_TAG=3DVS2008 > - ) else ( > - set TOOL_CHAIN_TAG=3DVS2008x86 > - ) > -) else ( > - echo --ERROR: VS2015/VS2013/VS2012/VS2010/VS2008 not installed > correctly. > VS140COMNTOOLS/VS120COMNTOOLS/VS110COMNTOOLS/VS100COMNTO > OLS/VS90COMNTOOLS not defined ^^! > - echo. > - goto :BldFail > -) > - > - > ::********************************************************* > ************* > -:: Generate BUILD_PATH and make sure the directory exists > - > ::********************************************************* > ************* > - > -echo Ensuring correct build directory is present > -if not exist %WORKSPACE%\Build mkdir %WORKSPACE%\Build > -if not exist %WORKSPACE%\Build\%PLATFORM_NAME%%Arch% > mkdir %WORKSPACE%\Build\%PLATFORM_NAME%%Arch% > -set > BUILD_PATH=3D%WORKSPACE%\Build\%PLATFORM_NAME%%Arch%\%TARG > ET%_%TOOL_CHAIN_TAG% > -if not exist %BUILD_PATH% mkdir %BUILD_PATH% > - > - > ::********************************************************* > ************* > -:: Check for clean operation > - > ::********************************************************* > ************* > - > -if "%Clean%"=3D=3D"TRUE" ( > - echo Removing previous build files ... > - if exist %BUILD_PATH% ( > - rmdir /s/q %BUILD_PATH% > - ) > - if exist %WORKSPACE%\Conf\.cache ( > - rmdir /s/q %WORKSPACE%\Conf\.cache > - ) > - echo. > - goto :Exit > -) > - > - > ::********************************************************* > ************* > -:: Generate Build_Flags > - > ::********************************************************* > ************* > - > -set Build_Flags=3D%Build_Flags% -b %TARGET% > -if "%Arch%"=3D=3D"IA32" ( > - set Build_Flags=3D%Build_Flags% -a IA32 > -) else if "%Arch%"=3D=3D"X64" ( > - set Build_Flags=3D%Build_Flags% -a IA32 -a X64 > -) > -set Build_Flags=3D%Build_Flags% -t %TOOL_CHAIN_TAG% > -set Build_Flags=3D%Build_Flags% -n %build_threads% > -set Capsule_Build_Flags=3D%Build_Flags% > -set Build_Flags=3D%Build_Flags% - > p %PLATFORM_PACKAGE%/PlatformPkg%Arch%.dsc > -if "%GenLog%"=3D=3D"TRUE" ( > - set Build_Flags=3D%Build_Flags% - > j %BUILD_PATH%\%PLATFORM_NAME%.log > -) > -if "%GenReport%"=3D=3D"TRUE" ( > - set Build_Flags=3D%Build_Flags% - > y %BUILD_PATH%\%PLATFORM_NAME%.report > -) > - > - > ::********************************************************* > ************* > -:: Generate BIOS ID > - > ::********************************************************* > ************* > - > -echo BOARD_ID =3D MNW2MAX > %BUILD_PATH%/BiosId.env > -echo BOARD_REV =3D W >> %BUILD_PATH%/BiosId.env > -if "%Arch%"=3D=3D"IA32" ( > - echo BOARD_EXT =3D I32 >> %BUILD_PATH%/BiosId.env > -) > -if "%Arch%"=3D=3D"X64" ( > - echo BOARD_EXT =3D X64 >> %BUILD_PATH%/BiosId.env > -) > -echo VERSION_MAJOR =3D 0090 >> %BUILD_PATH%/BiosId.env > -if "%TARGET%"=3D=3D"DEBUG" ( > - echo BUILD_TYPE =3D D >> %BUILD_PATH%/BiosId.env > -) > -if "%TARGET%"=3D=3D"RELEASE" ( > - echo BUILD_TYPE =3D R >> %BUILD_PATH%/BiosId.env > -) > -echo VERSION_MINOR =3D 01 >> %BUILD_PATH%/BiosId.env > - > -%WORKSPACE%\edk2- > platforms\Platform\Intel\Tools\GenBiosId\GenBiosId.py - > i %BUILD_PATH%/BiosId.env -o %BUILD_PATH%/BiosId.bin - > ot %BUILD_PATH%/BiosId.txt > - > - > ::********************************************************* > ************* > -:: Build BIOS > - > ::********************************************************* > ************* > - > -echo. > -echo Invoking EDK2 build... > -echo build %Build_Flags% > - > -call build %Build_Flags% > - > -if %ERRORLEVEL% NEQ 0 goto BldFail > - > -copy %BUILD_PATH%\FV\VLV.fd %BUILD_PATH%\FV\Vlv.ROM > - > - > ::********************************************************* > ************* > -:: Build Capsules > - > ::********************************************************* > ************* > -echo Invoking EDK2 build for capsules... > -echo build %Capsule_Build_Flags% - > p %PLATFORM_PACKAGE%\PlatformCapsule%Arch%.dsc > -call build %Capsule_Build_Flags% - > p %PLATFORM_PACKAGE%\PlatformCapsule%Arch%.dsc > - > -goto Exit > - > -:Usage > -echo. > -echo > ********************************************************** > ***************** > -echo Build BIOS rom for VLV platforms. > -echo. > -echo Usage: bld_vlv.bat [options] PlatformType [Build Target] > -echo. > -echo /c CleanAll > -echo /l Generate build log file > -echo /y Generate build report file > -echo /m Enable multi-processor build > -echo /IA32 Set Arch to IA32 (default: X64) > -echo /X64 Set Arch to X64 (default: X64) > -echo. > -echo Platform Types: MNW2 > -echo Build Targets: Debug, Release (default: Debug) > -echo. > -echo Examples: > -echo bld_vlv.bat MNW2 : X64 Debug build for MinnowMax > -echo bld_vlv.bat /IA32 MNW2 release : IA32 Release build for > MinnowMax > -echo. > -echo > ********************************************************** > ***************** > -set exitCode=3D1 > -goto Exit > - > -:BldFail > -set exitCode=3D1 > -echo -- Error: EDKII BIOS Build has failed! > -echo See EDK2.log for more details > - > -:Exit > -echo %date% %time% > -exit /b %exitCode% > - > -EndLocal > diff --git a/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh > b/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh > deleted file mode 100755 > index c8db91c6dc..0000000000 > --- a/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh > +++ /dev/null > @@ -1,222 +0,0 @@ > -#!/usr/bin/env bash > - > ##******************************************************** > ************** > -## Function define > - > ##******************************************************** > ************** > -function Usage() { > - echo > - echo > "********************************************************** > *****************" > - echo "Build BIOS rom for VLV platforms." > - echo > - echo "Usage: bld_vlv.sh [options] PlatformType [Build Target]" > - echo > - echo " /c CleanAll" > - echo " /l Generate build log file" > - echo " /y Generate build report file" > - echo " /m Enable multi-processor build" > - echo " /IA32 Set Arch to IA32 (default: X64)" > - echo " /X64 Set Arch to X64 (default: X64)" > - echo > - echo " Platform Types: MNW2" > - echo " Build Targets: Debug, Release (default: Debug)" > - echo > - echo "Examples:" > - echo " bld_vlv.sh MNW2 : X64 Debug build for MinnowM= ax" > - echo " bld_vlv.sh /IA32 MNW2 release : IA32 Release build for > MinnowMax" > - echo > "********************************************************** > *****************" > - exit 0 > -} > - > -set -e > - > -cd .. > -echo -e $(date) > - > ##******************************************************** > ************** > -## Initial Setup > - > ##******************************************************** > ************** > -#build_threads=3D($NUMBER_OF_PROCESSORS)+1 > -Build_Flags=3D > -exitCode=3D0 > -build_threads=3D1 > -Arch=3DX64 > -GenLog=3DFALSE > -GenReport=3DFALSE > -Clean=3DFALSE > - > - > -export CORE_PATH=3D$WORKSPACE/edk2 > -export PLATFORM_PATH=3D$WORKSPACE/edk2-platforms/Platform/Intel/ > -export SILICON_PATH=3D$WORKSPACE/edk2-platforms/Silicon/Intel/ > -export BINARY_PATH=3D$WORKSPACE/edk2-non-osi/Silicon/Intel/ > -export > PACKAGES_PATH=3D$PLATFORM_PATH:$SILICON_PATH:$BINARY_PATH:$COR > E_PATH > - > -## 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 > -cd $CORE_PATH > -. edksetup.sh BaseTools > -make -C BaseTools > - > -## Define platform specific environment variables. > -PLATFORM_NAME=3DVlv2TbltDevicePkg > -PLATFORM_PACKAGE=3DVlv2TbltDevicePkg > -PLATFORM_PKG_PATH=3D$PLATFORM_PATH/$PLATFORM_PACKAGE > - > -cd $PLATFORM_PKG_PATH > - > - > ##******************************************************** > ************** > -## Parse command line arguments > - > ##******************************************************** > ************** > - > -## Optional arguments > -for (( i=3D1; i<=3D$#; )) > - do > - if [ "$1" =3D=3D "/?" ]; then > - Usage > - elif [ "$(echo $1 | tr 'a-z' 'A-Z')" =3D=3D "/L" ]; then > - GenLog=3DTRUE > - shift > - elif [ "$(echo $1 | tr 'a-z' 'A-Z')" =3D=3D "/Y" ]; then > - GenReport=3DTRUE > - shift > - elif [ "$(echo $1 | tr 'a-z' 'A-Z')" =3D=3D "/M" ]; then > - build_threads=3D8 > - shift > - elif [ "$(echo $1 | tr 'a-z' 'A-Z')" =3D=3D "/C" ]; then > - Clean=3DTRUE > - shift > - elif [ "$(echo $1 | tr 'a-z' 'A-Z')" =3D=3D "/X64" ]; then > - Arch=3DX64 > - shift > - elif [ "$(echo $1 | tr 'a-z' 'A-Z')" =3D=3D "/IA32" ]; then > - Arch=3DIA32 > - shift > - else > - break > - fi > - done > - > -## Required argument(s) > -if [ "$2" =3D=3D "" ]; then > - Usage > -fi > - > -echo "Setting $1 platform configuration and BIOS ID..." > - > -if [ "$(echo $2 | tr 'a-z' 'A-Z')" =3D=3D "RELEASE" ]; then > - export TARGET=3DRELEASE > -else > - export TARGET=3DDEBUG > -fi > - > - > ##******************************************************** > ************** > -## Detect TOOL_CHAIN_TAG > - > ##******************************************************** > ************** > -gcc_version=3D$(gcc -v 2>&1 | tail -1 | awk '{print $3}') > -case $gcc_version in > - [1-3].*|4.[0-7].*) > - echo MNW2 requires GCC4.8 or later > - exit 1 > - ;; > - 4.8.*) > - export TOOL_CHAIN_TAG=3DGCC48 > - ;; > - 4.9.*|6.[0-2].*) > - export TOOL_CHAIN_TAG=3DGCC49 > - ;; > - *) > - export TOOL_CHAIN_TAG=3DGCC5 > - ;; > -esac > - > - > ##******************************************************** > ************** > -## Generate $BUILD_PATH and make sure the directory exists > - > ##******************************************************** > ************** > -if [ ! -d ${WORKSPACE}/Build ]; then > - mkdir ${WORKSPACE}/Build > -fi > - > -if [ ! -d ${WORKSPACE}/Build/${PLATFORM_NAME}${Arch} ]; then > - mkdir ${WORKSPACE}/Build/${PLATFORM_NAME}${Arch} > -fi > - > BUILD_PATH=3D${WORKSPACE}/Build/${PLATFORM_NAME}${Arch}/${TARGET > }_${TOOL_CHAIN_TAG} > - > -if [ ! -d $BUILD_PATH ]; then > - mkdir $BUILD_PATH > -fi > - > - > ##******************************************************** > ************** > -## Check for clean operation > - > ##******************************************************** > ************** > -if [ $Clean =3D=3D "TRUE" ]; then > - echo Removing previous build files ... > - if [ -d ${BUILD_PATH} ]; then > - rm -r ${BUILD_PATH} > - fi > - if [ -d ${WORKSPACE}/Conf/.cache ]; then > - rm -r ${WORKSPACE}/Conf/.cache > - fi > - exit 0 > -fi > - > - > ##******************************************************** > ************** > -## Generate Build_Flags > - > ##******************************************************** > ************** > - > -Build_Flags=3D"$Build_Flags -b $TARGET" > -if [ $Arch =3D=3D "IA32" ]; then > - Build_Flags=3D"$Build_Flags -a IA32" > -else > - Build_Flags=3D"$Build_Flags -a IA32 -a X64" > -fi > -Build_Flags=3D"$Build_Flags -t $TOOL_CHAIN_TAG" > -Build_Flags=3D"$Build_Flags -n $build_threads" > -Capsule_Build_Flags=3D"$Build_Flags" > -Build_Flags=3D"$Build_Flags -p > ${PLATFORM_PKG_PATH}/PlatformPkg${Arch}.dsc" > -if [ $GenLog =3D=3D "TRUE" ]; then > - Build_Flags=3D"$Build_Flags -j ${BUILD_PATH}/${PLATFORM_NAME}.log" > -fi > -if [ $GenReport =3D=3D "TRUE" ]; then > - Build_Flags=3D"$Build_Flags -y ${BUILD_PATH}/${PLATFORM_NAME}.report" > -fi > - > - > ##******************************************************** > ************** > -## Generate BIOS ID > - > ##******************************************************** > ************** > - > -echo BOARD_ID =3D MNW2MAX > $BUILD_PATH/BiosId.env > -echo BOARD_REV =3D L >> $BUILD_PATH/BiosId.env > -if [ $Arch =3D=3D "IA32" ]; then > - echo BOARD_EXT =3D I32 >> $BUILD_PATH/BiosId.env > -fi > -if [ $Arch =3D=3D "X64" ]; then > - echo BOARD_EXT =3D X64 >> $BUILD_PATH/BiosId.env > -fi > -echo VERSION_MAJOR =3D 0090 >> $BUILD_PATH/BiosId.env > -if [ $TARGET =3D=3D "DEBUG" ]; then > - echo BUILD_TYPE =3D D >> $BUILD_PATH/BiosId.env > -fi > -if [ $TARGET =3D=3D "RELEASE" ]; then > - echo BUILD_TYPE =3D R >> $BUILD_PATH/BiosId.env > -fi > -echo VERSION_MINOR =3D 01 >> $BUILD_PATH/BiosId.env > - > -python $WORKSPACE/edk2- > platforms/Platform/Intel/Tools/GenBiosId/GenBiosId.py -i > $BUILD_PATH/BiosId.env -o $BUILD_PATH/BiosId.bin -ot > $BUILD_PATH/BiosId.txt > - > - > ##******************************************************** > ************** > -## Build BIOS > - > ##******************************************************** > ************** > -echo "Invoking EDK2 build..." > -echo build $Build_Flags > -build $Build_Flags > - > -cp -f $BUILD_PATH/FV/VLV.fd $BUILD_PATH/FV/Vlv.ROM > - > - > ##******************************************************** > ************** > -## Build Capsules > - > ##******************************************************** > ************** > -echo "Invoking EDK2 build for capsules..." > -echo build $Capsule_Build_Flags -p > $PLATFORM_PKG_PATH/PlatformCapsule${Arch}.dsc > -build $Capsule_Build_Flags -p > $PLATFORM_PKG_PATH/PlatformCapsule${Arch}.dsc > - > -echo > -echo -------------------- The EDKII BIOS build has successfully complete= d. ------ > -------------- > -echo > -- > 2.21.0.windows.1