diff options
author | Gao, Liming <liming.gao@intel.com> | 2014-07-01 07:10:10 +0000 |
---|---|---|
committer | lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> | 2014-07-01 07:10:10 +0000 |
commit | e4ac870fe95adc7d178a79b73ad2792e0c8bfeb8 (patch) | |
tree | 7dc08edb8004fdb21d2450a88c1e7957246e8029 /BaseTools/Source/Python/GenFds | |
parent | 148af3872273ef476230db1d0df5ea00167853a1 (diff) | |
download | edk2-platforms-e4ac870fe95adc7d178a79b73ad2792e0c8bfeb8.tar.xz |
Sync BaseTool trunk (version r2670) into EDKII BaseTools.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Gao, Liming <liming.gao@intel.com>
Reviewed-by: Liu, Yingke D (yingke.d.liu@intel.com)
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15605 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'BaseTools/Source/Python/GenFds')
-rw-r--r-- | BaseTools/Source/Python/GenFds/GenFds.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/BaseTools/Source/Python/GenFds/GenFds.py b/BaseTools/Source/Python/GenFds/GenFds.py index 058fa0c6a0..c0762edf22 100644 --- a/BaseTools/Source/Python/GenFds/GenFds.py +++ b/BaseTools/Source/Python/GenFds/GenFds.py @@ -36,6 +36,7 @@ from Common import EdkLogger from Common.String import *
from Common.Misc import DirCache,PathClass
from Common.Misc import SaveFileOnChange
+from Common.Misc import GuidStructureStringToGuidString
from Common.BuildVersion import gBUILD_VERSION
## Version and Copyright
@@ -511,11 +512,23 @@ class GenFds : def GenerateGuidXRefFile(BuildDb, ArchList):
GuidXRefFileName = os.path.join(GenFdsGlobalVariable.FvDir, "Guid.xref")
GuidXRefFile = StringIO.StringIO('')
+ GuidDict = {}
for Arch in ArchList:
PlatformDataBase = BuildDb.BuildObject[GenFdsGlobalVariable.ActivePlatform, Arch, GenFdsGlobalVariable.TargetName, GenFdsGlobalVariable.ToolChainTag]
for ModuleFile in PlatformDataBase.Modules:
Module = BuildDb.BuildObject[ModuleFile, Arch, GenFdsGlobalVariable.TargetName, GenFdsGlobalVariable.ToolChainTag]
GuidXRefFile.write("%s %s\n" % (Module.Guid, Module.BaseName))
+ for key, item in Module.Protocols.items():
+ GuidDict[key] = item
+ for key, item in Module.Guids.items():
+ GuidDict[key] = item
+ for key, item in Module.Ppis.items():
+ GuidDict[key] = item
+ # Append GUIDs, Protocols, and PPIs to the Xref file
+ GuidXRefFile.write("\n")
+ for key, item in GuidDict.items():
+ GuidXRefFile.write("%s %s\n" % (GuidStructureStringToGuidString(item).upper(), key))
+
if GuidXRefFile.getvalue():
SaveFileOnChange(GuidXRefFileName, GuidXRefFile.getvalue(), False)
GenFdsGlobalVariable.InfLogger("\nGUID cross reference file can be found at %s" % GuidXRefFileName)
|