diff options
author | Aaron Pop <aaronpop@microsoft.com> | 2025-07-01 11:36:18 -0700 |
---|---|---|
committer | Liming Gao <gaoliming@byosoft.com.cn> | 2025-07-08 10:06:36 +0800 |
commit | 0277d5d8f100f2490a08f3a7e38f08328283e4fe (patch) | |
tree | 50453aca9f85b754ae0c681be88b9f16b448b8f8 /BaseTools/Source/Python | |
parent | ef1d2fb8d61a1a4930d6da0b897a6d10c513629d (diff) | |
download | edk2-0277d5d8f100f2490a08f3a7e38f08328283e4fe.zip edk2-0277d5d8f100f2490a08f3a7e38f08328283e4fe.tar.gz edk2-0277d5d8f100f2490a08f3a7e38f08328283e4fe.tar.bz2 |
BaseTools: Improve report generation for Nested Fvs.
Build report would not detect a nested FV if the nested
FV was not in a subsection of an FFS statement.
Modify the build report to better handle some of the
variations of nested FVs.
Failing Example:
[Fv.FvName1]
INF <path to some driver>.inf
[Fv.FvName0]
FILE FV_IMAGE = B25ACDEF-39CE-4FA5-B50A-33E24DB1BDDF {
SECTION FV_IMAGE = FvName1
}
Working Example:
[Fv.FvName1]
INF <path to some driver>.inf
[Fv.FvName0]
FILE FV_IMAGE = DA04F6BF-A0FD-47EC-928B-5101A6C95026 {
SECTION GUIDED EE4E5898-3914-4259-9D6E-DC7BD79403CF
PROCESSING_REQUIRED = TRUE {
SECTION FV_IMAGE = FvName1
}
}
Signed-off-by: Aaron Pop <aaronpop@microsoft.com>
Diffstat (limited to 'BaseTools/Source/Python')
-rw-r--r-- | BaseTools/Source/Python/build/BuildReport.py | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/BaseTools/Source/Python/build/BuildReport.py b/BaseTools/Source/Python/build/BuildReport.py index 2eeaf4f..2d31be4 100644 --- a/BaseTools/Source/Python/build/BuildReport.py +++ b/BaseTools/Source/Python/build/BuildReport.py @@ -1814,13 +1814,21 @@ class FdRegionReport(object): for Ffs in Wa.FdfProfile.FvDict[FvName.upper()].FfsList:
for Section in Ffs.SectionList:
try:
- for FvSection in Section.SectionList:
- if FvSection.FvName in self.FvList:
- continue
- self._GuidsDb[Ffs.NameGuid.upper()] = FvSection.FvName
- self.FvList.append(FvSection.FvName)
- self.FvInfo[FvSection.FvName] = ("Nested FV", 0, 0)
- self._DiscoverNestedFvList(FvSection.FvName, Wa)
+ # Handle the case where an entire FFS is a FV, and not
+ # a sub-section of the FFS.
+ if getattr(Section, 'FvFileName', None) is None:
+ for FvSection in Section.SectionList:
+ if FvSection.FvName in self.FvList:
+ continue
+ self._GuidsDb[Ffs.NameGuid.upper()] = FvSection.FvName
+ self.FvList.append(FvSection.FvName)
+ self.FvInfo[FvSection.FvName] = ("Nested FV", 0, 0)
+ self._DiscoverNestedFvList(FvSection.FvName, Wa)
+ else:
+ self._GuidsDb[Ffs.NameGuid.upper()] = Section.FvFileName
+ self.FvList.append(Section.FvName)
+ self.FvInfo[Section.FvName] = ("Nested FV", 0, 0)
+ self._DiscoverNestedFvList(Section.FvName, Wa)
except AttributeError:
pass
|