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.20, mailfrom: michael.d.kinney@intel.com) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by groups.io with SMTP; Mon, 22 Jul 2019 10:24:20 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Jul 2019 10:24:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,295,1559545200"; d="scan'208";a="169312926" Received: from orsmsx109.amr.corp.intel.com ([10.22.240.7]) by fmsmga008.fm.intel.com with ESMTP; 22 Jul 2019 10:24:19 -0700 Received: from orsmsx160.amr.corp.intel.com (10.22.226.43) by ORSMSX109.amr.corp.intel.com (10.22.240.7) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 22 Jul 2019 10:24:18 -0700 Received: from orsmsx113.amr.corp.intel.com ([169.254.9.177]) by ORSMSX160.amr.corp.intel.com ([169.254.13.251]) with mapi id 14.03.0439.000; Mon, 22 Jul 2019 10:24:18 -0700 From: "Michael D Kinney" To: Gary Lin , "devel@edk2.groups.io" , "Kinney, Michael D" CC: "Qian, Yi" , "Sun, Zailiang" Subject: Re: [edk2-devel] [edk2-platforms Patch V2 5/5] Vlv2Tbl2DevicePkg: Convert BAT/sh Build scripts to Python Thread-Topic: [edk2-devel] [edk2-platforms Patch V2 5/5] Vlv2Tbl2DevicePkg: Convert BAT/sh Build scripts to Python Thread-Index: AQHVPfenvvIO7ptCL0uf+zIU5c4f6abWf7kAgABoAgA= Date: Mon, 22 Jul 2019 17:24:17 +0000 Message-ID: References: <20190719060247.10132-1-michael.d.kinney@intel.com> <20190719060247.10132-6-michael.d.kinney@intel.com> <20190722040836.GA14350@GaryWorkstation> In-Reply-To: <20190722040836.GA14350@GaryWorkstation> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.600.7 dlp-reaction: no-action x-originating-ip: [10.22.254.139] MIME-Version: 1.0 Return-Path: michael.d.kinney@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Gary, Thanks for the feedback. I will send out a V3. I have fixed the source files with non-ASCII characters that are preventing the reports from being generated on Linux=20 systems. I will enter a BZ to update the build tools to=20 be more resilient for this case. Non-ASCII characters should not be present in source files, but presence of non-ASCII characters should not break the build with a python stack trace. The report should still be generated correctly. Thanks, Mike > -----Original Message----- > From: Gary Lin [mailto:GLin@suse.com] > Sent: Sunday, July 21, 2019 9:09 PM > To: devel@edk2.groups.io; Kinney, Michael D > > Cc: Qian, Yi ; Sun, Zailiang > > Subject: Re: [edk2-devel] [edk2-platforms Patch V2 5/5] > Vlv2Tbl2DevicePkg: Convert BAT/sh Build scripts to Python >=20 > On Thu, Jul 18, 2019 at 11:02:47PM -0700, Michael D > Kinney wrote: > > 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. > > > > * Sample VS2015x86 commands for IA32/X64 and > DEBUG/RELEASE > > build -a IA32 -a X64 -t VS2015x86 -p > Vlv2TbltDevicePkg\PlatformPkgX64.dsc > > build -a IA32 -a X64 -t VS2015x86 -p > Vlv2TbltDevicePkg\PlatformPkgX64.dsc > > build -a IA32 -t VS2015x86 -p > Vlv2TbltDevicePkg\PlatformPkgIA32.dsc > > build -a IA32 -t VS2015x86 -p > Vlv2TbltDevicePkg\PlatformPkgIA32.dsc > > > > * Sample GCC5 commands for IA32/X64 and DEBUG/RELEASE > > build -a IA32 -a X64 -n 5 -t GCC5 -p > Vlv2TbltDevicePkg/PlatformPkgX64.dsc > > build -a IA32 -a X64 -n 5 -t GCC5 -p > Vlv2TbltDevicePkg/PlatformPkgX64.dsc > > build -a IA32 -n 5 -t GCC5 -p > Vlv2TbltDevicePkg/PlatformPkgIA32.dsc > > build -a IA32 -n 5 -t GCC5 -p > Vlv2TbltDevicePkg/PlatformPkgIA32.dsc > > > Hi Mike, >=20 > I found some errors in Readme.md >=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 | 62 > ++-- > > Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.bat | 303 -- > ------------- > > Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh | 222 -- > --------- > > 12 files changed, 432 insertions(+), 903 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 > > > > 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.
> > -@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_Flags% %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 MinnowMax > > -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_T > AG)/FV/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_T > AG)/FV/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.ds > c > b/Platform/Intel/Vlv2TbltDevicePkg/PlatformCapsuleIA32.ds > c > > deleted file mode 100644 > > index 246347b8fa..0000000000 > > --- > a/Platform/Intel/Vlv2TbltDevicePkg/PlatformCapsuleIA32.ds > c > > +++ /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-23771BEE26E7 > > - PLATFORM_VERSION =3D 0.1 > > - FLASH_DEFINITION =3D > Vlv2TbltDevicePkg/PlatformCapsule.fdf > > - 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/GenCaps > uleAll.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 modules 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 required 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 firmware 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-23771BEE26E7 > > - PLATFORM_VERSION =3D 0.1 > > - FLASH_DEFINITION =3D > Vlv2TbltDevicePkg/PlatformCapsule.fdf > > - 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/GenCaps > uleAll.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 modules 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 required 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 firmware 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 > > } > > > > -[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 > > > > +FILE RAW =3D AF9C9EB2-12AD-4D3E-A4D4-96F6C9966215 { # > PcdEdkiiSystemFirmwareFileGuid > > + FD =3D Vlv > > +# > $(WORKSPACE)/$(OUTPUT_DIRECTORY)/$(TARGET)_$(TOOL_CHAIN_T > AG)/FV/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_T > AG)/FV/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 > > + > > > ######################################################### > ####################### > > # > > # 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-24F7A8D38E08 > > + PREBUILD =3D python > Vlv2TbltDevicePkg/PreBuild.py > > + POSTBUILD =3D python > Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCaps > uleAll.py > > > > DEFINE RC_BINARY_RELEASE =3D TRUE > > # > > @@ -213,7 +215,7 @@ [LibraryClasses.common] > > > TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibN > ull/TpmMeasurementLibNull.inf > > !endif > > > > - > BiosIdLib|BoardModulePkg/Library/BiosIdLib/DxeBiosIdLib.i > nf > > + > BiosIdLib|BoardModulePkg/Library/BiosIdLib/DxeBiosIdLib.i > nf > > > > > StallSmmLib|Vlv2TbltDevicePkg/Library/StallSmmLib/StallSm > mLib.inf > > > > @@ -242,6 +244,10 @@ [LibraryClasses.common] > > > > > BootLogoLib|MdeModulePkg/Library/BootLogoLib/BootLogoLib. > inf > > > > +!if $(RECOVERY_ENABLE) > > + > EdkiiSystemCapsuleLib|SignedCapsulePkg/Library/EdkiiSyste > mCapsuleLib/EdkiiSystemCapsuleLib.inf > > +!endif > > + > > [LibraryClasses.IA32.SEC] > > !if $(PERFORMANCE_ENABLE) =3D=3D TRUE > > > PerformanceLib|MdePkg/Library/BasePerformanceLibNull/Base > PerformanceLibNull.inf > > @@ -718,11 +724,10 @@ > [PcdsDynamicExDefault.common.DEFAULT] > > gEfiVLVTokenSpaceGuid.PcdCpuSmramCpuDataAddress|0 > > gEfiVLVTokenSpaceGuid.PcdCpuLockBoxSize|0 > > > gEfiSecurityPkgTokenSpaceGuid.PcdUserPhysicalPresence|TRU > E > > - > > -[PcdsDynamicExDefault.X64.DEFAULT] > > + > gEfiMdeModulePkgTokenSpaceGuid.PcdSystemFmpCapsuleImageTy > peIdGuid|{GUID("$(FMP_MINNOW_MAX_SYSTEM)")}|VOID*|0x10 > > !if $(RECOVERY_ENABLE) > > + > gEfiSignedCapsulePkgTokenSpaceGuid.PcdEdkiiSystemFirmware > ImageDescriptor|{0x0}|VOID*|0x100 > > > gEfiSignedCapsulePkgTokenSpaceGuid.PcdEdkiiSystemFirmware > FileGuid|{GUID("AF9C9EB2-12AD-4D3E-A4D4- > 96F6C9966215")}|VOID*|0x10 > > - > gEfiMdeModulePkgTokenSpaceGuid.PcdSystemFmpCapsuleImageTy > peIdGuid|{GUID("4096267b-da0a-42eb-b5eb- > fef31d207cb4")}|VOID*|0x10 > > !endif > > > > [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-24F7A8D38E08 > > + PREBUILD =3D python > Vlv2TbltDevicePkg/PreBuild.py > > + POSTBUILD =3D python > Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCaps > uleAll.py > > > > DEFINE RC_BINARY_RELEASE =3D TRUE > > # > > @@ -215,7 +217,7 @@ [LibraryClasses.common] > > > TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibN > ull/TpmMeasurementLibNull.inf > > !endif > > > > - > BiosIdLib|BoardModulePkg/Library/BiosIdLib/DxeBiosIdLib.i > nf > > + > BiosIdLib|BoardModulePkg/Library/BiosIdLib/DxeBiosIdLib.i > nf > > > > > StallSmmLib|Vlv2TbltDevicePkg/Library/StallSmmLib/StallSm > mLib.inf > > > > @@ -244,6 +246,10 @@ [LibraryClasses.common] > > > > > BootLogoLib|MdeModulePkg/Library/BootLogoLib/BootLogoLib. > inf > > > > +!if $(RECOVERY_ENABLE) > > + > EdkiiSystemCapsuleLib|SignedCapsulePkg/Library/EdkiiSyste > mCapsuleLib/EdkiiSystemCapsuleLib.inf > > +!endif > > + > > [LibraryClasses.IA32.SEC] > > !if $(PERFORMANCE_ENABLE) =3D=3D TRUE > > > PerformanceLib|MdePkg/Library/BasePerformanceLibNull/Base > PerformanceLibNull.inf > > @@ -720,11 +726,10 @@ > [PcdsDynamicExDefault.common.DEFAULT] > > gEfiVLVTokenSpaceGuid.PcdCpuSmramCpuDataAddress|0 > > gEfiVLVTokenSpaceGuid.PcdCpuLockBoxSize|0 > > > gEfiSecurityPkgTokenSpaceGuid.PcdUserPhysicalPresence|TRU > E > > - > > -[PcdsDynamicExDefault.X64.DEFAULT] > > + > gEfiMdeModulePkgTokenSpaceGuid.PcdSystemFmpCapsuleImageTy > peIdGuid|{GUID("$(FMP_MINNOW_MAX_SYSTEM)")}|VOID*|0x10 > > !if $(RECOVERY_ENABLE) > > + > gEfiSignedCapsulePkgTokenSpaceGuid.PcdEdkiiSystemFirmware > ImageDescriptor|{0x0}|VOID*|0x100 > > > gEfiSignedCapsulePkgTokenSpaceGuid.PcdEdkiiSystemFirmware > FileGuid|{GUID("AF9C9EB2-12AD-4D3E-A4D4- > 96F6C9966215")}|VOID*|0x10 > > - > gEfiMdeModulePkgTokenSpaceGuid.PcdSystemFmpCapsuleImageTy > peIdGuid|{GUID("4096267b-da0a-42eb-b5eb- > fef31d207cb4")}|VOID*|0x10 > > !endif > > > > [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 reserved.' > > +__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.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') > > + > > + 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, AARCH64 or EBC, > > + which overrides target.txt's > TARGET_ARCH definition. 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 platform, > > + overriding target.txt's > TOOL_CHAIN_TAG definition.''' > > + ) > > + parser.add_argument ( > > + '-p', '--platform', dest =3D > 'PlatformFile', required =3D True, > > + help =3D '''Build the platform specified by > the DSC file name argument, > > + overriding target.txt's > ACTIVE_PLATFORM definition.''' > > + ) > > + parser.add_argument ( > > + '-b', '--buildtarget', dest =3D > 'BuildTarget', required =3D True, > > + help =3D '''Using the TARGET to build the > platform, overriding > > + 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_true', > > + help =3D '''Turn on verbose output with > informational messages printed''' > > + ) > > + parser.add_argument ( > > + '--package', dest =3D 'Package', nargs =3D > '*', action =3D 'append', > > + help =3D '''The directory name of a package > of tests to copy''' > > + ) > > + > > + # > > + # Parse command line arguments > > + # > > + gArgs, remaining =3D parser.parse_known_args() > > + gArgs.BuildType =3D 'all' > > + for BuildType in ['all', 'fds', 'genc', 'genmake', > 'clean', 'cleanall', '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, 'Vlv2TbltDevicePkg') > > + 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 output > > + # 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..b52c23fdec 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 . > > > > 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 edk2-platforms\Platform\Intel\Vlv2TbltDevicePkg > > +cd %WORKSPACE%\edk2 > > > > -Build_IFWI.bat /m MNW2 Debug > > +edksetup.bat Rebuild > > + > > +build -a IA32 -a X64 -n 5 -t VS2015x86 -b DEBUG -p > Vlv2TbltDevicePkg\PlatformPkgX64.dsc > > ``` > > > > Once all the code and tools are downloaded and > installed, only the following > > @@ -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 > > + > > ``` > > > > 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 > > > > ``` > > -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 > > ``` > > > > * Build X64 Release Image with build log > > > > ``` > > -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 > > ``` > > > > * Build IA32 Debug Image > > > > ``` > > -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 > > ``` > > > > The generated firmware image is the build output > directory below WORKSPACE. For > > exampple, the X64 Debug Image is at: > > > > -`Build\Vlv2TbltDevicePkg\DEBUG_VS2015x86\FV\Vlv.ROM` > > +`Build\Vlv2TbltDevicePkgX64\DEBUG_VS2015x86\FV\Vlv.fd` > > > > And the IA32 Release image is at: > > > > - > `Build\Vlv2TbltDevicePkgIA32\RELEASE_VS2015x86\FV\Vlv.ROM > ` > > > +`Build\Vlv2TbltDevicePkgIA32\RELEASE_VS2015x86\FV\Vlv.fd > ` > > > > The X64 CapsuleApp and generated UEFI Capsules are in > the directory > > > > -`Build\Vlv2TbltDevicePkg\Capsules` > > +`Build\Vlv2TbltDevicePkgX64\Capsules` > > > > # Linux Pre-requisites > > > > +* git > > +* python > > +* iasl > > +* nasm > > +* openssl > > +* gcab > > + > > # Download and Build MinnowMax using Linux/GCC > > > > 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 > > > > 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 > To set the paths, it should be colons, not semicolons. > export PACKAGES_PATH=3D$WORKSPACE/edk2:$WORKSPACE/edk2- > platforms/Silicon/Intel:$WORKSPACE/edk2- > platforms/Platform/Intel:$WORKSPACE/edk2-non- > osi/Silicon/Intel >=20 > > +cd $WORKSPACE/edk2 > > > > -cd edk2-platforms/Platform/Intel/Vlv2TbltDevicePkg > > +. edksetup.sh BaseTools Rebuild > > > "Rebuild" is not defined in edksetup.sh. >=20 > > -./Build_IFWI.sh /m MNW2 Debug > > +build -a IA32 -a X64 -n 5 -t GCC5 -b DEBUG -p > Vlv2TbltDevicePkg/PlatformPkgX64.dsc > > ``` > > > > Once all the code is downloaded and installed, only > the following commands are > > @@ -144,6 +159,10 @@ install the source and binaries. > > > > ``` > > export WORKSPACE=3D$PWD/edk2 > The WORKSPACE is not in edk2. >=20 > > +export PACKAGES_PATH=3D$WORKSPACE/edk2;$WORKSPACE/edk2- > platforms/Silicon/Intel;$WORKSPACE/edk2- > platforms/Platform/Intel;$WORKSPACE/edk2-non- > osi/Silicon/Intel > Same as the previous one. >=20 > > +cd $WORKSPACE/edk2 > > + > > +. edksetup.sh BaseTools Rebuild > Same as the previous one. >=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 > > > > ``` > > -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 > > ``` > > > I'm not sure how to use this "report" file. It failed > with the following error: >=20 > build.py... > : error C0DE: Unknown fatal error when generating build > report > Vlv.report > (Python 3.7.3 on linux > Traceback (most recent call last): > File "/home/gary/git/edk2- > workspace/edk2/BaseTools/Source/Python/build/BuildReport. > py", line 2271, in GenerateReport > PlatformReport(Wa, MaList, > self.ReportType).GenerateReport(File, BuildDuration, > AutoGenTime, MakeTime, GenFdsTime, self.ReportType) > File "/home/gary/git/edk2- > workspace/edk2/BaseTools/Source/Python/build/BuildReport. > py", line 2121, in __init__ > self.PredictionReport =3D PredictionReport(Wa) > File "/home/gary/git/edk2- > workspace/edk2/BaseTools/Source/Python/build/BuildReport. > py", line 1546, in __init__ > FindIncludeFiles(Source.Path, Module.IncludePathList, > IncludeList) > File "/home/gary/git/edk2- > workspace/edk2/BaseTools/Source/Python/build/BuildReport. > py", line 185, in FindIncludeFiles > FileContents =3D open(Source).read() > File "/usr/lib64/python3.7/codecs.py", line 322, in > decode > (result, consumed) =3D self._buffer_decode(data, > self.errors, final) > UnicodeDecodeError: 'utf-8' codec can't decode byte 0x92 > in position 5875: invalid start byte > ) >=20 > Anyway, the firmware and capsule files were built. Will > test them later. >=20 > Gary Lin >=20 > > * Build X64 Release Image with build log > > > > ``` > > -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 > > ``` > > > > * Build IA32 Debug Image > > > > ``` > > -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 > > ``` > > > > The generated firmware image is the build output > directory below WORKSPACE. For > > exampple, the X64 Debug Image is at: > > > > -`Build/Vlv2TbltDevicePkg/DEBUG_GCC5/FV/Vlv.ROM` > > +`Build/Vlv2TbltDevicePkgX64/DEBUG_GCC5/FV/Vlv.fd` > > > > And the IA32 Release image is at: > > > > -`Build/Vlv2TbltDevicePkgIA32/RELEASE_GCC5/FV/Vlv.ROM` > > +`Build/Vlv2TbltDevicePkgIA32/RELEASE_GCC5/FV/Vlv.fd` > > > > The X64 CapsuleApp and generated UEFI Capsules are in > the directory > > > > -`Build/Vlv2TbltDevicePkg/Capsules` > > +`Build/Vlv2TbltDevicePkgX64/Capsules` > > > > # Use DediProg to update FLASH image on a MinnowBoard > MAX Target > > > > @@ -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 > > > > ``` > > 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.
> > -@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 Studio 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 Studio 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 Studio 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 Studio 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 Studio 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/VS100COMNTOO > LS/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%\%TARGE > T%_%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 MinnowMax" > > - 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:$ > CORE_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}/${T > ARGET}_${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 completed. -------------------- > > -echo > > -- > > 2.21.0.windows.1 > > > > > >=20 > > > >