summaryrefslogtreecommitdiff
path: root/BaseTools/Source/Python/Workspace
diff options
context:
space:
mode:
authorFeng, Bob C <bob.c.feng@intel.com>2014-08-26 02:52:24 +0000
committerbobfeng <bobfeng@6f19259b-4bc3-4df7-8a09-765794883524>2014-08-26 02:52:24 +0000
commita0a2cd1ea6933bdd54165b8e9a403e7e7f492822 (patch)
treee9a59e29817d1973773814b865771a33ae6db301 /BaseTools/Source/Python/Workspace
parentfad213a3db737a5601869d155abe499a7df66715 (diff)
downloadedk2-platforms-a0a2cd1ea6933bdd54165b8e9a403e7e7f492822.tar.xz
This patch is going to correct the external PCD database generation rule to support the case that all binary driver are only listed in FDF file.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng, Bob C <bob.c.feng@intel.com> Reviewed-by: Yingke Liu <yingke.d.liu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15893 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'BaseTools/Source/Python/Workspace')
-rw-r--r--BaseTools/Source/Python/Workspace/BuildClassObject.py2
-rw-r--r--BaseTools/Source/Python/Workspace/WorkspaceDatabase.py17
2 files changed, 18 insertions, 1 deletions
diff --git a/BaseTools/Source/Python/Workspace/BuildClassObject.py b/BaseTools/Source/Python/Workspace/BuildClassObject.py
index a95e3f39ab..8b98f164fd 100644
--- a/BaseTools/Source/Python/Workspace/BuildClassObject.py
+++ b/BaseTools/Source/Python/Workspace/BuildClassObject.py
@@ -57,6 +57,8 @@ class PcdClassObject(object):
self.Phase = "DXE"
self.Pending = False
self.IsOverrided = IsOverrided
+ self.IsFromBinaryInf = False
+ self.IsFromDsc = False
## Convert the class to a string
#
diff --git a/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py b/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py
index b4109155a6..8252a3180d 100644
--- a/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py
+++ b/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py
@@ -2008,7 +2008,7 @@ class InfBuildData(ModuleBuildClassObject):
return self._Defs
## Retrieve binary files
- def _GetBinaryFiles(self):
+ def _GetBinaries(self):
if self._Binaries == None:
self._Binaries = []
RecordList = self._RawData[MODEL_EFI_BINARY_FILE, self._Arch, self._Platform]
@@ -2035,6 +2035,20 @@ class InfBuildData(ModuleBuildClassObject):
self._Binaries.append(File)
return self._Binaries
+ ## Retrieve binary files with error check.
+ def _GetBinaryFiles(self):
+ Binaries = self._GetBinaries()
+ if GlobalData.gIgnoreSource and Binaries == []:
+ ErrorInfo = "The INF file does not contain any Binaries to use in creating the image\n"
+ EdkLogger.error('build', RESOURCE_NOT_AVAILABLE, ExtraData=ErrorInfo, File=self.MetaFile)
+
+ return Binaries
+ ## Check whether it exists the binaries with current ARCH in AsBuild INF
+ def _IsSupportedArch(self):
+ if self._GetBinaries() and not self._GetSourceFiles():
+ return True
+ else:
+ return False
## Retrieve source files
def _GetSourceFiles(self):
if self._Sources == None:
@@ -2537,6 +2551,7 @@ class InfBuildData(ModuleBuildClassObject):
Depex = property(_GetDepex)
DepexExpression = property(_GetDepexExpression)
IsBinaryModule = property(_IsBinaryModule)
+ IsSupportedArch = property(_IsSupportedArch)
## Database
#