]> git.proxmox.com Git - mirror_edk2.git/commit - BaseTools/Scripts/BinToPcd.py
BaseTools/BinToPcd: Add support for multiple binary input files
authorKinney, Michael D <michael.d.kinney@intel.com>
Wed, 21 Feb 2018 02:07:06 +0000 (18:07 -0800)
committerKinney, Michael D <michael.d.kinney@intel.com>
Wed, 28 Mar 2018 15:51:15 +0000 (08:51 -0700)
commitaedd1559cca4bad41e9a93b51e6b2bbd66e66677
treebdd7aa930ac0cf88793aa06ae0e218fc6cccc714
parentc27c0003c10f0eba04a69dbadb5d4186ea79167e
BaseTools/BinToPcd: Add support for multiple binary input files

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

There are use cases where a VOID * PCD needs to be generated from multiple
binary input files.  This can be in the form of an array of fixed size
elements or a set of variable sized elements.

Update BinToPcd to support multiple one or more -i INPUTFILE arguments.
By default, the contents of each binary input file are concatenated in
the order provided.  This supports generating a PCD that is an array of
fixed size elements

Add -x, --xdr flags to BinToPcd  to encodes the PCD using the
Variable-Length Opaque Data of RFC 4506 External Data Representation
Standard (XDR).

    https://tools.ietf.org/html/rfc4506
    https://tools.ietf.org/html/rfc4506#section-4.10

The data format from RFC 4506 meets the requirements for a PCD that is a
set of variable sized elements in the Variable-Length Opaque Data format.
The overhead of this format is a 32-bit length and 0 to 3 bytes of padding
to align the next element at a 32-bit boundary.

Cc: Sean Brogan <sean.brogan@microsoft.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>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
BaseTools/Scripts/BinToPcd.py