summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/build/BuildReport.py
diff options
context:
space:
mode:
authorYonghong Zhu <yonghong.zhu@intel.com>2018-03-03 01:09:03 +0800
committerLiming Gao <liming.gao@intel.com>2018-03-03 12:40:51 +0800
commitaebe5a36b6e960896671d3134c6b26f6735b7f53 (patch)
treeb3f8999d917292f89712f7cbe150c3f8946c1e31 /BaseTools/Source/Python/build/BuildReport.py
parent24326f381f84aca925a5df3eace96a7523ce1c27 (diff)
downloadedk2-aebe5a36b6e960896671d3134c6b26f6735b7f53.tar.gz
edk2-aebe5a36b6e960896671d3134c6b26f6735b7f53.tar.bz2
edk2-aebe5a36b6e960896671d3134c6b26f6735b7f53.zip
BaseTools: Fix the bug to search Fv.txt file relative to workspace
when the SECTION FV_IMAGE = $(XX)/XX.Fv, the Fv file should relative to WORKSPACE, so when we search the XX.Fv.txt file, we should search the path relative to workspace first. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/build/BuildReport.py')
-rw-r--r--BaseTools/Source/Python/build/BuildReport.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/BaseTools/Source/Python/build/BuildReport.py b/BaseTools/Source/Python/build/BuildReport.py
index f4d2c75343..89bdfa1d86 100644
--- a/BaseTools/Source/Python/build/BuildReport.py
+++ b/BaseTools/Source/Python/build/BuildReport.py
@@ -1677,6 +1677,7 @@ class FdRegionReport(object):
self.FvInfo = {}
self._GuidsDb = {}
self._FvDir = Wa.FvDir
+ self._WorkspaceDir = Wa.WorkspaceDir
#
# If the input FdRegion is not a firmware volume,
@@ -1780,13 +1781,15 @@ class FdRegionReport(object):
FvTotalSize = 0
FvTakenSize = 0
FvFreeSize = 0
- if not os.path.isfile(FvName):
- FvReportFileName = os.path.join(self._FvDir, FvName + ".Fv.txt")
+ if FvName.upper().endswith('.FV'):
+ FileExt = FvName + ".txt"
else:
- if FvName.upper().endswith('.FV'):
- FvReportFileName = FvName + ".txt"
- else:
- FvReportFileName = FvName + ".Fv.txt"
+ FileExt = FvName + ".Fv.txt"
+
+ if not os.path.isfile(FileExt):
+ FvReportFileName = mws.join(self._WorkspaceDir, FileExt)
+ if not os.path.isfile(FvReportFileName):
+ FvReportFileName = os.path.join(self._FvDir, FileExt)
try:
#
# Collect size info in the firmware volume.