diff options
author | Yonghong Zhu <yonghong.zhu@intel.com> | 2018-02-28 11:09:39 +0800 |
---|---|---|
committer | Yonghong Zhu <yonghong.zhu@intel.com> | 2018-03-01 10:13:13 +0800 |
commit | 2157bc9c8b8be30ada11fe2e64454157d3ae528f (patch) | |
tree | c13d99a557d4b427dd17d891b40faaa2cb93bcb8 | |
parent | 90f7f19ae7929af5662497af3318ed5c8bd96351 (diff) | |
download | edk2-2157bc9c8b8be30ada11fe2e64454157d3ae528f.tar.gz edk2-2157bc9c8b8be30ada11fe2e64454157d3ae528f.tar.bz2 edk2-2157bc9c8b8be30ada11fe2e64454157d3ae528f.zip |
BaseTools: Enhance FV info report file path to support absolute path
When generate build report, Tool will get the info like size, Fv Name,
etc from the xx.Fv.txt file and add these info into the build report.
This patch support the xx.Fv.txt to use absolute file path format since
user may provide specified FV path.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
-rw-r--r-- | BaseTools/Source/Python/build/BuildReport.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/BaseTools/Source/Python/build/BuildReport.py b/BaseTools/Source/Python/build/BuildReport.py index 58595d62b3..b2cc6eec0a 100644 --- a/BaseTools/Source/Python/build/BuildReport.py +++ b/BaseTools/Source/Python/build/BuildReport.py @@ -1726,7 +1726,13 @@ class FdRegionReport(object): FvTotalSize = 0
FvTakenSize = 0
FvFreeSize = 0
- FvReportFileName = os.path.join(self._FvDir, FvName + ".Fv.txt")
+ if not os.path.isfile(FvName):
+ FvReportFileName = os.path.join(self._FvDir, FvName + ".Fv.txt")
+ else:
+ if FvName.upper().endswith('.FV'):
+ FvReportFileName = FvName + ".txt"
+ else:
+ FvReportFileName = FvName + ".Fv.txt"
try:
#
# Collect size info in the firmware volume.
|