summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYunhua Feng <yunhuax.feng@intel.com>2018-07-31 09:44:41 +0800
committerYonghong Zhu <yonghong.zhu@intel.com>2018-08-03 10:28:18 +0800
commit1d802e234e813a6726f4c6fd161ae9bd146bc552 (patch)
treef1002b5699aa14819c19630297707736167ec461
parent83964ebc5e74549d6efc7134af19150a0b2079aa (diff)
downloadedk2-1d802e234e813a6726f4c6fd161ae9bd146bc552.tar.gz
edk2-1d802e234e813a6726f4c6fd161ae9bd146bc552.tar.bz2
edk2-1d802e234e813a6726f4c6fd161ae9bd146bc552.zip
BaseTools: Guid.xref doesn't specify the correct GUID value for Driver
In DSC, we can define the driver with the different FILE GUID. So this driver name and its FILE GUID should also be listed in Build output Guid.xref. But now, Guid.xref still lists the driver MODULE_GUID. The case in Platform.dsc: MdeModulePkg/Universal/DriverSampleDxe/DriverSampleDxe.inf { <Defines> FILE_GUID = 3A4A354F-6935-40fa-B19C-500EEEBF0BC2 <LibraryClasses> PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf } Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yunhua Feng <yunhuax.feng@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
-rw-r--r--BaseTools/Source/Python/GenFds/GenFds.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/BaseTools/Source/Python/GenFds/GenFds.py b/BaseTools/Source/Python/GenFds/GenFds.py
index a7c1e6c853..156aae1d0e 100644
--- a/BaseTools/Source/Python/GenFds/GenFds.py
+++ b/BaseTools/Source/Python/GenFds/GenFds.py
@@ -605,6 +605,11 @@ class GenFds :
GuidDict = {}
ModuleList = []
FileGuidList = []
+ GuidPattern = re.compile("\s*([0-9a-fA-F]){8}-"
+ "([0-9a-fA-F]){4}-"
+ "([0-9a-fA-F]){4}-"
+ "([0-9a-fA-F]){4}-"
+ "([0-9a-fA-F]){12}\s*")
for Arch in ArchList:
PlatformDataBase = BuildDb.BuildObject[GenFdsGlobalVariable.ActivePlatform, Arch, GenFdsGlobalVariable.TargetName, GenFdsGlobalVariable.ToolChainTag]
for ModuleFile in PlatformDataBase.Modules:
@@ -613,7 +618,11 @@ class GenFds :
continue
else:
ModuleList.append(Module)
- GuidXRefFile.write("%s %s\n" % (Module.Guid, Module.BaseName))
+ GuidMatch = GuidPattern.match(ModuleFile.BaseName)
+ if GuidMatch is not None:
+ GuidXRefFile.write("%s %s\n" % (ModuleFile.BaseName, Module.BaseName))
+ else:
+ 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():