]> git.proxmox.com Git - mirror_edk2.git/commit
BaseTools/Capsule: Add capsule dependency support
authorLi, Aaron <aaron.li@intel.com>
Fri, 10 Jan 2020 01:57:35 +0000 (09:57 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Wed, 15 Jan 2020 03:16:46 +0000 (03:16 +0000)
commitf6f66e0c301bb2b75774060ba0a76246fbe8d924
tree4d97039e15a9afd03004f58c60d0e558c13314da
parent94057f740267eb39cc9b3975f3971dd6d1d68182
BaseTools/Capsule: Add capsule dependency support

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

Capsule generate tool support encode capsule dependencies through '-j'
command with a JSON file. To enable dependency feature, "Dependencies"
field for each payload in JSON file is required.
The value of "Dependencies" field is C style infix notation expression.
For example:
  "Dependencies":"72E2945A-00DA-448E-9AA7-075AD840F9D4 > 0x00000001"

The relation of Dependency Expression Opcode in UEFI2.8 chap 23.2 and
infix notation expression value is as follows:
+-----------------------------+--------------------------+
| OPCODE                      | INFIX EXPRESSION VALUE   |
+-----------------------------+--------------------------+
| 0x00 (PUSH_GUID)            | {GUID}                   |
| 0x01 (PUSH_VERSION)         | {UINT32}                 |
| 0x02 (DECLEAR_VERSION_NAME} | DECLEAR "{VERSION_NAME}" |
| 0x03 (AND)                  | &&                       |
| 0x04 (OR)                   | ||                       |
| 0x05 (NOT)                  | ~                        |
| 0x06 (TRUE)                 | TRUE                     |
| 0x07 (FALSE)                | FALSE                    |
| 0x08 (EQ)                   | ==                       |
| 0x09 (GT)                   | >                        |
| 0x0A (GTE)                  | >=                       |
| 0x0B (LT)                   | <                        |
| 0x0C (LTE)                  | <=                       |
+-----------------------------+--------------------------+

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Aaron Li <aaron.li@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
BaseTools/Source/Python/Capsule/GenerateCapsule.py
BaseTools/Source/Python/Common/Uefi/Capsule/CapsuleDependency.py [new file with mode: 0644]