Branch: refs/heads/master
  Home:   https://github.com/tianocore/edk2
  Commit: b279ac9f36e1b386c8c8a761657c6e6d0f1dfa1d
      
https://github.com/tianocore/edk2/commit/b279ac9f36e1b386c8c8a761657c6e6d0f1dfa1d
  Author: Phil Noh <phil....@amd.com>
  Date:   2025-03-22 (Sat, 22 Mar 2025)

  Changed paths:
    M BaseTools/Source/C/GenFv/GenFvInternalLib.c

  Log Message:
  -----------
  BaseTools/GenFv: Ensure the minimum pad file size for the FV with VTF

In case of the FV with VTF, the left size should be enough to add the
minimum pad file size (EFI_FFS_FILE_HEADER, 0x18). It prevents the build
error, "GenFv: ERROR 0006: invalid FFS file header checksum" caused by the
pad file overwriting some header data in VTF. This includes these updates
for CalculateFvSize() function.

1. If NumBlocks is not defined, ensure the minimum pad file size for the
left size (if the pad file is required as VTF is not bottom aligned at end
of block, insert EFI_FFS_FILE_HEADER to ensure the pad file size)
2. If NumBlocks is defined, report more clear error message (the required
fv image size = 0x%x. the set fv image size = 0x%x. Free space left is not
enough to add a pad file (0x18))
3. Remove MaxPadFileSize, which is reported when the taken size is same as
the total size. It can not be the actual left size to add an FFS file. It
causes confusion when referring to the build log (FV Space Information)

Signed-off-by: Phil Noh <phil....@amd.com>



To unsubscribe from these emails, change your notification settings at 
https://github.com/tianocore/edk2/settings/notifications


_______________________________________________
edk2-commits mailing list
edk2-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to