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.100; helo=mga07.intel.com; envelope-from=liming.gao@intel.com; receiver=edk2-devel@lists.01.org Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (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 AF5C9211F8898 for ; Tue, 26 Jun 2018 23:59:14 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Jun 2018 23:59:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,278,1526367600"; d="scan'208";a="67648446" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by fmsmga001.fm.intel.com with ESMTP; 26 Jun 2018 23:59:13 -0700 Received: from fmsmsx102.amr.corp.intel.com (10.18.124.200) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 26 Jun 2018 23:59:13 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by FMSMSX102.amr.corp.intel.com (10.18.124.200) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 26 Jun 2018 23:59:08 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.87]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.116]) with mapi id 14.03.0319.002; Wed, 27 Jun 2018 14:59:07 +0800 From: "Gao, Liming" To: Chris Co , "edk2-devel@lists.01.org" Thread-Topic: [PATCH v1 1/1] BaseTools/Trim: Canonicalize filepaths to fix comparison Thread-Index: AQHUDcsUCkcD+VT21EyYWFpJrbhBQqRzqScw Date: Wed, 27 Jun 2018 06:59:06 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E29EB4A@SHSMSX104.ccr.corp.intel.com> References: <20180627035753.49848-1-christopher.co@microsoft.com> <20180627035753.49848-2-christopher.co@microsoft.com> In-Reply-To: <20180627035753.49848-2-christopher.co@microsoft.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 v1 1/1] BaseTools/Trim: Canonicalize filepaths to fix comparison X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jun 2018 06:59:14 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Chris: Could you provide the generated Makefile for DSDT.asl? I would like to se= e what command is generated in Makefile to handle DSDT.asl.=20 Thanks Liming >-----Original Message----- >From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of >Chris Co >Sent: Wednesday, June 27, 2018 11:58 AM >To: edk2-devel@lists.01.org >Cc: Gao, Liming >Subject: [edk2] [PATCH v1 1/1] BaseTools/Trim: Canonicalize filepaths to f= ix >comparison > >When using Linaro GCC5+ arm-eabi toolchain on Windows, the generated >DSDT.iii contains a canonicalized ("\.\" removed and lower case) >filepath for the preprocessed DSDT.i file in the first line. >Due to this, when Trim.exe is called to generate DSDT.iiii, future >filepath comparisons against this canonicalized filepath, which >should match, actually fail the comparison which results in an >empty DSDT.iiii. > >Issue was first reported to Linaro here: >https://bugs.linaro.org/show_bug.cgi?id=3D2909 >where the recommendation was to address the issue in Trim.exe. > >This patch canonicalizes and lower cases all file paths encountered >during trim execution on preprocessed files. Since file paths are >standarized, the comparison succeeds for files that should match >regardless of the presence of upper case or "\.\" characters in >the file path. > >Contributed-under: TianoCore Contribution Agreement 1.1 >Signed-off-by: Christopher Co >Cc: Leif Lindholm >Cc: Yonghong Zhu >Cc: Liming Gao >--- > BaseTools/Source/Python/Trim/Trim.py | 2 ++ > 1 file changed, 2 insertions(+) > >diff --git a/BaseTools/Source/Python/Trim/Trim.py >b/BaseTools/Source/Python/Trim/Trim.py >index a74075859148..cca4e5c9694a 100644 >--- a/BaseTools/Source/Python/Trim/Trim.py >+++ b/BaseTools/Source/Python/Trim/Trim.py >@@ -166,6 +166,8 @@ def TrimPreprocessedFile(Source, Target, ConvertHex, >TrimLong): > if len(MatchList) =3D=3D 2: > LineNumber =3D int(MatchList[0], 0) > InjectedFile =3D MatchList[1] >+ InjectedFile =3D InjectedFile.replace("\\.\\","") >+ InjectedFile =3D InjectedFile.lower() > # The first injetcted file must be the preprocessed file = itself > if PreprocessedFile =3D=3D "": > PreprocessedFile =3D InjectedFile >-- >2.16.2.gvfs.1.33.gf5370f1 > >_______________________________________________ >edk2-devel mailing list >edk2-devel@lists.01.org >https://lists.01.org/mailman/listinfo/edk2-devel