]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools: Enhance FV info report file path to support absolute path
authorYonghong Zhu <yonghong.zhu@intel.com>
Wed, 28 Feb 2018 03:09:39 +0000 (11:09 +0800)
committerYonghong Zhu <yonghong.zhu@intel.com>
Thu, 1 Mar 2018 02:13:13 +0000 (10:13 +0800)
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>
BaseTools/Source/Python/build/BuildReport.py

index 58595d62b3ae21c137386e5612ddf98c2f43cda0..b2cc6eec0a41648f59353ab9c1914fa9ba8cc2b6 100644 (file)
@@ -1726,7 +1726,13 @@ class FdRegionReport(object):
             FvTotalSize = 0\r
             FvTakenSize = 0\r
             FvFreeSize  = 0\r
             FvTotalSize = 0\r
             FvTakenSize = 0\r
             FvFreeSize  = 0\r
-            FvReportFileName = os.path.join(self._FvDir, FvName + ".Fv.txt")\r
+            if not os.path.isfile(FvName):\r
+                FvReportFileName = os.path.join(self._FvDir, FvName + ".Fv.txt")\r
+            else:\r
+                if FvName.upper().endswith('.FV'):\r
+                    FvReportFileName = FvName + ".txt"\r
+                else:\r
+                    FvReportFileName = FvName + ".Fv.txt"\r
             try:\r
                 #\r
                 # Collect size info in the firmware volume.\r
             try:\r
                 #\r
                 # Collect size info in the firmware volume.\r