Dear Basetools maintainer,
We have an FDF file where we're creating an encapsulated FV where the FV
contents come from the filesystem instead of from a named FDF section. The FD
processing works fine in this case but the build report generator tool crashes.
Here's an example of how we generate the FV_IMAGE section:
[FV.MY_SIGNED_FV]
(fv attributes removed)
# encapsulated RSA signed FV image
FILE FV_IMAGE = AD1AEEC6-FEF9-4A5C-B5F1-621DE0E72E5D {
SECTION GUIDED A7717414-C616-4977-9420-844712A735BF AUTH_STATUS_VALID =
TRUE {
SECTION FV_IMAGE = $(BUILD_DIR)/MY_FV.FV
}
}
Note that the SECTION FV_IMAGE is assigned by a filesystem path and not a "UI
Name".
I verified that the FDF syntax we're using is correct per the FDF specification
which states that FV image section data can be provided either by a UI name or
a filesystem path. (There are actually two paths in the FDF spec for this: one
is LeafSections -> FvImgSection which requires a UI name but the other path is
LeafSections -> DataSection -> KnownSection -> SecData which allows a
filesystem path). I'm no expert in BNF syntax so please correct me if I read
the FDF spec wrong.
The path in BuildReport.py that is crashing is in the FdRegioReport method
which is looping through the nested FVs trying to look them up by name in
FvDict:
def _DiscoverNestedFvList(self, FvName, Wa):
for Ffs in Wa.FdfProfile.FvDict[FvName.upper()].FfsList:
for Section in Ffs.SectionList:
try:
It looks like this assumes that all FVs are defined using UI names and not
filesystem paths because when we use the filesystem syntax we crash due to a
key error:
File "BuildReport.py", line 1565, in GenerateReport
File "BuildReport.py", line 1448, in __init__
File "BuildReport.py", line 1389, in __init__
File "BuildReport.py", line 1227, in __init__
File "BuildReport.py", line 1187, in _DiscoverNestedFvList
File "BuildReport.py", line 1178, in _DiscoverNestedFvList
KeyError: 'BUILD/MYPLATFORM/DEBUG_GCC49/MY_FV.FV'
Any recommendations on how to fix the FV UI name assumption in this tool? It
could be as simple as tolerating the missing key in the dictionary or more
complicated like keeping track of whether the FV is a UI name or filesystem
path with additional metadata.
Thanks,
Eugene
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel