I hacked up a prototype and it seems to work. It places a newline in the
Guid.xref between the FFS/INF names, and the other GUIDs.
Is there any interest to adding this, or turning on a option to generate this
kind of file? Seem like it would be useful.
I did not test performance, but it seems fast. I went for readable (to a C
programmer) code. You could probably also use
GuidDict.update(Module.Protocols) like syntax too?
Thanks,
Andrew Fish
>svn diff --diff-cmd diff Source/Python/GenFds/GenFds.py
Index: Source/Python/GenFds/GenFds.py
===================================================================
--- Source/Python/GenFds/GenFds.py (revision 15433)
+++ Source/Python/GenFds/GenFds.py (working copy)
@@ -36,6 +36,7 @@
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 @@
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)
------------------------------------------------------------------------------
_______________________________________________
edk2-buildtools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-buildtools-devel