From nobody Mon Feb 9 00:19:47 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+44008+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+44008+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1563516174; cv=none; d=zoho.com; s=zohoarc; b=Xl1L7kdgDU2er1OSBgNE/qkhNXwsPey5b033u8+gDip3RVxZGtRLIWGhS5Koh1BsMrhO6LG5jEcmW8m3744jCAXatgaPP/R69eUUDHxLzxcE2uqYnbgphC9pVFp89bq0kBBH8DhxD6GEJ65Xw0gSC1GOPSY/qVG/50PbyGdeqHI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1563516174; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To:ARC-Authentication-Results; bh=hamaQzYqxvgGGtOJpYRdQD420b6jdj3HJqbnyFDNcuU=; b=YR9e+B69gTJVSkqnXVsvDEZ82Zyry9q6AHF/uH79FUeB71CPLtQhE6FVuJ7bOFE5t5RK40+8tODRMbGZ5r3uv2GDS8KijmInvsKPH5FW55hA8fjcSz4YU987HyjECJuy+JHDubyNJzGApFQYbjtczsc28z3u0Z8D67/mjq+dfzM= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+44008+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1563516174879635.3755579938872; Thu, 18 Jul 2019 23:02:54 -0700 (PDT) Return-Path: X-Received: from mga17.intel.com (mga17.intel.com []) by groups.io with SMTP; Thu, 18 Jul 2019 23:02:53 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Jul 2019 23:02:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,281,1559545200"; d="scan'208";a="343599882" X-Received: from mdkinney-mobl2.amr.corp.intel.com ([10.254.83.213]) by orsmga005.jf.intel.com with ESMTP; 18 Jul 2019 23:02:52 -0700 From: "Michael D Kinney" To: devel@edk2.groups.io Cc: Zailiang Sun , Yi Qian , Gary Lin Subject: [edk2-devel] [edk2-platforms Patch V2 4/5] Vlv2TbltDevicePkg: Convert BAT/sh Capsule scripts to Python Date: Thu, 18 Jul 2019 23:02:46 -0700 Message-Id: <20190719060247.10132-5-michael.d.kinney@intel.com> In-Reply-To: <20190719060247.10132-1-michael.d.kinney@intel.com> References: <20190719060247.10132-1-michael.d.kinney@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,michael.d.kinney@intel.com Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1563516174; bh=/C0P1znXNc7fsLXRQQCfEW6YHR4eKfmjooGJ2iqe2Sk=; h=Cc:Date:From:Reply-To:Subject:To; b=LdMKzTsHtcmawaWkOZRZPfwYmUNwanZmBOwO60hmQS/oPXFInkHq2VR+X7hmVVKTsCb 9CTIf6In+je4RtpcxiR9EmnyhnTB83ngBkBd0UgZrvBXlgBXueQEbmqsWU9036otxithj KikSPRY6/HWY/WALCckog0grQlrOewwR4hU= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" Convert all the BAT/sh files used to generate capsules to OS independent Python script. Cc: Zailiang Sun Cc: Yi Qian Cc: Gary Lin Signed-off-by: Michael D Kinney Reviewed-by: Zailiang Sun --- .../Capsule/GenerateCapsule/GenCapsuleAll.bat | 35 -- .../Capsule/GenerateCapsule/GenCapsuleAll.py | 397 ++++++++++++++++++ .../Capsule/GenerateCapsule/GenCapsuleAll.sh | 33 -- .../GenerateCapsule/GenCapsuleMinnowMax.bat | 131 ------ .../GenerateCapsule/GenCapsuleMinnowMax.sh | 59 --- .../GenCapsuleMinnowMaxRelease.bat | 131 ------ .../GenCapsuleMinnowMaxRelease.sh | 64 --- .../GenerateCapsule/GenCapsuleSampleColor.bat | 137 ------ .../GenerateCapsule/GenCapsuleSampleColor.sh | 70 --- .../Feature/Capsule/GenerateCapsule/Lvfs.ddf | 14 - .../LvfsGenCapsuleMinnowMax.bat | 139 ------ .../LvfsGenCapsuleMinnowMaxRelease.bat | 139 ------ .../LvfsGenCapsuleSampleColor.bat | 145 ------- .../GenerateCapsule/template.metainfo.xml | 27 -- .../Vlv2TbltDevicePkg/PlatformCapsuleIA32.dsc | 2 +- .../Vlv2TbltDevicePkg/PlatformCapsuleX64.dsc | 2 +- 16 files changed, 399 insertions(+), 1126 deletions(-) delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/Genera= teCapsule/GenCapsuleAll.bat create mode 100644 Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/Genera= teCapsule/GenCapsuleAll.py delete mode 100755 Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/Genera= teCapsule/GenCapsuleAll.sh delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/Genera= teCapsule/GenCapsuleMinnowMax.bat delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/Genera= teCapsule/GenCapsuleMinnowMax.sh delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/Genera= teCapsule/GenCapsuleMinnowMaxRelease.bat delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/Genera= teCapsule/GenCapsuleMinnowMaxRelease.sh delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/Genera= teCapsule/GenCapsuleSampleColor.bat delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/Genera= teCapsule/GenCapsuleSampleColor.sh delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/Genera= teCapsule/Lvfs.ddf delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/Genera= teCapsule/LvfsGenCapsuleMinnowMax.bat delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/Genera= teCapsule/LvfsGenCapsuleMinnowMaxRelease.bat delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/Genera= teCapsule/LvfsGenCapsuleSampleColor.bat delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/Genera= teCapsule/template.metainfo.xml diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsu= le/GenCapsuleAll.bat b/Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/Gen= erateCapsule/GenCapsuleAll.bat deleted file mode 100644 index 8f589565fa..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenC= apsuleAll.bat +++ /dev/null @@ -1,35 +0,0 @@ -@REM @file -@REM Windows batch file to generate UEFI capsules for system firmware and -@REM firmware for sample devices -@REM -@REM Copyright (c) 2018, Intel Corporation. All rights reserved.
-@REM SPDX-License-Identifier: BSD-2-Clause-Patent -@REM - -@echo off -setlocal -cd /d %~dp0 - -rmdir /s /q %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules -mkdir %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules -mkdir %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\SampleDevelopment -mkdir %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\NewCert -mkdir %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\TestCert -copy %WORKSPACE%\Build\Vlv2TbltDevicePkg\DEBUG_VS2015x86\X64\CapsuleApp.ef= i %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\SampleDevelopment\CapsuleApp= .efi -copy %WORKSPACE%\Build\Vlv2TbltDevicePkg\RELEASE_VS2015x86\X64\CapsuleApp.= efi %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\SampleDevelopment\CapsuleA= ppRelease.efi -copy %WORKSPACE%\Build\Vlv2TbltDevicePkg\DEBUG_VS2015x86\X64\CapsuleApp.ef= i %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\NewCert\CapsuleApp.efi -copy %WORKSPACE%\Build\Vlv2TbltDevicePkg\RELEASE_VS2015x86\X64\CapsuleApp.= efi %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\NewCert\CapsuleAppRelease.= efi -copy %WORKSPACE%\Build\Vlv2TbltDevicePkg\DEBUG_VS2015x86\X64\CapsuleApp.ef= i %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\TestCert\CapsuleApp.efi -copy %WORKSPACE%\Build\Vlv2TbltDevicePkg\RELEASE_VS2015x86\X64\CapsuleApp.= efi %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\TestCert\CapsuleAppRelease= .efi - -call GenCapsuleMinnowMax.bat -call GenCapsuleMinnowMaxRelease.bat -call GenCapsuleSampleColor.bat Blue 149da854-7d19-4faa-a91e-862ea1324be6 -call GenCapsuleSampleColor.bat Green 79179bfd-704d-4c90-9e02-0ab8d968c18a -call GenCapsuleSampleColor.bat Red 72e2945a-00da-448e-9aa7-075ad840f9d4 - -call LvfsGenCapsuleMinnowMax.bat -call LvfsGenCapsuleMinnowMaxRelease.bat -call LvfsGenCapsuleSampleColor.bat Blue 149da854-7d19-4faa-a91e-862ea1324= be6 -call LvfsGenCapsuleSampleColor.bat Green 79179bfd-704d-4c90-9e02-0ab8d968c= 18a -call LvfsGenCapsuleSampleColor.bat Red 72e2945a-00da-448e-9aa7-075ad840f= 9d4 diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsu= le/GenCapsuleAll.py b/Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/Gene= rateCapsule/GenCapsuleAll.py new file mode 100644 index 0000000000..b2fd65a6c6 --- /dev/null +++ b/Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenC= apsuleAll.py @@ -0,0 +1,397 @@ +## @file +# Generate capsules for Vlv2TbltDevicePkg +# openssl must be install and in path +# +# Copyright (c) 2019, Intel Corporation. All rights reserved.
+# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# + +''' +GenCapsuleAll +''' + +import os +import sys +import argparse +import subprocess +import glob +import shutil +import struct +import datetime + +# +# Globals for help information +# +__prog__ =3D 'GenCapsuleAll' +__copyright__ =3D 'Copyright (c) 2019, Intel Corporation. All rights res= erved.' +__description__ =3D 'Generate Vlv2Tbl2DevicePkg capsules.\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) + +GenerateCapsuleCommand =3D ''' +GenerateCapsule +--encode +--guid {FMP_CAPSULE_GUID} +--fw-version {FMP_CAPSULE_VERSION} +--lsv {FMP_CAPSULE_LSV} +--capflag PersistAcrossReset +--capflag InitiateReset +--signer-private-cert=3D{BASE_TOOLS_PATH}/Source/Python/Pkcs7Sign/TestCert= .pem +--other-public-cert=3D{BASE_TOOLS_PATH}/Source/Python/Pkcs7Sign/TestSub.pu= b.pem +--trusted-public-cert=3D{BASE_TOOLS_PATH}/Source/Python/Pkcs7Sign/TestRoot= .pub.pem +-o {FMP_CAPSULE_FILE} +{FMP_CAPSULE_PAYLOAD} +''' +MetaInfoXmlTemplate =3D ''' + + + com.intel.FMP_CAPSULE_BASE_NAME.firmware + FMP_CAPSULE_BASE_NAME + System firmware for the FMP_CAPSULE_BASE_NAME + + Description of System firmware for the FMP_CAPSULE_BASE_NAME + + + FMP_CAPSULE_GUID + + http://www.tianocore.org + CC0-1.0 + BSD + Tianocore + + + + Build FMP_CAPSULE_STRING + + + + + + + + +''' + +LvfsDdfTemplate =3D ''' +.OPTION EXPLICIT ; Generate errors on variable typos + +.Set CabinetNameTemplate=3Dfirmware.cab ; The name of the file +.set DiskDirectoryTemplate=3DCDROM ; All cabinets go in a single directory +.Set Cabinet=3Don ; +.Set Compress=3Don ; +.Set DiskDirectory1=3D. +.Set MaxDiskSize=3D99999744 ; multiple of 512 + +;*** Files to zip ; +; +firmware.bin +firmware.metainfo.xml +;*** +''' + +def GenCapsuleDevice (BaseName, PayloadFileName, Guid, Version, Lsv, Capsu= lesPath, CapsulesSubDir): + global gBaseToolsPath + LogAlways ('Generate Capsule: {0} {1:08x} {2:08x} {3}'.format (Guid, V= ersion, Lsv, PayloadFileName)) + + VersionString =3D '.'.join([str(ord(x)) for x in struct.pack('>I', Ver= sion).decode()]) + + FmpCapsuleFile =3D NormalizePath ((CapsulesPath, CapsulesSubDir, BaseN= ame + '.' + 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', st= r(Version)) + MetaInfoXml =3D MetaInfoXml.replace ('FMP_CAPSULE_STRING', VersionStri= ng) + 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.dd= f')) + else: + Command =3D 'gcab --create firmware.cab firmware.bin firmware.meta= info.xml' + Log (Command) + + Process =3D subprocess.Popen(Command, cwd=3DCapsulesPath, stdin=3Dsubp= rocess.PIPE, stdout=3Dsubprocess.PIPE, stderr=3Dsubprocess.PIPE, shell=3DTr= ue) + 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, BaseN= ame + '.' + 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')) + +def GenCapsuleSampleDevice (SampleDeviceName, Guid, Version, Lsv, Capsules= Path, CapsulesSubDir): + BinaryPayload =3D SampleDeviceName.encode() + bytearray(0x18 - len (Sa= mpleDeviceName.encode())) + BinaryPayload =3D BinaryPayload + struct.pack(' 1: + if ['X64'] in gArgs.Arch: + UefiArch =3D 'X64' + + CapsulesPath =3D NormalizePath((EdkiiBuildDir, 'Capsules')) + + CapsulesSubDir =3D 'TestCert' + '_' + UefiArch + '_' + gArgs.BuildTarg= et + '_' + gArgs.ToolChain + + # + # Create output directories + # + try: + CreateDirectory ((CapsulesPath)) + except: + pass + try: + CreateDirectory ((CapsulesPath, CapsulesSubDir)) + except: + pass + + # + # Copy CapsuleApp + # + Copy ((EdkiiBuildOutput, UefiArch, 'CapsuleApp.efi'), (CapsulesPath, C= apsulesSubDir)) + + # + # Generate capsules for the Red Sample Device + # + GenCapsuleSampleDevice('Red','72E2945A-00DA-448E-9AA7-075AD840F9D4',0x= 00000010,0x00000000, CapsulesPath, CapsulesSubDir) + GenCapsuleSampleDevice('Red','72E2945A-00DA-448E-9AA7-075AD840F9D4',0x= 00000011,0x00000000, CapsulesPath, CapsulesSubDir) + GenCapsuleSampleDevice('Red','72E2945A-00DA-448E-9AA7-075AD840F9D4',0x= 00000012,0x00000000, CapsulesPath, CapsulesSubDir) + + # + # Generate capsules for the Green Sample Device + # + GenCapsuleSampleDevice('Green','79179BFD-704D-4C90-9E02-0AB8D968C18A',= 0x00000020,0x00000020, CapsulesPath, CapsulesSubDir) + GenCapsuleSampleDevice('Green','79179BFD-704D-4C90-9E02-0AB8D968C18A',= 0x00000021,0x00000020, CapsulesPath, CapsulesSubDir) + GenCapsuleSampleDevice('Green','79179BFD-704D-4C90-9E02-0AB8D968C18A',= 0x00000022,0x00000020, CapsulesPath, CapsulesSubDir) + + # + # Generate capsules for the Blue Sample Device + # + GenCapsuleSampleDevice('Blue','149DA854-7D19-4FAA-A91E-862EA1324BE6',0= x00000010,0x00000000, CapsulesPath, CapsulesSubDir) + GenCapsuleSampleDevice('Blue','149DA854-7D19-4FAA-A91E-862EA1324BE6',0= x00000011,0x00000000, CapsulesPath, CapsulesSubDir) + GenCapsuleSampleDevice('Blue','149DA854-7D19-4FAA-A91E-862EA1324BE6',0= x00000012,0x00000012, CapsulesPath, CapsulesSubDir) + GenCapsuleSampleDevice('Blue','149DA854-7D19-4FAA-A91E-862EA1324BE6',0= x00000013,0x00000012, CapsulesPath, CapsulesSubDir) + GenCapsuleSampleDevice('Blue','149DA854-7D19-4FAA-A91E-862EA1324BE6',0= x00000014,0x00000012, CapsulesPath, CapsulesSubDir) + + # + # Generate capsules for Minnow Max Firmware Updates + # + RomFileName =3D os.path.join (EdkiiBuildOutput, 'FV', 'VLV.fd') + GenCapsuleDevice('MinnowMax', RomFileName,'4096267B-DA0A-42EB-B5EB-FEF= 31D207CB4',0x0000000C,0x00000000, CapsulesPath, CapsulesSubDir) diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsu= le/GenCapsuleAll.sh b/Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/Gene= rateCapsule/GenCapsuleAll.sh deleted file mode 100755 index 7b77b50c3f..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenC= apsuleAll.sh +++ /dev/null @@ -1,33 +0,0 @@ -# @file -# Linux script file to generate UEFI capsules for system firmware and -# firmware for sample devices -# -# Copyright (c) 2018, Intel Corporation. All rights reserved.
-# -# SPDX-License-Identifier: BSD-2-Clause-Patent -# - -cd $(dirname $0) - -EFI_DIR=3D$WORKSPACE/Build/Vlv2TbltDevicePkg/${TARGET}_${TOOL_CHAIN_TAG}/X= 64/ -CAP_DIR=3D$WORKSPACE/Build/Vlv2TbltDevicePkg/Capsules -SCRIPT_DIR=3D$WORKSPACE/edk2-platforms/Platform/Intel/Vlv2TbltDevicePkg/Fe= ature/Capsule/GenerateCapsule - -rm -rf $CAP_DIR -mkdir -p $CAP_DIR/SampleDevelopment -mkdir -p $CAP_DIR/NewCert -mkdir -p $CAP_DIR/TestCert -if [ "$TARGET" =3D=3D "DEBUG" ]; then - cp $EFI_DIR/CapsuleApp.efi $CAP_DIR/SampleDevelopment/CapsuleApp.efi - cp $EFI_DIR/CapsuleApp.efi $CAP_DIR/NewCert/CapsuleApp.efi - cp $EFI_DIR/CapsuleApp.efi $CAP_DIR/TestCert/CapsuleApp.efi - . $SCRIPT_DIR/GenCapsuleMinnowMax.sh -else - cp $EFI_DIR/CapsuleApp.efi $CAP_DIR/SampleDevelopment/CapsuleAppReleas= e.efi - cp $EFI_DIR/CapsuleApp.efi $CAP_DIR/NewCert/CapsuleAppRelease.efi - cp $EFI_DIR/CapsuleApp.efi $CAP_DIR/TestCert/CapsuleAppRelease.efi - . $SCRIPT_DIR/GenCapsuleMinnowMaxRelease.sh -fi -. $SCRIPT_DIR/GenCapsuleSampleColor.sh Blue 149DA854-7D19-4FAA-A91E-862EA= 1324BE6 -. $SCRIPT_DIR/GenCapsuleSampleColor.sh Green 79179BFD-704D-4C90-9E02-0AB8D= 968C18A -. $SCRIPT_DIR/GenCapsuleSampleColor.sh Red 72E2945A-00DA-448E-9AA7-075AD= 840F9D4 diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsu= le/GenCapsuleMinnowMax.bat b/Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsu= le/GenerateCapsule/GenCapsuleMinnowMax.bat deleted file mode 100644 index 6e4afd201e..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenC= apsuleMinnowMax.bat +++ /dev/null @@ -1,131 +0,0 @@ -@REM @file -@REM Windows batch file to generate UEFI capsules for system firmware -@REM -@REM Copyright (c) 2018, Intel Corporation. All rights reserved.
-@REM SPDX-License-Identifier: BSD-2-Clause-Patent -@REM - -@echo off -setlocal - -set FMP_CAPSULE_VENDOR=3DIntel -set FMP_CAPSULE_GUID=3D4096267B-DA0A-42EB-B5EB-FEF31D207CB4 -set FMP_CAPSULE_FILE=3DMinnowMax.cap -set FMP_CAPSULE_VERSION=3D0x0000000C -set FMP_CAPSULE_STRING=3D0.0.0.12 -set FMP_CAPSULE_NAME=3D"Intel MinnowMax DEBUG UEFI %FMP_CAPSULE_STRING%" -set FMP_CAPSULE_LSV=3D0x00000000 -set FMP_CAPSULE_KEY=3DSAMPLE_DEVELOPMENT.pfx -set FMP_CAPSULE_PAYLOAD=3D%WORKSPACE%\Build\Vlv2TbltDevicePkg\DEBUG_VS2015= x86\FV\Vlv.ROM -set WINDOWS_CAPSULE_KEY=3DSAMPLE_DEVELOPMENT.pfx - -if not exist "%FMP_CAPSULE_PAYLOAD%" exit /b - -if exist "%FMP_CAPSULE_KEY%" ( - REM - REM Sign capsule using signtool - REM - call GenerateCapsule ^ - --encode ^ - -v ^ - --guid %FMP_CAPSULE_GUID% ^ - --fw-version %FMP_CAPSULE_VERSION% ^ - --lsv %FMP_CAPSULE_LSV% ^ - --capflag PersistAcrossReset ^ - --capflag InitiateReset ^ - --signing-tool-path=3D"c:\Program Files (x86)\Windows Kits\8.1\bin\x86= " ^ - --pfx-file %FMP_CAPSULE_KEY% ^ - -o %FMP_CAPSULE_FILE% ^ - %FMP_CAPSULE_PAYLOAD% - - copy %FMP_CAPSULE_FILE% %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\Sam= pleDevelopment - - if exist "%WINDOWS_CAPSULE_KEY%" ( - CreateWindowsCapsule.py ^ - UEFI ^ - %FMP_CAPSULE_STRING% ^ - %FMP_CAPSULE_GUID% ^ - %FMP_CAPSULE_FILE% ^ - %FMP_CAPSULE_VERSION% ^ - %FMP_CAPSULE_VENDOR% ^ - %FMP_CAPSULE_VENDOR% ^ - %FMP_CAPSULE_NAME% %WINDOWS_CAPSULE_KEY% - - xcopy /s/e/v/i/y WindowsCapsule %WORKSPACE%\Build\Vlv2TbltDevicePkg\Ca= psules\SampleDevelopment\MinnowMaxWindowsCapsule - rmdir /s /q WindowsCapsule - ) - erase %FMP_CAPSULE_FILE% -) - -if exist "NewCert.pem" ( - REM - REM Sign capsule using OpenSSL with a new certificate - REM - call GenerateCapsule ^ - --encode ^ - -v ^ - --guid %FMP_CAPSULE_GUID% ^ - --fw-version %FMP_CAPSULE_VERSION% ^ - --lsv %FMP_CAPSULE_LSV% ^ - --capflag PersistAcrossReset ^ - --capflag InitiateReset ^ - --signer-private-cert=3DNewCert.pem ^ - --other-public-cert=3DNewSub.pub.pem ^ - --trusted-public-cert=3DNewRoot.pub.pem ^ - -o %FMP_CAPSULE_FILE% ^ - %FMP_CAPSULE_PAYLOAD% - - copy %FMP_CAPSULE_FILE% %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\New= Cert - - if exist "%WINDOWS_CAPSULE_KEY%" ( - CreateWindowsCapsule.py ^ - UEFI ^ - %FMP_CAPSULE_STRING% ^ - %FMP_CAPSULE_GUID% ^ - %FMP_CAPSULE_FILE% ^ - %FMP_CAPSULE_VERSION% ^ - %FMP_CAPSULE_VENDOR% ^ - %FMP_CAPSULE_VENDOR% ^ - %FMP_CAPSULE_NAME% %WINDOWS_CAPSULE_KEY% - - xcopy /s/e/v/i/y WindowsCapsule %WORKSPACE%\Build\Vlv2TbltDevicePkg\Ca= psules\NewCert\MinnowMaxWindowsCapsule - rmdir /s /q WindowsCapsule - ) - erase %FMP_CAPSULE_FILE% -) - -REM -REM Sign capsule using OpenSSL with EDK II Test Certificate -REM -call GenerateCapsule ^ - --encode ^ - -v ^ - --guid %FMP_CAPSULE_GUID% ^ - --fw-version %FMP_CAPSULE_VERSION% ^ - --lsv %FMP_CAPSULE_LSV% ^ - --capflag PersistAcrossReset ^ - --capflag InitiateReset ^ - --signer-private-cert=3D%WORKSPACE%\edk2\BaseTools\Source\Python\Pkcs7Si= gn\TestCert.pem ^ - --other-public-cert=3D%WORKSPACE%\edk2\BaseTools\Source\Python\Pkcs7Sign= \TestSub.pub.pem ^ - --trusted-public-cert=3D%WORKSPACE%\edk2\BaseTools\Source\Python\Pkcs7Si= gn\TestRoot.pub.pem ^ - -o %FMP_CAPSULE_FILE% ^ - %FMP_CAPSULE_PAYLOAD% - -copy %FMP_CAPSULE_FILE% %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\TestC= ert - -if exist "%WINDOWS_CAPSULE_KEY%" ( - CreateWindowsCapsule.py ^ - UEFI ^ - %FMP_CAPSULE_STRING% ^ - %FMP_CAPSULE_GUID% ^ - %FMP_CAPSULE_FILE% ^ - %FMP_CAPSULE_VERSION% ^ - %FMP_CAPSULE_VENDOR% ^ - %FMP_CAPSULE_VENDOR% ^ - %FMP_CAPSULE_NAME% %WINDOWS_CAPSULE_KEY% - - xcopy /s/e/v/i/y WindowsCapsule %WORKSPACE%\Build\Vlv2TbltDevicePkg\Caps= ules\TestCert\MinnowMaxWindowsCapsule - rmdir /s /q WindowsCapsule -) - -erase %FMP_CAPSULE_FILE% diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsu= le/GenCapsuleMinnowMax.sh b/Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsul= e/GenerateCapsule/GenCapsuleMinnowMax.sh deleted file mode 100644 index 114c4a3477..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenC= apsuleMinnowMax.sh +++ /dev/null @@ -1,59 +0,0 @@ -# @file -# Linux script file to generate UEFI capsules for system firmware -# -# Copyright (c) 2018, Intel Corporation. All rights reserved.
-# -# SPDX-License-Identifier: BSD-2-Clause-Patent -# - -FMP_CAPSULE_VENDOR=3DIntel -FMP_CAPSULE_GUID=3D4096267B-DA0A-42EB-B5EB-FEF31D207CB4 -FMP_CAPSULE_FILE=3DMinnowMax.cap -FMP_CAPSULE_VERSION=3D0x0000000C -FMP_CAPSULE_STRING=3D0.0.0.12 -FMP_CAPSULE_NAME=3D"Intel MinnowMax DEBUG UEFI $FMP_CAPSULE_STRING" -FMP_CAPSULE_LSV=3D0x00000000 -FMP_CAPSULE_PAYLOAD=3D$WORKSPACE/Build/Vlv2TbltDevicePkg/DEBUG_${TOOL_CHAI= N_TAG}/FV/Vlv.ROM -FMP_CAPSULE_DIR=3D$WORKSPACE/Build/Vlv2TbltDevicePkg/Capsules/ - -PKCS7SIGN_DIR=3D$WORKSPACE/edk2/BaseTools/Source/Python/Pkcs7Sign/ - -if [ ! -e "$FMP_CAPSULE_PAYLOAD" ] ; then - return -fi - -if [ -e NewCert.pem ]; then - # - # Sign capsule using OpenSSL with a new certificate - # - GenerateCapsule \ - --encode \ - -v \ - --guid $FMP_CAPSULE_GUID \ - --fw-version $FMP_CAPSULE_VERSION \ - --lsv $FMP_CAPSULE_LSV \ - --capflag PersistAcrossReset \ - --capflag InitiateReset \ - --signer-private-cert=3DNewCert.pem \ - --other-public-cert=3DNewSub.pub.pem \ - --trusted-public-cert=3DNewRoot.pub.pem \ - -o $FMP_CAPSULE_DIR/NewCert/$FMP_CAPSULE_FILE \ - $FMP_CAPSULE_PAYLOAD -fi - -# -# Sign capsule using OpenSSL with EDK II Test Certificate -# -GenerateCapsule \ - --encode \ - -v \ - --guid $FMP_CAPSULE_GUID \ - --fw-version $FMP_CAPSULE_VERSION \ - --lsv $FMP_CAPSULE_LSV \ - --capflag PersistAcrossReset \ - --capflag InitiateReset \ - --signer-private-cert=3D$PKCS7SIGN_DIR/TestCert.pem \ - --other-public-cert=3D$PKCS7SIGN_DIR/TestSub.pub.pem \ - --trusted-public-cert=3D$PKCS7SIGN_DIR/TestRoot.pub.pem \ - -o $FMP_CAPSULE_DIR/TestCert/$FMP_CAPSULE_FILE \ - $FMP_CAPSULE_PAYLOAD diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsu= le/GenCapsuleMinnowMaxRelease.bat b/Platform/Intel/Vlv2TbltDevicePkg/Featur= e/Capsule/GenerateCapsule/GenCapsuleMinnowMaxRelease.bat deleted file mode 100644 index 43c609e4b2..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenC= apsuleMinnowMaxRelease.bat +++ /dev/null @@ -1,131 +0,0 @@ -@REM @file -@REM Windows batch file to generate UEFI capsules for system firmware -@REM -@REM Copyright (c) 2018, Intel Corporation. All rights reserved.
-@REM SPDX-License-Identifier: BSD-2-Clause-Patent -@REM - -@echo off -setlocal - -set FMP_CAPSULE_VENDOR=3DIntel -set FMP_CAPSULE_GUID=3D4096267B-DA0A-42EB-B5EB-FEF31D207CB4 -set FMP_CAPSULE_FILE=3DMinnowMaxRelease.cap -set FMP_CAPSULE_VERSION=3D0x0000000C -set FMP_CAPSULE_STRING=3D0.0.0.12 -set FMP_CAPSULE_NAME=3D"Intel MinnowMax RELEASE UEFI %FMP_CAPSULE_STRING%" -set FMP_CAPSULE_LSV=3D0x00000000 -set FMP_CAPSULE_KEY=3DSAMPLE_DEVELOPMENT.pfx -set FMP_CAPSULE_PAYLOAD=3D%WORKSPACE%\Build\Vlv2TbltDevicePkg\RELEASE_VS20= 15x86\FV\Vlv.ROM -set WINDOWS_CAPSULE_KEY=3DSAMPLE_DEVELOPMENT.pfx - -if not exist "%FMP_CAPSULE_PAYLOAD%" exit /b - -if exist "%FMP_CAPSULE_KEY%" ( - REM - REM Sign capsule using signtool - REM - call GenerateCapsule ^ - --encode ^ - -v ^ - --guid %FMP_CAPSULE_GUID% ^ - --fw-version %FMP_CAPSULE_VERSION% ^ - --lsv %FMP_CAPSULE_LSV% ^ - --capflag PersistAcrossReset ^ - --capflag InitiateReset ^ - --signing-tool-path=3D"c:\Program Files (x86)\Windows Kits\8.1\bin\x86= " ^ - --pfx-file %FMP_CAPSULE_KEY% ^ - -o %FMP_CAPSULE_FILE% ^ - %FMP_CAPSULE_PAYLOAD% - - copy %FMP_CAPSULE_FILE% %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\Sam= pleDevelopment - - if exist "%WINDOWS_CAPSULE_KEY%" ( - CreateWindowsCapsule.py ^ - UEFI ^ - %FMP_CAPSULE_STRING% ^ - %FMP_CAPSULE_GUID% ^ - %FMP_CAPSULE_FILE% ^ - %FMP_CAPSULE_VERSION% ^ - %FMP_CAPSULE_VENDOR% ^ - %FMP_CAPSULE_VENDOR% ^ - %FMP_CAPSULE_NAME% %WINDOWS_CAPSULE_KEY% - - xcopy /s/e/v/i/y WindowsCapsule %WORKSPACE%\Build\Vlv2TbltDevicePkg\Ca= psules\SampleDevelopment\MinnowMaxReleaseWindowsCapsule - rmdir /s /q WindowsCapsule - ) - erase %FMP_CAPSULE_FILE% -) - -if exist "NewCert.pem" ( - REM - REM Sign capsule using OpenSSL with a new certificate - REM - call GenerateCapsule ^ - --encode ^ - -v ^ - --guid %FMP_CAPSULE_GUID% ^ - --fw-version %FMP_CAPSULE_VERSION% ^ - --lsv %FMP_CAPSULE_LSV% ^ - --capflag PersistAcrossReset ^ - --capflag InitiateReset ^ - --signer-private-cert=3DNewCert.pem ^ - --other-public-cert=3DNewSub.pub.pem ^ - --trusted-public-cert=3DNewRoot.pub.pem ^ - -o %FMP_CAPSULE_FILE% ^ - %FMP_CAPSULE_PAYLOAD% - - copy %FMP_CAPSULE_FILE% %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\New= Cert - - if exist "%WINDOWS_CAPSULE_KEY%" ( - CreateWindowsCapsule.py ^ - UEFI ^ - %FMP_CAPSULE_STRING% ^ - %FMP_CAPSULE_GUID% ^ - %FMP_CAPSULE_FILE% ^ - %FMP_CAPSULE_VERSION% ^ - %FMP_CAPSULE_VENDOR% ^ - %FMP_CAPSULE_VENDOR% ^ - %FMP_CAPSULE_NAME% %WINDOWS_CAPSULE_KEY% - - xcopy /s/e/v/i/y WindowsCapsule %WORKSPACE%\Build\Vlv2TbltDevicePkg\Ca= psules\NewCert\MinnowMaxReleaseWindowsCapsule - rmdir /s /q WindowsCapsule - ) - erase %FMP_CAPSULE_FILE% -) - -REM -REM Sign capsule using OpenSSL with EDK II Test Certificate -REM -call GenerateCapsule ^ - --encode ^ - -v ^ - --guid %FMP_CAPSULE_GUID% ^ - --fw-version %FMP_CAPSULE_VERSION% ^ - --lsv %FMP_CAPSULE_LSV% ^ - --capflag PersistAcrossReset ^ - --capflag InitiateReset ^ - --signer-private-cert=3D%WORKSPACE%\edk2\BaseTools\Source\Python\Pkcs7Si= gn\TestCert.pem ^ - --other-public-cert=3D%WORKSPACE%\edk2\BaseTools\Source\Python\Pkcs7Sign= \TestSub.pub.pem ^ - --trusted-public-cert=3D%WORKSPACE%\edk2\BaseTools\Source\Python\Pkcs7Si= gn\TestRoot.pub.pem ^ - -o %FMP_CAPSULE_FILE% ^ - %FMP_CAPSULE_PAYLOAD% - -copy %FMP_CAPSULE_FILE% %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\TestC= ert - -if exist "%WINDOWS_CAPSULE_KEY%" ( - CreateWindowsCapsule.py ^ - UEFI ^ - %FMP_CAPSULE_STRING% ^ - %FMP_CAPSULE_GUID% ^ - %FMP_CAPSULE_FILE% ^ - %FMP_CAPSULE_VERSION% ^ - %FMP_CAPSULE_VENDOR% ^ - %FMP_CAPSULE_VENDOR% ^ - %FMP_CAPSULE_NAME% %WINDOWS_CAPSULE_KEY% - - xcopy /s/e/v/i/y WindowsCapsule %WORKSPACE%\Build\Vlv2TbltDevicePkg\Caps= ules\TestCert\MinnowMaxReleaseWindowsCapsule - rmdir /s /q WindowsCapsule -) - -erase %FMP_CAPSULE_FILE% diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsu= le/GenCapsuleMinnowMaxRelease.sh b/Platform/Intel/Vlv2TbltDevicePkg/Feature= /Capsule/GenerateCapsule/GenCapsuleMinnowMaxRelease.sh deleted file mode 100644 index d2619786e8..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenC= apsuleMinnowMaxRelease.sh +++ /dev/null @@ -1,64 +0,0 @@ -# @file -# Linux script file to generate UEFI capsules for system firmware -# -# Copyright (c) 2018, Intel Corporation. All rights reserved.
-# -# SPDX-License-Identifier: BSD-2-Clause-Patent -# - -FMP_CAPSULE_VENDOR=3DIntel -FMP_CAPSULE_GUID=3D4096267B-DA0A-42EB-B5EB-FEF31D207CB4 -FMP_CAPSULE_FILE=3DMinnowMaxRelease.cap -FMP_CAPSULE_VERSION=3D0x0000000C -FMP_CAPSULE_STRING=3D0.0.0.12 -FMP_CAPSULE_NAME=3D"Intel MinnowMax RELEASE UEFI $FMP_CAPSULE_STRING" -FMP_CAPSULE_LSV=3D0x00000000 -FMP_CAPSULE_PAYLOAD=3D$WORKSPACE/Build/Vlv2TbltDevicePkg/RELEASE_${TOOL_CH= AIN_TAG}/FV/Vlv.ROM -FMP_CAPSULE_DIR=3D$WORKSPACE/Build/Vlv2TbltDevicePkg/Capsules/ - -PKCS7SIGN_DIR=3D$WORKSPACE/edk2/BaseTools/Source/Python/Pkcs7Sign/ - -if [ ! -e "$FMP_CAPSULE_PAYLOAD" ] ; then - return -fi - -if [ -e NewCert.pem ]; then - # - # Sign capsule using OpenSSL with a new certificate - # - GenerateCapsule \ - --encode \ - -v \ - --guid $FMP_CAPSULE_GUID \ - --fw-version $FMP_CAPSULE_VERSION \ - --lsv $FMP_CAPSULE_LSV \ - --capflag PersistAcrossReset \ - --capflag InitiateReset \ - --signer-private-cert=3DNewCert.pem \ - --other-public-cert=3DNewSub.pub.pem \ - --trusted-public-cert=3DNewRoot.pub.pem \ - -o $FMP_CAPSULE_DIR/NewCert/$FMP_CAPSULE_FILE \ - $FMP_CAPSULE_PAYLOAD -fi - -# -# Sign capsule using OpenSSL with EDK II Test Certificate -# -GenerateCapsule \ - --encode \ - -v \ - --guid $FMP_CAPSULE_GUID \ - --fw-version $FMP_CAPSULE_VERSION \ - --lsv $FMP_CAPSULE_LSV \ - --capflag PersistAcrossReset \ - --capflag InitiateReset \ - --signer-private-cert=3D$PKCS7SIGN_DIR/TestCert.pem \ - --other-public-cert=3D$PKCS7SIGN_DIR/TestSub.pub.pem \ - --trusted-public-cert=3D$PKCS7SIGN_DIR/TestRoot.pub.pem \ - -o $FMP_CAPSULE_DIR/TestCert/$FMP_CAPSULE_FILE \ - $FMP_CAPSULE_PAYLOAD - -cp $FMP_CAPSULE_FILE $WORKSPACE/Build/Vlv2TbltDevicePkg/Capsules/TestCert - -rm $FMP_CAPSULE_FILE - diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsu= le/GenCapsuleSampleColor.bat b/Platform/Intel/Vlv2TbltDevicePkg/Feature/Cap= sule/GenerateCapsule/GenCapsuleSampleColor.bat deleted file mode 100644 index 3e9f94c530..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenC= apsuleSampleColor.bat +++ /dev/null @@ -1,137 +0,0 @@ -@REM @file -@REM Windows batch file to generate UEFI capsules for a sample device -@REM -@REM Copyright (c) 2018, Intel Corporation. All rights reserved.
-@REM SPDX-License-Identifier: BSD-2-Clause-Patent -@REM - -@echo off -setlocal - -set COLOR=3D%1 - -set FMP_CAPSULE_VENDOR=3DIntel -set FMP_CAPSULE_GUID=3D%2 -set FMP_CAPSULE_FILE=3D%COLOR%.cap -set FMP_CAPSULE_VERSION=3D0x00000010 -set FMP_CAPSULE_STRING=3D0.0.0.16 -set FMP_CAPSULE_NAME=3D"%COLOR% Progress Bar %FMP_CAPSULE_STRING%" -set FMP_CAPSULE_LSV=3D0x00000000 -set FMP_CAPSULE_KEY=3DSAMPLE_DEVELOPMENT.pfx -set FMP_CAPSULE_PAYLOAD=3DPayload.bin -set WINDOWS_CAPSULE_KEY=3DSAMPLE_DEVELOPMENT.pfx - -echo "%COLOR% Progress Bar" > %FMP_CAPSULE_PAYLOAD% - -if not exist "%FMP_CAPSULE_PAYLOAD%" exit - -if exist "%FMP_CAPSULE_KEY%" ( - REM - REM Sign capsule using signtool - REM - call GenerateCapsule ^ - --encode ^ - -v ^ - --guid %FMP_CAPSULE_GUID% ^ - --fw-version %FMP_CAPSULE_VERSION% ^ - --lsv %FMP_CAPSULE_LSV% ^ - --capflag PersistAcrossReset ^ - --capflag InitiateReset ^ - --signing-tool-path=3D"c:\Program Files (x86)\Windows Kits\8.1\bin\x86= " ^ - --pfx-file %FMP_CAPSULE_KEY% ^ - -o %FMP_CAPSULE_FILE% ^ - %FMP_CAPSULE_PAYLOAD% - - copy %FMP_CAPSULE_FILE% %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\Sam= pleDevelopment - - if exist "%WINDOWS_CAPSULE_KEY%" ( - CreateWindowsCapsule.py ^ - UEFI ^ - %FMP_CAPSULE_STRING% ^ - %FMP_CAPSULE_GUID% ^ - %FMP_CAPSULE_FILE% ^ - %FMP_CAPSULE_VERSION% ^ - %FMP_CAPSULE_VENDOR% ^ - %FMP_CAPSULE_VENDOR% ^ - %FMP_CAPSULE_NAME% %WINDOWS_CAPSULE_KEY% - - xcopy /s/e/v/i/y WindowsCapsule %WORKSPACE%\Build\Vlv2TbltDevicePkg\Ca= psules\SampleDevelopment\%COLOR%WindowsCapsule - rmdir /s /q WindowsCapsule - ) - erase %FMP_CAPSULE_FILE% -) - -if exist "NewCert.pem" ( - REM - REM Sign capsule using OpenSSL with a new certificate - REM - call GenerateCapsule ^ - --encode ^ - -v ^ - --guid %FMP_CAPSULE_GUID% ^ - --fw-version %FMP_CAPSULE_VERSION% ^ - --lsv %FMP_CAPSULE_LSV% ^ - --capflag PersistAcrossReset ^ - --capflag InitiateReset ^ - --signer-private-cert=3DNewCert.pem ^ - --other-public-cert=3DNewSub.pub.pem ^ - --trusted-public-cert=3DNewRoot.pub.pem ^ - -o %FMP_CAPSULE_FILE% ^ - %FMP_CAPSULE_PAYLOAD% - - copy %FMP_CAPSULE_FILE% %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\New= Cert - - if exist "%WINDOWS_CAPSULE_KEY%" ( - CreateWindowsCapsule.py ^ - UEFI ^ - %FMP_CAPSULE_STRING% ^ - %FMP_CAPSULE_GUID% ^ - %FMP_CAPSULE_FILE% ^ - %FMP_CAPSULE_VERSION% ^ - %FMP_CAPSULE_VENDOR% ^ - %FMP_CAPSULE_VENDOR% ^ - %FMP_CAPSULE_NAME% %WINDOWS_CAPSULE_KEY% - - xcopy /s/e/v/i/y WindowsCapsule %WORKSPACE%\Build\Vlv2TbltDevicePkg\Ca= psules\NewCert\%COLOR%WindowsCapsule - rmdir /s /q WindowsCapsule - ) - erase %FMP_CAPSULE_FILE% -) - -REM -REM Sign capsule using OpenSSL with EDK II Test Certificate -REM -call GenerateCapsule ^ - --encode ^ - -v ^ - --guid %FMP_CAPSULE_GUID% ^ - --fw-version %FMP_CAPSULE_VERSION% ^ - --lsv %FMP_CAPSULE_LSV% ^ - --capflag PersistAcrossReset ^ - --capflag InitiateReset ^ - --signer-private-cert=3D%WORKSPACE%\edk2\BaseTools\Source\Python\Pkcs7Si= gn\TestCert.pem ^ - --other-public-cert=3D%WORKSPACE%\edk2\BaseTools\Source\Python\Pkcs7Sign= \TestSub.pub.pem ^ - --trusted-public-cert=3D%WORKSPACE%\edk2\BaseTools\Source\Python\Pkcs7Si= gn\TestRoot.pub.pem ^ - -o %FMP_CAPSULE_FILE% ^ - %FMP_CAPSULE_PAYLOAD% - -copy %FMP_CAPSULE_FILE% %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\TestC= ert - -if exist "%WINDOWS_CAPSULE_KEY%" ( - CreateWindowsCapsule.py ^ - UEFI ^ - %FMP_CAPSULE_STRING% ^ - %FMP_CAPSULE_GUID% ^ - %FMP_CAPSULE_FILE% ^ - %FMP_CAPSULE_VERSION% ^ - %FMP_CAPSULE_VENDOR% ^ - %FMP_CAPSULE_VENDOR% ^ - %FMP_CAPSULE_NAME% %WINDOWS_CAPSULE_KEY% - - xcopy /s/e/v/i/y WindowsCapsule %WORKSPACE%\Build\Vlv2TbltDevicePkg\Caps= ules\TestCert\%COLOR%WindowsCapsule - rmdir /s /q WindowsCapsule -) - -erase %FMP_CAPSULE_FILE% - -erase %FMP_CAPSULE_PAYLOAD% diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsu= le/GenCapsuleSampleColor.sh b/Platform/Intel/Vlv2TbltDevicePkg/Feature/Caps= ule/GenerateCapsule/GenCapsuleSampleColor.sh deleted file mode 100644 index a1c6f28cde..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenC= apsuleSampleColor.sh +++ /dev/null @@ -1,70 +0,0 @@ -# @file -# Linux script file to generate UEFI capsules for a sample device -# -# Copyright (c) 2018, Intel Corporation. All rights reserved.
-# -# SPDX-License-Identifier: BSD-2-Clause-Patent -# - -COLOR=3D$1 - -FMP_CAPSULE_VENDOR=3DIntel -FMP_CAPSULE_GUID=3D$2 -FMP_CAPSULE_FILE=3D$COLOR.cap -FMP_CAPSULE_VERSION=3D0x00000010 -FMP_CAPSULE_STRING=3D0.0.0.16 -FMP_CAPSULE_NAME=3D"$COLOR Progress Bar $FMP_CAPSULE_STRING" -FMP_CAPSULE_LSV=3D0x00000000 -FMP_CAPSULE_PAYLOAD=3DPayload.bin - -echo "$COLOR Progress Bar" > $FMP_CAPSULE_PAYLOAD - -if [ ! -e "$FMP_CAPSULE_PAYLOAD" ] ; then - return -fi - -if [ -e NewCert.pem ]; then - # - # Sign capsule using OpenSSL with a new certificate - # - GenerateCapsule \ - --encode \ - -v \ - --guid $FMP_CAPSULE_GUID \ - --fw-version $FMP_CAPSULE_VERSION \ - --lsv $FMP_CAPSULE_LSV \ - --capflag PersistAcrossReset \ - --capflag InitiateReset \ - --signer-private-cert=3DNewCert.pem \ - --other-public-cert=3DNewSub.pub.pem \ - --trusted-public-cert=3DNewRoot.pub.pem \ - -o $FMP_CAPSULE_FILE \ - $FMP_CAPSULE_PAYLOAD - - cp $FMP_CAPSULE_FILE $WORKSPACE/Build/Vlv2TbltDevicePkg/Capsules/NewCert - - rm $FMP_CAPSULE_FILE -fi - -# -# Sign capsule using OpenSSL with EDK II Test Certificate -# -GenerateCapsule \ - --encode \ - -v \ - --guid $FMP_CAPSULE_GUID \ - --fw-version $FMP_CAPSULE_VERSION \ - --lsv $FMP_CAPSULE_LSV \ - --capflag PersistAcrossReset \ - --capflag InitiateReset \ - --signer-private-cert=3D$WORKSPACE/edk2/BaseTools/Source/Python/Pkcs7Sig= n/TestCert.pem \ - --other-public-cert=3D$WORKSPACE/edk2/BaseTools/Source/Python/Pkcs7Sign/= TestSub.pub.pem \ - --trusted-public-cert=3D$WORKSPACE/edk2/BaseTools/Source/Python/Pkcs7Sig= n/TestRoot.pub.pem \ - -o $FMP_CAPSULE_FILE \ - $FMP_CAPSULE_PAYLOAD - -cp $FMP_CAPSULE_FILE $WORKSPACE/Build/Vlv2TbltDevicePkg/Capsules/TestCert - -rm $FMP_CAPSULE_FILE - -rm $FMP_CAPSULE_PAYLOAD diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsu= le/Lvfs.ddf b/Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCaps= ule/Lvfs.ddf deleted file mode 100644 index f2c925a6dd..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/Lvfs= .ddf +++ /dev/null @@ -1,14 +0,0 @@ -.OPTION EXPLICIT ; Generate errors on variable typos - -.Set CabinetNameTemplate=3Dfirmware.cab ; The name of the file -.set DiskDirectoryTemplate=3DCDROM ; All cabinets go in a single directory -.Set Cabinet=3Don ; -.Set Compress=3Don ; -.Set DiskDirectory1=3D. -.Set MaxDiskSize=3D99999744 ; multiple of 512 - -;*** Files to zip ; -; -firmware.bin -firmware.metainfo.xml -;*** diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsu= le/LvfsGenCapsuleMinnowMax.bat b/Platform/Intel/Vlv2TbltDevicePkg/Feature/C= apsule/GenerateCapsule/LvfsGenCapsuleMinnowMax.bat deleted file mode 100644 index dd8274a1cc..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/Lvfs= GenCapsuleMinnowMax.bat +++ /dev/null @@ -1,139 +0,0 @@ -@REM @file -@REM Windows batch file to generate UEFI capsules for system firmware -@REM -@REM Copyright (c) 2018, Intel Corporation. All rights reserved.
-@REM -@REM SPDX-License-Identifier: BSD-2-Clause-Patent -@REM - -@echo off -setlocal - -set FMP_CAPSULE_VENDOR=3DIntel -set FMP_CAPSULE_GUID=3D4096267b-da0a-42eb-b5eb-fef31d207cb4 -set FMP_CAPSULE_BASE_NAME=3DMinnowMax -set FMP_CAPSULE_FILE=3D%FMP_CAPSULE_BASE_NAME%.cap -set FMP_CAPSULE_VERSION=3D0x0000000C -set FMP_CAPSULE_VERSION_DECIMAL=3D12 -set FMP_CAPSULE_STRING=3D0.0.0.12 -set FMP_CAPSULE_NAME=3D"Intel %FMP_CAPSULE_BASE_NAME% DEBUG UEFI %FMP_CAPS= ULE_STRING%" -set FMP_CAPSULE_LSV=3D0x00000000 -set FMP_CAPSULE_KEY=3DSAMPLE_DEVELOPMENT.pfx -set FMP_CAPSULE_PAYLOAD=3D%WORKSPACE%\Build\Vlv2TbltDevicePkg\DEBUG_VS2015= x86\FV\Vlv.ROM -set WINDOWS_CAPSULE_KEY=3DSAMPLE_DEVELOPMENT.pfx - -if not exist "%FMP_CAPSULE_PAYLOAD%" exit /b - -if exist "%FMP_CAPSULE_KEY%" ( - REM - REM Sign capsule using signtool - REM - call GenerateCapsule ^ - --encode ^ - -v ^ - --guid %FMP_CAPSULE_GUID% ^ - --fw-version %FMP_CAPSULE_VERSION% ^ - --lsv %FMP_CAPSULE_LSV% ^ - --capflag PersistAcrossReset ^ - --capflag InitiateReset ^ - --signing-tool-path=3D"c:\Program Files (x86)\Windows Kits\8.1\bin\x86= " ^ - --pfx-file %FMP_CAPSULE_KEY% ^ - -o %FMP_CAPSULE_FILE% ^ - %FMP_CAPSULE_PAYLOAD% - - copy %FMP_CAPSULE_FILE% %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\Sam= pleDevelopment - - copy %FMP_CAPSULE_FILE% firmware.bin - copy template.metainfo.xml firmware.metainfo.xml - powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_GU= ID', '%FMP_CAPSULE_GUID%' | Out-File firmware.metainfo.xml -encoding ASCII" - powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_BA= SE_NAME', '%FMP_CAPSULE_BASE_NAME%' | Out-File firmware.metainfo.xml -encod= ing ASCII" - powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_VE= RSION_DECIMAL', '%FMP_CAPSULE_VERSION_DECIMAL%' | Out-File firmware.metainf= o.xml -encoding ASCII" - powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_ST= RING', '%FMP_CAPSULE_STRING%' | Out-File firmware.metainfo.xml -encoding AS= CII" - powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_DA= TE', '%date%' | Out-File firmware.metainfo.xml -encoding ASCII" - makecab /f Lvfs.ddf - copy firmware.cab %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\TestCert\= %FMP_CAPSULE_BASE_NAME%-%FMP_CAPSULE_STRING%.cab - - erase firmware.cab - erase setup.inf - erase setup.rpt - - erase firmware.metainfo.xml - erase firmware.bin - erase %FMP_CAPSULE_FILE% -) - -if exist "NewCert.pem" ( - REM - REM Sign capsule using OpenSSL with a new certificate - REM - call GenerateCapsule ^ - --encode ^ - -v ^ - --guid %FMP_CAPSULE_GUID% ^ - --fw-version %FMP_CAPSULE_VERSION% ^ - --lsv %FMP_CAPSULE_LSV% ^ - --capflag PersistAcrossReset ^ - --capflag InitiateReset ^ - --signer-private-cert=3DNewCert.pem ^ - --other-public-cert=3DNewSub.pub.pem ^ - --trusted-public-cert=3DNewRoot.pub.pem ^ - -o %FMP_CAPSULE_FILE% ^ - %FMP_CAPSULE_PAYLOAD% - - copy %FMP_CAPSULE_FILE% %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\New= Cert - - copy %FMP_CAPSULE_FILE% firmware.bin - copy template.metainfo.xml firmware.metainfo.xml - powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_GU= ID', '%FMP_CAPSULE_GUID%' | Out-File firmware.metainfo.xml -encoding ASCII" - powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_BA= SE_NAME', '%FMP_CAPSULE_BASE_NAME%' | Out-File firmware.metainfo.xml -encod= ing ASCII" - powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_VE= RSION_DECIMAL', '%FMP_CAPSULE_VERSION_DECIMAL%' | Out-File firmware.metainf= o.xml -encoding ASCII" - powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_ST= RING', '%FMP_CAPSULE_STRING%' | Out-File firmware.metainfo.xml -encoding AS= CII" - powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_DA= TE', '%date%' | Out-File firmware.metainfo.xml -encoding ASCII" - makecab /f Lvfs.ddf - copy firmware.cab %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\TestCert\= %FMP_CAPSULE_BASE_NAME%-%FMP_CAPSULE_STRING%.cab - - erase firmware.cab - erase setup.inf - erase setup.rpt - - erase firmware.metainfo.xml - erase firmware.bin - erase %FMP_CAPSULE_FILE% -) - -REM -REM Sign capsule using OpenSSL with EDK II Test Certificate -REM -call GenerateCapsule ^ - --encode ^ - -v ^ - --guid %FMP_CAPSULE_GUID% ^ - --fw-version %FMP_CAPSULE_VERSION% ^ - --lsv %FMP_CAPSULE_LSV% ^ - --capflag PersistAcrossReset ^ - --capflag InitiateReset ^ - --signer-private-cert=3D%WORKSPACE%\edk2\BaseTools\Source\Python\Pkcs7Si= gn\TestCert.pem ^ - --other-public-cert=3D%WORKSPACE%\edk2\BaseTools\Source\Python\Pkcs7Sign= \TestSub.pub.pem ^ - --trusted-public-cert=3D%WORKSPACE%\edk2\BaseTools\Source\Python\Pkcs7Si= gn\TestRoot.pub.pem ^ - -o %FMP_CAPSULE_FILE% ^ - %FMP_CAPSULE_PAYLOAD% - -copy %FMP_CAPSULE_FILE% %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\TestC= ert - -copy %FMP_CAPSULE_FILE% firmware.bin -copy template.metainfo.xml firmware.metainfo.xml -powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_GUID= ', '%FMP_CAPSULE_GUID%' | Out-File firmware.metainfo.xml -encoding ASCII" -powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_BASE= _NAME', '%FMP_CAPSULE_BASE_NAME%' | Out-File firmware.metainfo.xml -encodin= g ASCII" -powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_VERS= ION_DECIMAL', '%FMP_CAPSULE_VERSION_DECIMAL%' | Out-File firmware.metainfo.= xml -encoding ASCII" -powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_STRI= NG', '%FMP_CAPSULE_STRING%' | Out-File firmware.metainfo.xml -encoding ASCI= I" -powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_DATE= ', '%date%' | Out-File firmware.metainfo.xml -encoding ASCII" -makecab /f Lvfs.ddf -copy firmware.cab %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\TestCert\%F= MP_CAPSULE_BASE_NAME%-%FMP_CAPSULE_STRING%.cab - -erase firmware.cab -erase setup.inf -erase setup.rpt - -erase firmware.metainfo.xml -erase firmware.bin -erase %FMP_CAPSULE_FILE% diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsu= le/LvfsGenCapsuleMinnowMaxRelease.bat b/Platform/Intel/Vlv2TbltDevicePkg/Fe= ature/Capsule/GenerateCapsule/LvfsGenCapsuleMinnowMaxRelease.bat deleted file mode 100644 index 2b68a98f98..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/Lvfs= GenCapsuleMinnowMaxRelease.bat +++ /dev/null @@ -1,139 +0,0 @@ -@REM @file -@REM Windows batch file to generate UEFI capsules for system firmware -@REM -@REM Copyright (c) 2018, Intel Corporation. All rights reserved.
-@REM -@REM SPDX-License-Identifier: BSD-2-Clause-Patent -@REM - -@echo off -setlocal - -set FMP_CAPSULE_VENDOR=3DIntel -set FMP_CAPSULE_GUID=3D4096267b-da0a-42eb-b5eb-fef31d207cb4 -set FMP_CAPSULE_BASE_NAME=3DMinnowMaxRelease -set FMP_CAPSULE_FILE=3D%FMP_CAPSULE_BASE_NAME%.cap -set FMP_CAPSULE_VERSION=3D0x0000000C -set FMP_CAPSULE_VERSION_DECIMAL=3D12 -set FMP_CAPSULE_STRING=3D0.0.0.12 -set FMP_CAPSULE_NAME=3D"Intel %FMP_CAPSULE_BASE_NAME% RELEASE UEFI %FMP_CA= PSULE_STRING%" -set FMP_CAPSULE_LSV=3D0x00000000 -set FMP_CAPSULE_KEY=3DSAMPLE_DEVELOPMENT.pfx -set FMP_CAPSULE_PAYLOAD=3D%WORKSPACE%\Build\Vlv2TbltDevicePkg\RELEASE_VS20= 15x86\FV\Vlv.ROM -set WINDOWS_CAPSULE_KEY=3DSAMPLE_DEVELOPMENT.pfx - -if not exist "%FMP_CAPSULE_PAYLOAD%" exit /b - -if exist "%FMP_CAPSULE_KEY%" ( - REM - REM Sign capsule using signtool - REM - call GenerateCapsule ^ - --encode ^ - -v ^ - --guid %FMP_CAPSULE_GUID% ^ - --fw-version %FMP_CAPSULE_VERSION% ^ - --lsv %FMP_CAPSULE_LSV% ^ - --capflag PersistAcrossReset ^ - --capflag InitiateReset ^ - --signing-tool-path=3D"c:\Program Files (x86)\Windows Kits\8.1\bin\x86= " ^ - --pfx-file %FMP_CAPSULE_KEY% ^ - -o %FMP_CAPSULE_FILE% ^ - %FMP_CAPSULE_PAYLOAD% - - copy %FMP_CAPSULE_FILE% %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\Sam= pleDevelopment - - copy %FMP_CAPSULE_FILE% firmware.bin - copy template.metainfo.xml firmware.metainfo.xml - powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_GU= ID', '%FMP_CAPSULE_GUID%' | Out-File firmware.metainfo.xml -encoding ASCII" - powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_BA= SE_NAME', '%FMP_CAPSULE_BASE_NAME%' | Out-File firmware.metainfo.xml -encod= ing ASCII" - powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_VE= RSION_DECIMAL', '%FMP_CAPSULE_VERSION_DECIMAL%' | Out-File firmware.metainf= o.xml -encoding ASCII" - powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_ST= RING', '%FMP_CAPSULE_STRING%' | Out-File firmware.metainfo.xml -encoding AS= CII" - powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_DA= TE', '%date%' | Out-File firmware.metainfo.xml -encoding ASCII" - makecab /f Lvfs.ddf - copy firmware.cab %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\TestCert\= %FMP_CAPSULE_BASE_NAME%-%FMP_CAPSULE_STRING%.cab - - erase firmware.cab - erase setup.inf - erase setup.rpt - - erase firmware.metainfo.xml - erase firmware.bin - erase %FMP_CAPSULE_FILE% -) - -if exist "NewCert.pem" ( - REM - REM Sign capsule using OpenSSL with a new certificate - REM - call GenerateCapsule ^ - --encode ^ - -v ^ - --guid %FMP_CAPSULE_GUID% ^ - --fw-version %FMP_CAPSULE_VERSION% ^ - --lsv %FMP_CAPSULE_LSV% ^ - --capflag PersistAcrossReset ^ - --capflag InitiateReset ^ - --signer-private-cert=3DNewCert.pem ^ - --other-public-cert=3DNewSub.pub.pem ^ - --trusted-public-cert=3DNewRoot.pub.pem ^ - -o %FMP_CAPSULE_FILE% ^ - %FMP_CAPSULE_PAYLOAD% - - copy %FMP_CAPSULE_FILE% %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\New= Cert - - copy %FMP_CAPSULE_FILE% firmware.bin - copy template.metainfo.xml firmware.metainfo.xml - powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_GU= ID', '%FMP_CAPSULE_GUID%' | Out-File firmware.metainfo.xml -encoding ASCII" - powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_BA= SE_NAME', '%FMP_CAPSULE_BASE_NAME%' | Out-File firmware.metainfo.xml -encod= ing ASCII" - powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_VE= RSION_DECIMAL', '%FMP_CAPSULE_VERSION_DECIMAL%' | Out-File firmware.metainf= o.xml -encoding ASCII" - powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_ST= RING', '%FMP_CAPSULE_STRING%' | Out-File firmware.metainfo.xml -encoding AS= CII" - powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_DA= TE', '%date%' | Out-File firmware.metainfo.xml -encoding ASCII" - makecab /f Lvfs.ddf - copy firmware.cab %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\TestCert\= %FMP_CAPSULE_BASE_NAME%-%FMP_CAPSULE_STRING%.cab - - erase firmware.cab - erase setup.inf - erase setup.rpt - - erase firmware.metainfo.xml - erase firmware.bin - erase %FMP_CAPSULE_FILE% -) - -REM -REM Sign capsule using OpenSSL with EDK II Test Certificate -REM -call GenerateCapsule ^ - --encode ^ - -v ^ - --guid %FMP_CAPSULE_GUID% ^ - --fw-version %FMP_CAPSULE_VERSION% ^ - --lsv %FMP_CAPSULE_LSV% ^ - --capflag PersistAcrossReset ^ - --capflag InitiateReset ^ - --signer-private-cert=3D%WORKSPACE%\edk2\BaseTools\Source\Python\Pkcs7Si= gn\TestCert.pem ^ - --other-public-cert=3D%WORKSPACE%\edk2\BaseTools\Source\Python\Pkcs7Sign= \TestSub.pub.pem ^ - --trusted-public-cert=3D%WORKSPACE%\edk2\BaseTools\Source\Python\Pkcs7Si= gn\TestRoot.pub.pem ^ - -o %FMP_CAPSULE_FILE% ^ - %FMP_CAPSULE_PAYLOAD% - -copy %FMP_CAPSULE_FILE% %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\TestC= ert - -copy %FMP_CAPSULE_FILE% firmware.bin -copy template.metainfo.xml firmware.metainfo.xml -powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_GUID= ', '%FMP_CAPSULE_GUID%' | Out-File firmware.metainfo.xml -encoding ASCII" -powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_BASE= _NAME', '%FMP_CAPSULE_BASE_NAME%' | Out-File firmware.metainfo.xml -encodin= g ASCII" -powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_VERS= ION_DECIMAL', '%FMP_CAPSULE_VERSION_DECIMAL%' | Out-File firmware.metainfo.= xml -encoding ASCII" -powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_STRI= NG', '%FMP_CAPSULE_STRING%' | Out-File firmware.metainfo.xml -encoding ASCI= I" -powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_DATE= ', '%date%' | Out-File firmware.metainfo.xml -encoding ASCII" -makecab /f Lvfs.ddf -copy firmware.cab %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\TestCert\%F= MP_CAPSULE_BASE_NAME%-%FMP_CAPSULE_STRING%.cab - -erase firmware.cab -erase setup.inf -erase setup.rpt - -erase firmware.metainfo.xml -erase firmware.bin -erase %FMP_CAPSULE_FILE% diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsu= le/LvfsGenCapsuleSampleColor.bat b/Platform/Intel/Vlv2TbltDevicePkg/Feature= /Capsule/GenerateCapsule/LvfsGenCapsuleSampleColor.bat deleted file mode 100644 index 1dbbe7341d..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/Lvfs= GenCapsuleSampleColor.bat +++ /dev/null @@ -1,145 +0,0 @@ -@REM @file -@REM Windows batch file to generate UEFI capsules for a sample device -@REM -@REM Copyright (c) 2018, Intel Corporation. All rights reserved.
-@REM -@REM SPDX-License-Identifier: BSD-2-Clause-Patent -@REM - -@echo off -setlocal - -set COLOR=3D%1 - -set FMP_CAPSULE_VENDOR=3DIntel -set FMP_CAPSULE_GUID=3D%2 -set FMP_CAPSULE_BASE_NAME=3D%COLOR% -set FMP_CAPSULE_FILE=3D%FMP_CAPSULE_BASE_NAME%.cap -set FMP_CAPSULE_VERSION=3D0x00000010 -set FMP_CAPSULE_VERSION_DECIMAL=3D16 -set FMP_CAPSULE_STRING=3D0.0.0.16 -set FMP_CAPSULE_NAME=3D"%FMP_CAPSULE_BASE_NAME% Progress Bar %FMP_CAPSULE_= STRING%" -set FMP_CAPSULE_LSV=3D0x00000000 -set FMP_CAPSULE_KEY=3DSAMPLE_DEVELOPMENT.pfx -set FMP_CAPSULE_PAYLOAD=3DPayload.bin -set WINDOWS_CAPSULE_KEY=3DSAMPLE_DEVELOPMENT.pfx - -echo "%COLOR% Progress Bar" > %FMP_CAPSULE_PAYLOAD% - -if not exist "%FMP_CAPSULE_PAYLOAD%" exit - -if exist "%FMP_CAPSULE_KEY%" ( - REM - REM Sign capsule using signtool - REM - call GenerateCapsule ^ - --encode ^ - -v ^ - --guid %FMP_CAPSULE_GUID% ^ - --fw-version %FMP_CAPSULE_VERSION% ^ - --lsv %FMP_CAPSULE_LSV% ^ - --capflag PersistAcrossReset ^ - --capflag InitiateReset ^ - --signing-tool-path=3D"c:\Program Files (x86)\Windows Kits\8.1\bin\x86= " ^ - --pfx-file %FMP_CAPSULE_KEY% ^ - -o %FMP_CAPSULE_FILE% ^ - %FMP_CAPSULE_PAYLOAD% - - copy %FMP_CAPSULE_FILE% %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\Sam= pleDevelopment - - copy %FMP_CAPSULE_FILE% firmware.bin - copy template.metainfo.xml firmware.metainfo.xml - powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_GU= ID', '%FMP_CAPSULE_GUID%' | Out-File firmware.metainfo.xml -encoding ASCII" - powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_BA= SE_NAME', '%FMP_CAPSULE_BASE_NAME%' | Out-File firmware.metainfo.xml -encod= ing ASCII" - powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_VE= RSION_DECIMAL', '%FMP_CAPSULE_VERSION_DECIMAL%' | Out-File firmware.metainf= o.xml -encoding ASCII" - powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_ST= RING', '%FMP_CAPSULE_STRING%' | Out-File firmware.metainfo.xml -encoding AS= CII" - powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_DA= TE', '%date%' | Out-File firmware.metainfo.xml -encoding ASCII" - makecab /f Lvfs.ddf - copy firmware.cab %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\TestCert\= %FMP_CAPSULE_BASE_NAME%-%FMP_CAPSULE_STRING%.cab - - erase firmware.cab - erase setup.inf - erase setup.rpt - - erase firmware.metainfo.xml - erase firmware.bin - erase %FMP_CAPSULE_FILE% -) - -if exist "NewCert.pem" ( - REM - REM Sign capsule using OpenSSL with a new certificate - REM - call GenerateCapsule ^ - --encode ^ - -v ^ - --guid %FMP_CAPSULE_GUID% ^ - --fw-version %FMP_CAPSULE_VERSION% ^ - --lsv %FMP_CAPSULE_LSV% ^ - --capflag PersistAcrossReset ^ - --capflag InitiateReset ^ - --signer-private-cert=3DNewCert.pem ^ - --other-public-cert=3DNewSub.pub.pem ^ - --trusted-public-cert=3DNewRoot.pub.pem ^ - -o %FMP_CAPSULE_FILE% ^ - %FMP_CAPSULE_PAYLOAD% - - copy %FMP_CAPSULE_FILE% %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\New= Cert - - copy %FMP_CAPSULE_FILE% firmware.bin - copy template.metainfo.xml firmware.metainfo.xml - powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_GU= ID', '%FMP_CAPSULE_GUID%' | Out-File firmware.metainfo.xml -encoding ASCII" - powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_BA= SE_NAME', '%FMP_CAPSULE_BASE_NAME%' | Out-File firmware.metainfo.xml -encod= ing ASCII" - powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_VE= RSION_DECIMAL', '%FMP_CAPSULE_VERSION_DECIMAL%' | Out-File firmware.metainf= o.xml -encoding ASCII" - powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_ST= RING', '%FMP_CAPSULE_STRING%' | Out-File firmware.metainfo.xml -encoding AS= CII" - powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_DA= TE', '%date%' | Out-File firmware.metainfo.xml -encoding ASCII" - makecab /f Lvfs.ddf - copy firmware.cab %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\TestCert\= %FMP_CAPSULE_BASE_NAME%-%FMP_CAPSULE_STRING%.cab - - erase firmware.cab - erase setup.inf - erase setup.rpt - - erase firmware.metainfo.xml - erase firmware.bin - erase %FMP_CAPSULE_FILE% -) - -REM -REM Sign capsule using OpenSSL with EDK II Test Certificate -REM -call GenerateCapsule ^ - --encode ^ - -v ^ - --guid %FMP_CAPSULE_GUID% ^ - --fw-version %FMP_CAPSULE_VERSION% ^ - --lsv %FMP_CAPSULE_LSV% ^ - --capflag PersistAcrossReset ^ - --capflag InitiateReset ^ - --signer-private-cert=3D%WORKSPACE%\edk2\BaseTools\Source\Python\Pkcs7Si= gn\TestCert.pem ^ - --other-public-cert=3D%WORKSPACE%\edk2\BaseTools\Source\Python\Pkcs7Sign= \TestSub.pub.pem ^ - --trusted-public-cert=3D%WORKSPACE%\edk2\BaseTools\Source\Python\Pkcs7Si= gn\TestRoot.pub.pem ^ - -o %FMP_CAPSULE_FILE% ^ - %FMP_CAPSULE_PAYLOAD% - -copy %FMP_CAPSULE_FILE% %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\TestC= ert - -copy %FMP_CAPSULE_FILE% firmware.bin -copy template.metainfo.xml firmware.metainfo.xml -powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_GUID= ', '%FMP_CAPSULE_GUID%' | Out-File firmware.metainfo.xml -encoding ASCII" -powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_BASE= _NAME', '%FMP_CAPSULE_BASE_NAME%' | Out-File firmware.metainfo.xml -encodin= g ASCII" -powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_VERS= ION_DECIMAL', '%FMP_CAPSULE_VERSION_DECIMAL%' | Out-File firmware.metainfo.= xml -encoding ASCII" -powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_STRI= NG', '%FMP_CAPSULE_STRING%' | Out-File firmware.metainfo.xml -encoding ASCI= I" -powershell -Command "(gc firmware.metainfo.xml) -replace 'FMP_CAPSULE_DATE= ', '%date%' | Out-File firmware.metainfo.xml -encoding ASCII" -makecab /f Lvfs.ddf -copy firmware.cab %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\TestCert\%F= MP_CAPSULE_BASE_NAME%-%FMP_CAPSULE_STRING%.cab - -erase firmware.cab -erase setup.inf -erase setup.rpt - -erase firmware.metainfo.xml -erase firmware.bin -erase %FMP_CAPSULE_FILE% - -erase %FMP_CAPSULE_PAYLOAD% diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsu= le/template.metainfo.xml b/Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule= /GenerateCapsule/template.metainfo.xml deleted file mode 100644 index 5d550c1f48..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/temp= late.metainfo.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - com.intel.FMP_CAPSULE_BASE_NAME.firmware - FMP_CAPSULE_BASE_NAME - System firmware for the FMP_CAPSULE_BASE_NAME - - Description of System firmware for the FMP_CAPSULE_BASE_NAME - - - FMP_CAPSULE_GUID - - http://www.tianocore.org - CC0-1.0 - BSD - Tianocore - - - - Build FMP_CAPSULE_STRING - - - - - - - - diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformCapsuleIA32.dsc b/Pla= tform/Intel/Vlv2TbltDevicePkg/PlatformCapsuleIA32.dsc index bcac59f00a..246347b8fa 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformCapsuleIA32.dsc +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformCapsuleIA32.dsc @@ -17,7 +17,7 @@ [Defines] SUPPORTED_ARCHITECTURES =3D IA32|X64 BUILD_TARGETS =3D DEBUG|RELEASE SKUID_IDENTIFIER =3D DEFAULT - POSTBUILD =3D Vlv2TbltDevicePkg/Feature/Capsule/Gen= erateCapsule/GenCapsuleAll.sh + POSTBUILD =3D python Vlv2TbltDevicePkg/Feature/Caps= ule/GenerateCapsule/GenCapsuleAll.py =20 ##########################################################################= ######################### # diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformCapsuleX64.dsc b/Plat= form/Intel/Vlv2TbltDevicePkg/PlatformCapsuleX64.dsc index 11d50666c0..68bde30f83 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformCapsuleX64.dsc +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformCapsuleX64.dsc @@ -17,7 +17,7 @@ [Defines] SUPPORTED_ARCHITECTURES =3D IA32|X64 BUILD_TARGETS =3D DEBUG|RELEASE SKUID_IDENTIFIER =3D DEFAULT - POSTBUILD =3D Vlv2TbltDevicePkg/Feature/Capsule/Gen= erateCapsule/GenCapsuleAll.bat + POSTBUILD =3D python Vlv2TbltDevicePkg/Feature/Caps= ule/GenerateCapsule/GenCapsuleAll.py =20 ##########################################################################= ######################### # --=20 2.21.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#44008): https://edk2.groups.io/g/devel/message/44008 Mute This Topic: https://groups.io/mt/32523933/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-