Andrew:
  I agree this change.  Your patch is good to me. I think you can directly add 
this support. It has no impact for user.

   Reviewed-by: Gao, Liming <[email protected]>

Thanks
Liming
From: Andrew Fish [mailto:[email protected]]
Sent: Monday, April 07, 2014 7:16 AM
To: [email protected]
Cc: [email protected]
Subject: [edk2-buildtools] Any interest in adding all PPI/Protocol/GUID values 
to the build generated Guid.xref

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)

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
edk2-buildtools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-buildtools-devel

Reply via email to