* [PATCH] BaseTools/Genfds: Fix Guid.xref missing GUIDs defined in Library.
@ 2016-10-27 3:18 Derek Lin
0 siblings, 0 replies; only message in thread
From: Derek Lin @ 2016-10-27 3:18 UTC (permalink / raw)
To: edk2-devel; +Cc: yonghong.zhu, liming.gao, afish, Derek Lin
The original Guid.xref lost some Guid which only defined in Library. When the library is used by a driver, its Guids were not listed in Guid.xref. Now they will.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Derek Lin <derek.lin2@hpe.com>
---
BaseTools/Source/Python/GenFds/GenFds.py | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/BaseTools/Source/Python/GenFds/GenFds.py b/BaseTools/Source/Python/GenFds/GenFds.py
index c2e9418..9c2f0ad 100644
--- a/BaseTools/Source/Python/GenFds/GenFds.py
+++ b/BaseTools/Source/Python/GenFds/GenFds.py
@@ -2,6 +2,7 @@
# generate flash image
#
# Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR>
+# (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
#
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
@@ -698,18 +699,22 @@ class GenFds :
def GenerateGuidXRefFile(BuildDb, ArchList):
GuidXRefFileName = os.path.join(GenFdsGlobalVariable.FvDir, "Guid.xref")
GuidXRefFile = StringIO.StringIO('')
+ ModuleGuidDict = {}
GuidDict = {}
for Arch in ArchList:
PlatformDataBase = BuildDb.BuildObject[GenFdsGlobalVariable.ActivePlatform, Arch, GenFdsGlobalVariable.TargetName, GenFdsGlobalVariable.ToolChainTag]
- for ModuleFile in PlatformDataBase.Modules:
+ for ModuleFile in [x for x in PlatformDataBase.Modules] + [x for x in PlatformDataBase.LibraryInstances]:
Module = BuildDb.BuildObject[ModuleFile, Arch, GenFdsGlobalVariable.TargetName, GenFdsGlobalVariable.ToolChainTag]
- GuidXRefFile.write("%s %s\n" % (Module.Guid, Module.BaseName))
+ ModuleGuidDict[Module.BaseName] = Module.Guid
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 Module/Lib Guid to the Xref file
+ for key, item in ModuleGuidDict.items():
+ GuidXRefFile.write("%s %s\n" % (item.upper(), key))
# Append GUIDs, Protocols, and PPIs to the Xref file
GuidXRefFile.write("\n")
for key, item in GuidDict.items():
--
2.7.4.windows.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2016-10-27 3:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-27 3:18 [PATCH] BaseTools/Genfds: Fix Guid.xref missing GUIDs defined in Library Derek Lin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox