[PATCH] [edk2-staging] BaseTools/FMMT: Change Fv Header to FileSystemGuid3.

Bob Feng

From: Yuwei Chen <yuwei.chen@intel.com>

From: Yuwei Chen <yuwei.chen@intel.com>

Following PI spec: when there has Ffs with EFI_FFS_FILE_HEADER2,
the Parent Fv of the Ffs need set to FileSystemGuid3; when all
the Ffs with EFI_FFS_FILE_HEADER, the Parent Fv of the Ffs need
set to FileSystemGuid2.
Currently, when changing the Ffs in Fv from EFI_FFS_FILE_HEADER
to EFI_FFS_FILE_HEADER2, the Fv FileSystemGuid does not changed
consistent with Ffs type.That caused build issue.

As FileSystemGuid3 is compatible with FileSystemGuid2, change all
the Fv header to FileSystemGuid3. This patch modify the FMMT Add/
Replace function, when adding/replacing a new Ffs, set the Parent
Fv header to FileSystemGuid3 directly, do not double check size.

Signed-off-by: Yuwei Chen <yuwei.chen@intel.com>
Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
BaseTools/Source/C/FMMT/FmmtLib.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/BaseTools/Source/C/FMMT/FmmtLib.c b/BaseTools/Source/C/FMMT/Fm=
index 4f6056edba..e1436112ca 100644
--- a/BaseTools/Source/C/FMMT/FmmtLib.c
+++ b/BaseTools/Source/C/FMMT/FmmtLib.c
@@ -3198,11 +3198,7 @@ LibEncapsulateFfsToFv (
CHAR8* SystemCommandFormatString;=0D
CHAR8* SystemCommand;=0D
- CHAR8* FfsGuid =3D "8c8ce578-8a3d-4f1c-9935-896185c32dd3=
- if (IsLargeFile =3D=3D TRUE) {=0D
- FfsGuid =3D "5473c07a-3dcb-4dca-bd6f-1e9689e7349a";=0D
- }=0D
+ CHAR8* FfsGuid =3D "5473c07a-3dcb-4dca-bd6f-1e9689e7349a=
SystemCommandFormatString =3D NULL;=0D
SystemCommand =3D NULL;=0D
GitPatchExtractor 1.1

Join devel@edk2.groups.io to automatically receive all group messages.