diff options
author | Yonghong Zhu <yonghong.zhu@intel.com> | 2018-05-11 16:11:51 +0800 |
---|---|---|
committer | Yonghong Zhu <yonghong.zhu@intel.com> | 2018-05-22 19:37:11 +0800 |
commit | 75135cc6988e7e7e84b7f3652f570bb8742841e0 (patch) | |
tree | da1862fb22689b85d09547470be3ad64ead4bdec /BaseTools/Source/Python | |
parent | a253d217ee3477fde46cadba0dfe364f9a826694 (diff) | |
download | edk2-75135cc6988e7e7e84b7f3652f570bb8742841e0.tar.gz edk2-75135cc6988e7e7e84b7f3652f570bb8742841e0.tar.bz2 edk2-75135cc6988e7e7e84b7f3652f570bb8742841e0.zip |
BaseTools: Enhance error message when file is not exist for Gensec
When the file is not exist in workspace or packages path, current
Gensec tool doesn't report exactly error message.
FILE FV_IMAGE = 11111111-4CF1-42D8-A0C3-B3F60779dF4D {
SECTION GUIDED A7717414-C616-4977-9420-844712A735BF {
SECTION FV_IMAGE = TestPkg/Test.fd
}
}
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
Diffstat (limited to 'BaseTools/Source/Python')
-rw-r--r-- | BaseTools/Source/Python/GenFds/FvImageSection.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/BaseTools/Source/Python/GenFds/FvImageSection.py b/BaseTools/Source/Python/GenFds/FvImageSection.py index 57ecea0377..3a4d8fb91b 100644 --- a/BaseTools/Source/Python/GenFds/FvImageSection.py +++ b/BaseTools/Source/Python/GenFds/FvImageSection.py @@ -133,6 +133,12 @@ class FvImageSection(FvImageSectionClassObject): # FvAlignmentValue is less than 1K
self.Alignment = str (FvAlignmentValue)
FvFileObj.close()
+ else:
+ if len (mws.getPkgPath()) == 0:
+ EdkLogger.error("GenFds", FILE_NOT_FOUND, "%s is not found in WORKSPACE: %s" % self.FvFileName, GenFdsGlobalVariable.WorkSpaceDir)
+ else:
+ EdkLogger.error("GenFds", FILE_NOT_FOUND, "%s is not found in packages path:\n\t%s" % (self.FvFileName, '\n\t'.join(mws.getPkgPath())))
+
else:
EdkLogger.error("GenFds", GENFDS_ERROR, "FvImageSection Failed! %s NOT found in FDF" % self.FvName)
|