public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Kinney, Michael D" <michael.d.kinney@intel.com>
To: edk2-devel@lists.01.org
Cc: Sean Brogan <sean.brogan@microsoft.com>,
	Jiewen Yao <jiewen.yao@intel.com>,
	Yonghong Zhu <yonghong.zhu@intel.com>,
	Liming Gao <liming.gao@intel.com>,
	Michael D Kinney <michael.d.kinney@intel.com>
Subject: [Patch v3 00/10] Add Capsule Generation Tools
Date: Tue, 31 Jul 2018 23:33:23 -0700	[thread overview]
Message-ID: <20180801063333.17824-1-michael.d.kinney@intel.com> (raw)

https://bugzilla.tianocore.org/show_bug.cgi?id=945

Based on content from the following branch

https://github.com/Microsoft/MS_UEFI/tree/share/beta/CapsuleTools

Command line unit tests for python modules available from following branch:

https://github.com/mdkinney/edk2/tree/Bug_945_StandAloneCapsuleTools_V2/BaseToolsUnitTest

Further development and testing of Capsule Generation Tools was performed at:
  https://github.com/tianocore/edk2-staging/tree/FmpDevicePkg-master
  https://github.com/tianocore/edk2-staging/tree/FmpDevicePkg-UDK2018

Summary of changes since original version
* Convert C tools to Python
* Add common python modules to:
    BaseTools/Source/Python/Common/Uefi/Capsule
    BaseTools/Source/Python/Common/Edk2/Capsule
* Add GenerateCapsule.py to BaseTools/Source/Python/Capsule
* Add Windows and Posix wrappers for GenerateCapsule.py
* Add max value checks to Capsule Generation tools
  https://bugzilla.tianocore.org/show_bug.cgi?id=1021
  https://bugzilla.tianocore.org/show_bug.cgi?id=1022
  https://bugzilla.tianocore.org/show_bug.cgi?id=1026
* Remove support for PopulateSystemTable
  https://bugzilla.tianocore.org/show_bug.cgi?id=1030
* Fix CertType GUID byte order
  https://bugzilla.tianocore.org/show_bug.cgi?id=1024
* Do not support -o with --dump-info
  https://bugzilla.tianocore.org/show_bug.cgi?id=1025
* Update help for --fw-version and --lsv
  https://bugzilla.tianocore.org/show_bug.cgi?id=1029
* Update file header with tool limitations
  https://bugzilla.tianocore.org/show_bug.cgi?id=1031
* Prevent traceback during signing operations
  https://bugzilla.tianocore.org/show_bug.cgi?id=1046
  https://bugzilla.tianocore.org/show_bug.cgi?id=1048
  https://bugzilla.tianocore.org/show_bug.cgi?id=1050  
* Support capsules without a payload header
  https://bugzilla.tianocore.org/show_bug.cgi?id=1028

usage: GenerateCapsule [-h] [-o OUTPUTFILE] (-e | -d | --dump-info)
                       [--capflag {PersistAcrossReset,InitiateReset}]
                       [--capoemflag CAPSULEOEMFLAG] [--guid GUID]
                       [--hardware-instance HARDWAREINSTANCE]
                       [--monotonic-count MONOTONICCOUNT]
                       [--fw-version FWVERSION] [--lsv LOWESTSUPPORTEDVERSION]
                       [--pfx-file SIGNTOOLPFXFILE]
                       [--signer-private-cert OPENSSLSIGNERPRIVATECERTFILE]
                       [--other-public-cert OPENSSLOTHERPUBLICCERTFILE]
                       [--trusted-public-cert OPENSSLTRUSTEDPUBLICCERTFILE]
                       [--signing-tool-path SIGNINGTOOLPATH] [--version] [-v]
                       [-q] [--debug [0-9]]
                       InputFile

Generate a capsule. Copyright (c) 2018, Intel Corporation. All rights
reserved.

positional arguments:
  InputFile             Input binary payload filename.

optional arguments:
  -h, --help            show this help message and exit
  -o OUTPUTFILE, --output OUTPUTFILE
                        Output filename.
  -e, --encode          Encode file
  -d, --decode          Decode file
  --dump-info           Display FMP Payload Header information
  --capflag {PersistAcrossReset,InitiateReset}
                        Capsule flag can be PersistAcrossReset or
                        InitiateReset or not set
  --capoemflag CAPSULEOEMFLAG
                        Capsule OEM Flag is an integer between 0x0000 and
                        0xffff.
  --guid GUID           The FMP/ESRT GUID in registry format. Required for
                        encode operations.
  --hardware-instance HARDWAREINSTANCE
                        The 64-bit hardware instance. The default is
                        0x0000000000000000
  --monotonic-count MONOTONICCOUNT
                        64-bit monotonic count value in header. Default is
                        0x0000000000000000.
  --fw-version FWVERSION
                        The 32-bit version of the binary payload (e.g.
                        0x11223344 or 5678). Required for encode operations
                        that sign a payload.
  --lsv LOWESTSUPPORTEDVERSION
                        The 32-bit lowest supported version of the binary
                        payload (e.g. 0x11223344 or 5678). Required for encode
                        operations that sign a payload.
  --pfx-file SIGNTOOLPFXFILE
                        signtool PFX certificate filename.
  --signer-private-cert OPENSSLSIGNERPRIVATECERTFILE
                        OpenSSL signer private certificate filename.
  --other-public-cert OPENSSLOTHERPUBLICCERTFILE
                        OpenSSL other public certificate filename.
  --trusted-public-cert OPENSSLTRUSTEDPUBLICCERTFILE
                        OpenSSL trusted public certificate filename.
  --signing-tool-path SIGNINGTOOLPATH
                        Path to signtool or OpenSSL tool. Optional if path to
                        tools are already in PATH.
  --version             show program's version number and exit
  -v, --verbose         Turn on verbose output with informational messages
                        printed, including capsule headers and warning
                        messages.
  -q, --quiet           Disable all messages except fatal errors.
  --debug [0-9]         Set debug level

Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>

Kinney, Michael D (9):
  BaseTools/Capsule: Add Capsule Generation Tools
  BaseTools/Capsule: Add max value checks to Capsule Generation tools
  BaseTools/Capsule: Remove support for PopulateSystemTable
  BaseTools/Capsule: Fix CertType GUID byte order
  BaseTools/Capsule: Do not support -o with --dump-info
  BaseTools/Capsule: Update help for --fw-version and --lsv
  BaseTools/Capsule: Update file header with tool limitations
  BaseTools/Capsule: Prevent traceback during signing operations
  BaseTools/Capsule: Support capsules without a payload header

Star Zeng (1):
  BaseTools GenerateCapsule: Change property to executable for Linux

 BaseTools/BinWrappers/PosixLike/GenerateCapsule    |  14 +
 .../BinWrappers/WindowsLike/GenerateCapsule.bat    |   1 +
 BaseTools/Source/Python/Capsule/GenerateCapsule.py | 555 +++++++++++++++++++++
 .../Python/Common/Edk2/Capsule/FmpPayloadHeader.py |  91 ++++
 .../Source/Python/Common/Edk2/Capsule/__init__.py  |  15 +
 BaseTools/Source/Python/Common/Edk2/__init__.py    |  15 +
 .../Python/Common/Uefi/Capsule/FmpAuthHeader.py    | 184 +++++++
 .../Python/Common/Uefi/Capsule/FmpCapsuleHeader.py | 302 +++++++++++
 .../Common/Uefi/Capsule/UefiCapsuleHeader.py       | 136 +++++
 .../Source/Python/Common/Uefi/Capsule/__init__.py  |  15 +
 BaseTools/Source/Python/Common/Uefi/__init__.py    |  15 +
 11 files changed, 1343 insertions(+)
 create mode 100755 BaseTools/BinWrappers/PosixLike/GenerateCapsule
 create mode 100644 BaseTools/BinWrappers/WindowsLike/GenerateCapsule.bat
 create mode 100644 BaseTools/Source/Python/Capsule/GenerateCapsule.py
 create mode 100644 BaseTools/Source/Python/Common/Edk2/Capsule/FmpPayloadHeader.py
 create mode 100644 BaseTools/Source/Python/Common/Edk2/Capsule/__init__.py
 create mode 100644 BaseTools/Source/Python/Common/Edk2/__init__.py
 create mode 100644 BaseTools/Source/Python/Common/Uefi/Capsule/FmpAuthHeader.py
 create mode 100644 BaseTools/Source/Python/Common/Uefi/Capsule/FmpCapsuleHeader.py
 create mode 100644 BaseTools/Source/Python/Common/Uefi/Capsule/UefiCapsuleHeader.py
 create mode 100644 BaseTools/Source/Python/Common/Uefi/Capsule/__init__.py
 create mode 100644 BaseTools/Source/Python/Common/Uefi/__init__.py

-- 
2.14.2.windows.3



             reply	other threads:[~2018-08-01  6:33 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-01  6:33 Kinney, Michael D [this message]
2018-08-01  6:33 ` [Patch v3 01/10] BaseTools/Capsule: Add Capsule Generation Tools Kinney, Michael D
2018-08-01  6:33 ` [Patch v3 02/10] BaseTools GenerateCapsule: Change property to executable for Linux Kinney, Michael D
2018-08-01  6:33 ` [Patch v3 03/10] BaseTools/Capsule: Add max value checks to Capsule Generation tools Kinney, Michael D
2018-08-01  6:33 ` [Patch v3 04/10] BaseTools/Capsule: Remove support for PopulateSystemTable Kinney, Michael D
2018-08-01  6:33 ` [Patch v3 05/10] BaseTools/Capsule: Fix CertType GUID byte order Kinney, Michael D
2018-08-01  6:33 ` [Patch v3 06/10] BaseTools/Capsule: Do not support -o with --dump-info Kinney, Michael D
2018-08-01  6:33 ` [Patch v3 07/10] BaseTools/Capsule: Update help for --fw-version and --lsv Kinney, Michael D
2018-08-01  6:33 ` [Patch v3 08/10] BaseTools/Capsule: Update file header with tool limitations Kinney, Michael D
2018-08-01  6:33 ` [Patch v3 09/10] BaseTools/Capsule: Prevent traceback during signing operations Kinney, Michael D
2018-08-01  6:33 ` [Patch v3 10/10] BaseTools/Capsule: Support capsules without a payload header Kinney, Michael D

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180801063333.17824-1-michael.d.kinney@intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox