edk2/BaseTools/Source/Python
Phil Noh 1e7a83cbb6 BaseTools/FMMT: Fix errors when operating the FV with CRC32 section
Currently the FMMT tool supports CRC32 GUID section (Ref. GuidTools.py).
But it is found that there are errors for the FV with CRC32 section.
For example, the errors are checked on the following commands.

--v : Show FV information except for the FV
--a : Show "Target Fv not found!!!" when adding an FFS file to the FV
--d : Show "Target Ffs not found!!!" when deleting an FFS file in the FV

They are caused by the mismatch for CRC32 section data between the FMMT
and GenCrc32 tools. The FMMT tool returns CRC32 section data without CRC
checksum field (4 bytes). The GenCrc32 tool (with -d option, verify CRC32
value for the input file) requires CRC32 section data including CRC
checksum field (4 bytes).

Fix the issue through adjusting the section data to include CRC checksum
field. Currently DataOffset field for CRC32 GUID section is reported as
0x1C differently (GUID Section header length: 0x18 + Checksum field: 0x4).
Instead of DataOffset field that includes CRC checksum field, configure
the section data based on the offset from section header length (0x18)
that was previously calculated. This update enables GUID sections to use
the same offset consistently.

Signed-off-by: Phil Noh <Phil.Noh@amd.com>
2025-10-16 14:14:06 +00:00
..
AmlToC BaseTools: Resolve regex syntax warnings 2023-12-21 00:33:31 +00:00
AutoGen BaseTools: Remove ARM32 Support 2025-09-25 22:04:10 +00:00
BPDG BaseTools: Remove unused import 2025-07-01 09:51:38 +08:00
build BaseTools/build.py: set BUILD_TIME_EPOCH if not already in environment 2025-10-16 10:41:09 +00:00
Capsule BaseTools: Remove ARM32 Support 2025-09-25 22:04:10 +00:00
Common BaseTools: Remove ARM32 Support 2025-09-25 22:04:10 +00:00
CommonDataClass BaseTools: Add support for SUBTYPE_GUID section generation 2022-10-19 06:32:07 +00:00
Ecc BaseTools: Remove ARM32 Support 2025-09-25 22:04:10 +00:00
Eot BaseTools: Eot: Remove unnecessary code 2025-07-01 09:51:38 +08:00
FirmwareStorageFormat BaseTools: FMMT support ELF UPLD parser 2023-12-11 10:12:52 +00:00
FMMT BaseTools/FMMT: Fix errors when operating the FV with CRC32 section 2025-10-16 14:14:06 +00:00
GenFds BaseTools: Remove ARM32 Support 2025-09-25 22:04:10 +00:00
GenPatchPcdTable BaseTools: Resolve regex syntax warnings 2023-12-21 00:33:31 +00:00
PatchPcdValue BaseTools: Decouple AutoGen Objects 2019-08-09 23:15:52 +08:00
Pkcs7Sign BaseTools:Updata the output encoding of the Popen function 2019-08-01 15:36:48 +08:00
Rsa2048Sha256Sign BaseTools:Updata the output encoding of the Popen function 2019-08-01 15:36:48 +08:00
Split BaseTools: use shutil.copyfile instead shutil.copy2 2021-08-02 03:52:15 +00:00
Table BaseTools: Table: Remove unnecessary code 2025-07-01 09:51:38 +08:00
TargetTool BaseTools: Remove ARM32 Support 2025-09-25 22:04:10 +00:00
tests/Split BaseTools: fix the split output files root dir 2021-02-07 01:46:18 +00:00
Trim BaseTools: Trim: Add header/footer for ASL include 2024-08-31 04:58:54 +00:00
UPT BaseTools: Remove ARM32 Support 2025-09-25 22:04:10 +00:00
Workspace BaseTools: DSC: fix processing !include in multiarch subsections 2025-08-25 11:54:17 +00:00
basetool_tiano_python_path_env.yaml BaseTools: Add YAML files with path env and tool extdeps 2019-11-11 13:01:53 -08:00
GNUmakefile BaseTools: Replace BSD License with BSD+Patent License 2019-04-09 09:10:20 -07:00
Makefile BaseTools: strip trailing whitespace 2019-10-04 11:18:22 +01:00
sitecustomize.py BaseTools: Do not call sys.setdefaultencoding with python 3 2019-10-23 14:25:23 +08:00