From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.31; helo=mga06.intel.com; envelope-from=yonghong.zhu@intel.com; receiver=edk2-devel@lists.01.org Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 7947F21BADAB2 for ; Thu, 2 Aug 2018 00:13:37 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Aug 2018 00:13:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,434,1526367600"; d="scan'208";a="59819547" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by fmsmga008.fm.intel.com with ESMTP; 02 Aug 2018 00:13:36 -0700 Received: from fmsmsx111.amr.corp.intel.com (10.18.116.5) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 2 Aug 2018 00:13:36 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx111.amr.corp.intel.com (10.18.116.5) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 2 Aug 2018 00:13:36 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.100]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.173]) with mapi id 14.03.0319.002; Thu, 2 Aug 2018 15:13:34 +0800 From: "Zhu, Yonghong" To: "Zhu, Yonghong" , "edk2-devel@lists.01.org" CC: "Gao, Liming" , "Zhu, Yonghong" Thread-Topic: [edk2] [PATCH] BaseTools: Guid.xref doesn't specify the correct GUID value for Driver Thread-Index: AQHUKMjBbYP6KjoDpUiz0GZRiGMp3KSsDw6A Date: Thu, 2 Aug 2018 07:13:33 +0000 Message-ID: References: <1533039549-13184-1-git-send-email-yonghong.zhu@intel.com> In-Reply-To: <1533039549-13184-1-git-send-email-yonghong.zhu@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH] BaseTools: Guid.xref doesn't specify the correct GUID value for Driver X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Aug 2018 07:13:37 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Yonghong Zhu =20 Best Regards, Zhu Yonghong -----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Yong= hong Zhu Sent: Tuesday, July 31, 2018 8:19 PM To: edk2-devel@lists.01.org Cc: Gao, Liming Subject: [edk2] [PATCH] BaseTools: Guid.xref doesn't specify the correct GU= ID value for Driver From: Yunhua Feng In DSC, we can define the driver with the different FILE GUID. So, this dri= ver 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 { FILE_GUID =3D 3A4A354F-6935-40fa-B19C-500EEEBF0BC2 PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf } Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yunhua Feng --- BaseTools/Source/Python/GenFds/GenFds.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/BaseTools/Source/Python/GenFds/GenFds.py b/BaseTools/Source/Py= thon/GenFds/GenFds.py index a7c1e6c853..156aae1d0e 100644 --- a/BaseTools/Source/Python/GenFds/GenFds.py +++ b/BaseTools/Source/Python/GenFds/GenFds.py @@ -603,19 +603,28 @@ class GenFds : GuidXRefFileName =3D os.path.join(GenFdsGlobalVariable.FvDir, "Gui= d.xref") GuidXRefFile =3D BytesIO('') GuidDict =3D {} ModuleList =3D [] FileGuidList =3D [] + GuidPattern =3D 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 =3D BuildDb.BuildObject[GenFdsGlobalVariable.= ActivePlatform, Arch, GenFdsGlobalVariable.TargetName, GenFdsGlobalVariable= .ToolChainTag] for ModuleFile in PlatformDataBase.Modules: Module =3D BuildDb.BuildObject[ModuleFile, Arch, GenFdsGlo= balVariable.TargetName, GenFdsGlobalVariable.ToolChainTag] if Module in ModuleList: continue else: ModuleList.append(Module) - GuidXRefFile.write("%s %s\n" % (Module.Guid, Module.BaseNa= me)) + GuidMatch =3D GuidPattern.match(ModuleFile.BaseName) + if GuidMatch is not None: + GuidXRefFile.write("%s %s\n" % (ModuleFile.BaseName, M= odule.BaseName)) + else: + GuidXRefFile.write("%s %s\n" % (Module.Guid,=20 + Module.BaseName)) for key, item in Module.Protocols.items(): GuidDict[key] =3D item for key, item in Module.Guids.items(): GuidDict[key] =3D item for key, item in Module.Ppis.items(): -- 2.12.2.windows.2 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel