]> git.proxmox.com Git - mirror_edk2.git/commit
BaseTools: Add FMMT Python Tool
authorChen, Christine <Yuwei.Chen@intel.com>
Thu, 28 Apr 2022 12:49:37 +0000 (20:49 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Fri, 6 May 2022 04:22:21 +0000 (04:22 +0000)
commita64b944942d828fe98e4843929662aad7f47bcca
treef712c0a1d049128788e81c6a0611891a16d98a2b
parent101f4c789221716585b972f2c2a22a85c078ef1d
BaseTools: Add FMMT Python Tool

The FMMT python tool is used for firmware files operation, which has
the Fv/FFs-based 'View'&'Add'&'Delete'&'Replace' operation function:

1.Parse a FD(Firmware Device) / FV(Firmware Volume) / FFS(Firmware Files)
2.Add a new FFS into a FV file (both included in a FD file or not)
3.Replace an FFS in a FV file with a new FFS file
4.Delete an FFS in a FV file (both included in a FD file or not)
5.Extract the FFS from a FV file (both included in a FD file or not)

This version of FMMT Python tool does not support PEIM rebase feature,
this feature will be added in future update.

Currently the FMMT C tool is saved in edk2-staging repo, but its
quality and coding style can't meet the Edk2 quality, which is hard to
maintain (Hard/Duplicate Code; Regression bugs; Restrict usage).

The new Python version keeps same functions with origin C version. It
has higher quality and better coding style, and it is much easier to
extend new functions and to maintain.

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1847
Link: https://edk2.groups.io/g/devel/message/82877
Link: https://github.com/tianocore/edk2-staging/tree/PyFMMT
Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Signed-off-by: Yuwei Chen <yuwei.chen@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
Acked-by: Liming Gao <gaoliming@byosoft.com.cn>
22 files changed:
BaseTools/BinWrappers/PosixLike/FMMT [new file with mode: 0755]
BaseTools/BinWrappers/WindowsLike/FMMT.bat [new file with mode: 0644]
BaseTools/Source/Python/FMMT/FMMT.py [new file with mode: 0644]
BaseTools/Source/Python/FMMT/FmmtConf.ini [new file with mode: 0644]
BaseTools/Source/Python/FMMT/Img/FirmwareVolumeFormat.png [new file with mode: 0644]
BaseTools/Source/Python/FMMT/Img/NodeTreeFormat.png [new file with mode: 0644]
BaseTools/Source/Python/FMMT/README.md [new file with mode: 0644]
BaseTools/Source/Python/FMMT/__init__.py [new file with mode: 0644]
BaseTools/Source/Python/FMMT/core/BinaryFactoryProduct.py [new file with mode: 0644]
BaseTools/Source/Python/FMMT/core/BiosTree.py [new file with mode: 0644]
BaseTools/Source/Python/FMMT/core/BiosTreeNode.py [new file with mode: 0644]
BaseTools/Source/Python/FMMT/core/FMMTOperation.py [new file with mode: 0644]
BaseTools/Source/Python/FMMT/core/FMMTParser.py [new file with mode: 0644]
BaseTools/Source/Python/FMMT/core/FvHandler.py [new file with mode: 0644]
BaseTools/Source/Python/FMMT/core/GuidTools.py [new file with mode: 0644]
BaseTools/Source/Python/FMMT/utils/FmmtLogger.py [new file with mode: 0644]
BaseTools/Source/Python/FMMT/utils/FvLayoutPrint.py [new file with mode: 0644]
BaseTools/Source/Python/FirmwareStorageFormat/Common.py [new file with mode: 0644]
BaseTools/Source/Python/FirmwareStorageFormat/FfsFileHeader.py [new file with mode: 0644]
BaseTools/Source/Python/FirmwareStorageFormat/FvHeader.py [new file with mode: 0644]
BaseTools/Source/Python/FirmwareStorageFormat/SectionHeader.py [new file with mode: 0644]
BaseTools/Source/Python/FirmwareStorageFormat/__init__.py [new file with mode: 0644]