From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: suse.com, ip: 15.124.2.86, mailfrom: glin@suse.com) Received: from m4a0040g.houston.softwaregrp.com (m4a0040g.houston.softwaregrp.com [15.124.2.86]) by groups.io with SMTP; Tue, 23 Jul 2019 01:32:49 -0700 Received: FROM m4a0040g.houston.softwaregrp.com (15.120.17.147) BY m4a0040g.houston.softwaregrp.com WITH ESMTP; Tue, 23 Jul 2019 08:28:51 +0000 Received: from M4W0335.microfocus.com (2002:f78:1193::f78:1193) by M4W0335.microfocus.com (2002:f78:1193::f78:1193) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1591.10; Tue, 23 Jul 2019 08:27:14 +0000 Received: from NAM04-CO1-obe.outbound.protection.outlook.com (15.124.8.10) by M4W0335.microfocus.com (15.120.17.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1591.10 via Frontend Transport; Tue, 23 Jul 2019 08:27:13 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FunmEHjDhDa1TMZGxyDDUIGmBg6nSRA8Ht3b45+MuyAxNOsByRYs7qMCTVY7R3ShbUYS9Z1lQumgZ7CiwVDoZShOSka3NIeBSFcZpV+Zc2H0se1As9JO5BsfaS9YEJzSFWlmbLeDSKl2uzGVKwCNqxDEsF7mX8KGQsVpmnBkN7pHMn1OMBNgoCscKtKa3lXJS3we9Z3FNuBu+HBHkJziJPC2UPutoOeOPyFdsUNi5bd101lnOgHNH55jtFoUOXI8CpBKhU/vDk0gkItYpHBOK0Mowx+Xml8xiftKLBeeYO1uDgCmlEp2p8saOnNPhG2X20iMcmYAtBgngSZdKqH/gw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NaC+N0vhISJOnnUFy8uKSdmxCBfgrUtsZxrRUMAwb7U=; b=CJCSt9/yvjilCYBu14PPV7GGUDI71V6YdMsT8YXxFf/rVADq9qVglVmOeFk3Z0Tyyi/qzTJSaE9pFip4FzUGaszE8rfBDVD7imzjQ0vRugnRZq8ROS4jBSwqd2dTrMC9rAEL5jynR9aeXWNJ+PXRdE6SxRF41u1rbW9OuGNyhERcgadXa4dPvcGpeGVJmHwnH2o4S1tjl9LS5a6mhGZ6KxvnB7I5yqcE7GsyLXmBdlaEdJeBuisIS98b3/ot9EYwFnJPiyoy9K9WjhQL5W2ICNsN2HSCBVnv0v8T5JeJnlg35F2PgRGXW9nriBvN8I9dp9DYbNtsoX3zSQprctnlkQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1;spf=pass smtp.mailfrom=suse.com;dmarc=pass action=none header.from=suse.com;dkim=pass header.d=suse.com;arc=none Received: from DM6PR18MB2489.namprd18.prod.outlook.com (20.179.105.16) by DM6PR18MB2409.namprd18.prod.outlook.com (20.179.71.215) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2094.16; Tue, 23 Jul 2019 08:27:11 +0000 Received: from DM6PR18MB2489.namprd18.prod.outlook.com ([fe80::ac83:47c9:cebd:9f0]) by DM6PR18MB2489.namprd18.prod.outlook.com ([fe80::ac83:47c9:cebd:9f0%7]) with mapi id 15.20.2094.013; Tue, 23 Jul 2019 08:27:10 +0000 From: "Gary Lin" To: Michael D Kinney CC: "devel@edk2.groups.io" , Yi Qian , Zailiang Sun 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: AQHVQOEejEhiE0Pv50m2tSXotPdXYqbX3wcA Date: Tue, 23 Jul 2019 08:27:10 +0000 Message-ID: <20190723082658.GC4466@GaryWorkstation> 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: zh-TW, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: LO2P265CA0373.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:a3::25) To DM6PR18MB2489.namprd18.prod.outlook.com (2603:10b6:5:184::16) authentication-results: spf=none (sender IP is ) smtp.mailfrom=GLin@suse.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [202.47.205.198] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 5cd64932-f938-4d1f-e7ee-08d70f478e46 x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(2017052603328)(7193020);SRVR:DM6PR18MB2409; x-ms-traffictypediagnostic: DM6PR18MB2409: x-ms-exchange-purlcount: 2 x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:235; x-forefront-prvs: 0107098B6C x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(4636009)(7916004)(39860400002)(376002)(366004)(346002)(396003)(136003)(174874002)(189003)(199004)(305945005)(486006)(76176011)(2906002)(102836004)(8936002)(14454004)(81156014)(8676002)(966005)(6506007)(19627235002)(7736002)(52116002)(3846002)(386003)(6916009)(45080400002)(6116002)(14444005)(26005)(476003)(256004)(446003)(186003)(68736007)(33656002)(80792005)(4326008)(54906003)(11346002)(478600001)(5660300002)(6512007)(229853002)(53936002)(66066001)(71200400001)(66476007)(71190400001)(66556008)(64756008)(66446008)(66946007)(1076003)(6246003)(30864003)(99286004)(86362001)(316002)(6436002)(81166006)(33716001)(6306002)(53946003)(25786009)(6486002)(9686003)(579004)(569006);DIR:OUT;SFP:1102;SCL:1;SRVR:DM6PR18MB2409;H:DM6PR18MB2489.namprd18.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: suse.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: YTxVFLOym0MKIF4AUCDJXg11xNkQWafNogwuTZQhHSELW9Lh/iB989p7gBh8fQfoqeHiK8HUUiVfhlkxlVyMm2le195duc8zUFoduVBFvknLiGf3fawSphk0QgxswpHDKF8P3iM7TUCTgOXkRcBiUlXLIQX8q+XoQ3wcEqWK/BOsf2SjlbOTdpQPzXxRsbihb7cGXGOIfUSUQxyuci8+jzkjGSf+WPwCUcdRJCbDJcdRjQ2LHV7yyKhtndnZDqF66PxImBiartIfI8iSiRBxMl0CZAXK8cZ2AU5wqrMoxKTLM78BHPHcKureTRqSvSJE+mXfrY5wd+ylyaeya9zMAL0TVUqlwlxdxT6cKIeY0q0fL9XF6ma89piiYnNDhrAlrFgAZrzk6/BAgbA45aGoxKQYh1XcQhRYn7CqEfxzrA4= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 5cd64932-f938-4d1f-e7ee-08d70f478e46 X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Jul 2019 08:27:10.7786 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 856b813c-16e5-49a5-85ec-6f081e13b527 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: GLin@suse.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR18MB2409 Return-Path: GLin@suse.com X-OriginatorOrg: suse.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-ID: <3B35F4058A0F5F459A3EF504A6A16B45@namprd18.prod.outlook.com> Content-Transfer-Encoding: quoted-printable On Mon, Jul 22, 2019 at 03:58:52PM -0700, Michael D Kinney wrote: > Convert Build_IFWI and bld_vlv BAT/sh scripts to OS > independent python script PeBuild.py. This script ^^^^^^^^^^ Nitpicking: PreBuild.py Otherwise, the change looks good to me. Reviewed-by: Gary Lin Gary Lin > 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.d= sc > 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/I= ntel/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_Flags% %Platf= orm_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 Min= nowMax > -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/In= tel/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 Minn= owMax" > - echo " Build_IFWI.sh /IA32 MNW2 release : IA32 Release build for M= innowMax" > - 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/Platf= orm/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 { # PcdEdkiiSystemFirm= wareFileGuid > - $(WORKSPACE)/$(OUTPUT_DIRECTORY)/$(TARGET)_$(TOOL_CHAIN_TAG)/FV/Vlv.= ROM > - } > - > -[FmpPayload.FmpPayloadSystemFirmwareRsa2048] > -IMAGE_HEADER_INIT_VERSION =3D 0x02 > -IMAGE_TYPE_ID =3D 4096267b-da0a-42eb-b5eb-fef31d207cb4 # Pcd= SystemFmpCapsuleImageTypeIdGuid > -IMAGE_INDEX =3D 0x1 > -HARDWARE_INSTANCE =3D 0x0 > -MONOTONIC_COUNT =3D 0x2 > -CERTIFICATE_GUID =3D A7717414-C616-4977-9420-844712A735BF # RSA= 2048SHA256 > - > -FILE DATA =3D $(WORKSPACE)/$(OUTPUT_DIRECTORY)/$(TARGET)_$(TOOL_CHAIN_TA= G)/FV/SYSTEMFIRMWAREUPDATECARGO.Fv > - > -[Capsule.Vlv2Rec] > -CAPSULE_GUID =3D 6dcbd5ed-e82d-4c44-bda1-7194199ad92a # g= EfiFmpCapsuleGuid > -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/P= latform/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/Ca= psule/GenerateCapsule/GenCapsuleAll.py > - > -########################################################################= ########################### > -# > -# Components Section - list of the modules and components that will be p= rocessed 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 i= mages 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-c= ompliant 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/Pl= atform/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/Ca= psule/GenerateCapsule/GenCapsuleAll.py > - > -########################################################################= ########################### > -# > -# Components Section - list of the modules and components that will be p= rocessed 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 i= mages 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-c= ompliant 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 { # PcdEdkiiSystemFirm= wareFileGuid > + FD =3D Vlv > +# $(WORKSPACE)/$(OUTPUT_DIRECTORY)/$(TARGET)_$(TOOL_CHAIN_TAG)/FV/Vlv= .fd > + } > + > +[FmpPayload.FmpPayloadSystemFirmwareRsa2048] > +IMAGE_HEADER_INIT_VERSION =3D 0x02 > +IMAGE_TYPE_ID =3D 4096267b-da0a-42eb-b5eb-fef31d207cb4 # Pcd= SystemFmpCapsuleImageTypeIdGuid > +IMAGE_INDEX =3D 0x1 > +HARDWARE_INSTANCE =3D 0x0 > +MONOTONIC_COUNT =3D 0x2 > +CERTIFICATE_GUID =3D A7717414-C616-4977-9420-844712A735BF # RSA= 2048SHA256 > + > +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 # g= EfiFmpCapsuleGuid > +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/Platf= orm/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/Featu= re/Capsule/GenerateCapsule/GenCapsuleAll.py > =20 > DEFINE RC_BINARY_RELEASE =3D TRUE > # > @@ -213,7 +215,7 @@ [LibraryClasses.common] > TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasur= ementLibNull.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/E= dkiiSystemCapsuleLib.inf > +!endif > + > [LibraryClasses.IA32.SEC] > !if $(PERFORMANCE_ENABLE) =3D=3D TRUE > PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanceLi= bNull.inf > @@ -718,11 +724,10 @@ [PcdsDynamicExDefault.common.DEFAULT] > gEfiVLVTokenSpaceGuid.PcdCpuSmramCpuDataAddress|0 > gEfiVLVTokenSpaceGuid.PcdCpuLockBoxSize|0 > gEfiSecurityPkgTokenSpaceGuid.PcdUserPhysicalPresence|TRUE > - > -[PcdsDynamicExDefault.X64.DEFAULT] > + gEfiMdeModulePkgTokenSpaceGuid.PcdSystemFmpCapsuleImageTypeIdGuid|{GUI= D("$(FMP_MINNOW_MAX_SYSTEM)")}|VOID*|0x10 > !if $(RECOVERY_ENABLE) > + gEfiSignedCapsulePkgTokenSpaceGuid.PcdEdkiiSystemFirmwareImageDescript= or|{0x0}|VOID*|0x100 > gEfiSignedCapsulePkgTokenSpaceGuid.PcdEdkiiSystemFirmwareFileGuid|{GUI= D("AF9C9EB2-12AD-4D3E-A4D4-96F6C9966215")}|VOID*|0x10 > - gEfiMdeModulePkgTokenSpaceGuid.PcdSystemFmpCapsuleImageTypeIdGuid|{GUI= D("4096267b-da0a-42eb-b5eb-fef31d207cb4")}|VOID*|0x10 > !endif > =20 > [PcdsDynamicExVpd.common.DEFAULT] > diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc b/Platfo= rm/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/Featu= re/Capsule/GenerateCapsule/GenCapsuleAll.py > =20 > DEFINE RC_BINARY_RELEASE =3D TRUE > # > @@ -215,7 +217,7 @@ [LibraryClasses.common] > TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasur= ementLibNull.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/E= dkiiSystemCapsuleLib.inf > +!endif > + > [LibraryClasses.IA32.SEC] > !if $(PERFORMANCE_ENABLE) =3D=3D TRUE > PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanceLi= bNull.inf > @@ -720,11 +726,10 @@ [PcdsDynamicExDefault.common.DEFAULT] > gEfiVLVTokenSpaceGuid.PcdCpuSmramCpuDataAddress|0 > gEfiVLVTokenSpaceGuid.PcdCpuLockBoxSize|0 > gEfiSecurityPkgTokenSpaceGuid.PcdUserPhysicalPresence|TRUE > - > -[PcdsDynamicExDefault.X64.DEFAULT] > + gEfiMdeModulePkgTokenSpaceGuid.PcdSystemFmpCapsuleImageTypeIdGuid|{GUI= D("$(FMP_MINNOW_MAX_SYSTEM)")}|VOID*|0x10 > !if $(RECOVERY_ENABLE) > + gEfiSignedCapsulePkgTokenSpaceGuid.PcdEdkiiSystemFirmwareImageDescript= or|{0x0}|VOID*|0x100 > gEfiSignedCapsulePkgTokenSpaceGuid.PcdEdkiiSystemFirmwareFileGuid|{GUI= D("AF9C9EB2-12AD-4D3E-A4D4-96F6C9966215")}|VOID*|0x10 > - gEfiMdeModulePkgTokenSpaceGuid.PcdSystemFmpCapsuleImageTypeIdGuid|{GUI= D("4096267b-da0a-42eb-b5eb-fef31d207cb4")}|VOID*|0x10 > !endif > =20 > [PcdsDynamicExVpd.common.DEFAULT] > diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PreBuild.py b/Platform/Inte= l/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, Cap= sulesPath, 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', V= ersion).decode()]) > + > + FmpCapsuleFile =3D NormalizePath ((CapsulesPath, CapsulesSubDir, Bas= eName + '.' + 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, stdou= t=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', BaseNa= me) > + MetaInfoXml =3D MetaInfoXml.replace ('FMP_CAPSULE_VERSION_DECIMAL', = str(Version)) > + MetaInfoXml =3D MetaInfoXml.replace ('FMP_CAPSULE_STRING', VersionSt= ring) > + MetaInfoXml =3D MetaInfoXml.replace ('FMP_CAPSULE_DATE', str(datetim= e.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.me= tainfo.xml' > + Log (Command) > + > + Process =3D subprocess.Popen(Command, cwd=3DCapsulesPath, stdin=3Dsu= bprocess.PIPE, stdout=3Dsubprocess.PIPE, stderr=3Dsubprocess.PIPE, shell=3D= True) > + 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, Bas= eName + '.' + 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, '../T= ools/GenBiosId/GenBiosId.py')) > + Command =3D Command + ' -i ' + BiosIdFileName > + Command =3D Command + ' -o ' + NormalizePath ((EdkiiBuildOutput, 'B= iosId.bin')) > + Command =3D Command + ' -ot ' + NormalizePath ((EdkiiBuildOutput, 'B= iosId.txt')) > + > + LogAlways (Command) > + > + Process =3D subprocess.Popen(Command, stdin=3Dsubprocess.PIPE, stdou= t=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\Si= licon\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\Pla= tformPkgX64.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\Si= licon\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\Pla= tformPkgX64.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\Plat= formPkgX64.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\PlatformPk= gIA32.dsc > ``` > =20 > The generated firmware image is the build output directory below WORKSPA= CE. 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-platfor= ms.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/Sil= icon/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/Platform= PkgX64.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 t= he 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/Sil= icon/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/Platform= PkgX64.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/Platfo= rmPkgX64.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 WORKSPA= CE. 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/Inte= l/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/VS200= 8... > -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 > - )=20 > -) 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 correc= tly. VS140COMNTOOLS/VS120COMNTOOLS/VS110COMNTOOLS/VS100COMNTOOLS/VS90COMNTO= OLS 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%\B= uild\%PLATFORM_NAME%%Arch% > -set BUILD_PATH=3D%WORKSPACE%\Build\%PLATFORM_NAME%%Arch%\%TARGET%_%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%/BiosI= d.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%A= rch%.dsc > -call build %Capsule_Build_Flags% -p %PLATFORM_PACKAGE%\PlatformCapsule%A= rch%.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 Minnow= Max > -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 Minn= owMax" > - 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_P= ATH > - > -## 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 envir= onment 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}.d= sc" > -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/GenBiosI= d.py -i $BUILD_PATH/BiosId.env -o $BUILD_PATH/BiosId.bin -ot $BUILD_PATH/Bi= osId.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${A= rch}.dsc > -build $Capsule_Build_Flags -p $PLATFORM_PKG_PATH/PlatformCapsule${A= rch}.dsc > - > -echo > -echo -------------------- The EDKII BIOS build has successfully complete= d. -------------------- > -echo > --=20 > 2.21.0.windows.1 >=20 >=20