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>
self.FvInfo = {}\r
self._GuidsDb = {}\r
self._FvDir = Wa.FvDir\r
self.FvInfo = {}\r
self._GuidsDb = {}\r
self._FvDir = Wa.FvDir\r
+ self._WorkspaceDir = Wa.WorkspaceDir\r
\r
#\r
# If the input FdRegion is not a firmware volume,\r
\r
#\r
# If the input FdRegion is not a firmware volume,\r
FvTotalSize = 0\r
FvTakenSize = 0\r
FvFreeSize = 0\r
FvTotalSize = 0\r
FvTakenSize = 0\r
FvFreeSize = 0\r
- if not os.path.isfile(FvName):\r
- FvReportFileName = os.path.join(self._FvDir, FvName + ".Fv.txt")\r
+ if FvName.upper().endswith('.FV'):\r
+ FileExt = FvName + ".txt"\r
- if FvName.upper().endswith('.FV'):\r
- FvReportFileName = FvName + ".txt"\r
- else:\r
- FvReportFileName = FvName + ".Fv.txt"\r
+ FileExt = FvName + ".Fv.txt"\r
+\r
+ if not os.path.isfile(FileExt):\r
+ FvReportFileName = mws.join(self._WorkspaceDir, FileExt)\r
+ if not os.path.isfile(FvReportFileName):\r
+ FvReportFileName = os.path.join(self._FvDir, FileExt)\r
try:\r
#\r
# Collect size info in the firmware volume.\r
try:\r
#\r
# Collect size info in the firmware volume.\r