From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by ml01.01.org (Postfix) with ESMTP id 5F60F1A1E5C for ; Mon, 1 Aug 2016 18:59:45 -0700 (PDT) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP; 01 Aug 2016 18:59:44 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,458,1464678000"; d="scan'208";a="857713746" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga003.jf.intel.com with ESMTP; 01 Aug 2016 18:59:44 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 1 Aug 2016 18:59:42 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.147]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.8]) with mapi id 14.03.0248.002; Tue, 2 Aug 2016 09:59:40 +0800 From: "Gao, Liming" To: Tim Lewis , "Justen, Jordan L" , "Kinney, Michael D" , Leif Lindholm , "Kinney, Michael D" CC: "edk2-devel@lists.01.org" , Laszlo Ersek , Andrew Fish , "Gao, Liming" Thread-Topic: [edk2] [PATCH] add top-level .gitattributes file, dealing with .depex Thread-Index: AQHR2FtRYKkvv3ceo0yYA+uKci1quqAMioqAgCKvmoCAAAfmgIABqO+AgAHcR4CAAA8XgIAAeFcAgACnoQCAARfUoA== Date: Tue, 2 Aug 2016 01:59:40 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A1155E3DC0@shsmsx102.ccr.corp.intel.com> References: <1467901459-18840-1-git-send-email-leif.lindholm@linaro.org> <20160729164433.GO31760@bivouac.eciton.net> <7236196A5DF6C040855A6D96F556A53F3D487A@msmail.insydesw.com.tw> <20160730183343.GP31760@bivouac.eciton.net> <147000590377.19855.16400196489651537046@jljusten-ivb> <147003498665.24223.12312501403228549999@jljusten-ivb> <7236196A5DF6C040855A6D96F556A53F3D8635@msmail.insydesw.com.tw> In-Reply-To: <7236196A5DF6C040855A6D96F556A53F3D8635@msmail.insydesw.com.tw> 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] add top-level .gitattributes file, dealing with .depex X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Aug 2016 01:59:45 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Tim: FDF syntax doesn't support .ffs.=20 Thanks Liming > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of > Tim Lewis > Sent: Tuesday, August 02, 2016 1:03 AM > To: Justen, Jordan L ; Kinney, Michael D > ; Leif Lindholm ; > Kinney, Michael D > Cc: edk2-devel@lists.01.org; Laszlo Ersek ; Andrew Fis= h > > Subject: Re: [edk2] [PATCH] add top-level .gitattributes file, dealing > with .depex >=20 > Jordan -- >=20 > As a company that delivers a lot of mixed binary/source builds, we > see .depex as actually important for ease of maintenance. The .fdf syntax > can work, as you mention, but it is actually requires an extra step for t= hose of > us maintaining binary modules. Why? Because .depex is derived from the .i= nf > of the module *and* the .infs of all library instances which the module i= s > linked against. While this can be tracked down using a build report, it i= s > problematic and likely to introduce hard to track bugs. Since .depex is a > normal product of the source build process, it is convenient. >=20 > As for the open-source, I would only note that it is used only in the exa= ct > same cases where the module itself is delivered as a binary. In fact, it = could > be checked in to the tree as a complete FFS file (no .efi at all). >=20 > Thanks, >=20 > Tim >=20 >=20 >=20 >=20 > -----Original Message----- > From: Jordan Justen [mailto:jordan.l.justen@intel.com] > Sent: Monday, August 01, 2016 12:03 AM > To: Kinney, Michael D ; Leif Lindholm > ; Tim Lewis ; Kinney, > Michael D > Cc: Laszlo Ersek ; edk2-devel@lists.01.org; Andrew Fis= h > > Subject: RE: [edk2] [PATCH] add top-level .gitattributes file, dealing > with .depex >=20 > On 2016-07-31 16:52:23, Kinney, Michael D wrote: > > Jordan, > > > > UEFI Drivers distributed as binaries do not need depex sections. > > > > PI modules distributed as binaries do require a .depex binary. > > >=20 > They may require a depex, but, as mentioned below, they can also add it > directly in the .fdf. As it stands, apparently we have 1 .depex file in t= he tree, > and it is unused. >=20 > Aside from this, under what conditions would we take such binaries into t= he > EDK II tree? Today we have the ShellPkg and FatPkg binaries in the EDK II= tree, > but we recently discussed removing even those. >=20 > For an open source project, I think it is best to not have pre-built bina= ries, > unless there is some very compelling reason. Previously there was some > license funniness on FatPkg, but now that is gone. If it took an hour to = build > FatPkg, then that might also be something to discuss. :) >=20 > I don't think adding the .gitattributes is really a problem, aside from t= he fact > that it implies that we might actually have a reason to add a .depex file= to the > source tree. >=20 > -Jordan >=20 > > So I would recommend .depex binary files be treated the same as binary > > .efi files by GIT. So it does sound like we need some minor updates > > to GIT attributes. > > > > If we have an example of a binary module that is providing more binary > > leaf sections than are actually required and/or used, then yes, the > > binary module should be cleaned up to remove the unused content. > > > > Thanks, > > > > Mike > > > > > -----Original Message----- > > > From: Justen, Jordan L > > > Sent: Sunday, July 31, 2016 3:58 PM > > > To: Leif Lindholm ; Tim Lewis > > > > > > Cc: Laszlo Ersek ; Kinney, Michael D > > > ; edk2-devel@ml01.01.org > > > ; Andrew Fish > > > Subject: Re: [edk2] [PATCH] add top-level .gitattributes file, > > > dealing with .depex > > > > > > On 2016-07-30 11:33:43, Leif Lindholm wrote: > > > > Hi Tim, > > > > > > > > Thanks for the warning, and investigation. > > > > > > > > Does this mean that you think we should ban the inclusion of > > > > .depex files in EDK2, including future platform trees? > > > > > > I don't know about banning it, but at least we could wait for > > > someone to make a reasonable argument why they are needed. > > > > > > Even for binary only modules, it looks like the fdf method outlined > > > below is preferable to a pre-built .depex. > > > > > > If (at a future point) the reason for using a .depex is to support a > > > binary only module in a supposedly open platform under EDK II, then > > > I guess we can decide if that is a good idea at that point. > > > > > > Should we delete this one unused .depex from the tree? > > > > > > -Jordan > > > > > > > (If not, this patch is > > > > still needed for git to work predictably with these files.) > > > > > > > > Regards, > > > > > > > > Leif > > > > > > > > On Fri, Jul 29, 2016 at 05:12:49PM +0000, Tim Lewis wrote: > > > > > It appears that this file is not actually used. It is only > > > > > referenced in the [Rule.Common.UEFI_DRIVER.NATIVE_BINARY] rule > > > > > in PlatformPkg.fdf. A little further research shows that an > > > > > alternate method was used for the actual GOP binary (see below). > > > > > A grep of the entire tree shows that no one uses this rule > > > > > NATIVE_BINARY. So it looks like it can just be cut out. > > > > > > > > > > BTW, the downside of the method used for the binary version of > > > > > the GOP driver, is that those drivers cannot use PCDs, since the > > > > > PCD database is created based on references in the .inf. GOP > > > > > works because it is pure UEFI and (therefore) doesn't use PCDs. > > > > > > > > > > Tim > > > > > > > > > > FILE DRIVER =3D FF0C8745-3270-4439-B74F-3E45F8C77064 { > > > > > SECTION DXE_DEPEX_EXP =3D {gPlatformGOPPolicyGuid} > > > > > SECTION PE32 =3D > > > > Vlv2MiscBinariesPkg/GOP/7.2.1011/RELEASE_VS2008x86/$(DXE_ARCHITECT > UR > > > E)/IntelGopDriver.e > > > fi > > > > > SECTION UI =3D "IntelGopDriver" > > > > > } > > > > > > > > > > -----Original Message----- > > > > > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On > > > > > Behalf Of Leif > > > Lindholm > > > > > Sent: Friday, July 29, 2016 9:45 AM > > > > > To: Laszlo Ersek > > > > > Cc: michael.d.kinney@intel.com; Jordan Justen > > > > > ; edk2- > > > devel@ml01.01.org; Andrew Fish > > > > > Subject: Re: [edk2] [PATCH] add top-level .gitattributes file, > > > > > dealing with .depex > > > > > > > > > > On Thu, Jul 07, 2016 at 05:03:13PM +0200, Laszlo Ersek wrote: > > > > > > On 07/07/16 16:24, Leif Lindholm wrote: > > > > > > > Git tends to see .depex files as text, causing hideous > > > > > > > patches being generated (and breaking PatchCheck.py). > > > > > > > > > > > > > > Add a .gitattributes file instructing git to treat them as bi= nary. > > > > > > > > > > > > > > Contributed-under: TianoCore Contribution Agreement 1.0 > > > > > > > Signed-off-by: Leif Lindholm > > > > > > > --- > > > > > > > .gitattributes | 1 + > > > > > > > 1 file changed, 1 insertion(+) create mode 100644 > > > > > > > .gitattributes > > > > > > > > > > > > > > diff --git a/.gitattributes b/.gitattributes new file mode > > > > > > > 100644 index 0000000..2d8a45b > > > > > > > --- /dev/null > > > > > > > +++ b/.gitattributes > > > > > > > @@ -0,0 +1 @@ > > > > > > > +*.depex binary > > > > > > > > > > > > > > > > > > > What generates .depex files? I've never seen any. > > > > > > > > > > > > Also, unless you add .depex files with "git add" to the set of > > > > > > tracked files, no patches / diffs should cover them. What am I > > > > > > missing? :) > > > > > > > > > > > > ... Hm, after > > > > > > > > > > > > $ find . -iname "*.depex" > > > > > > > > > > > > I see .depex files in Build/ (which should be ignored > > > > > > altogether), and > > > > > > > > > > > > ./Vlv2TbltDevicePkg/IntelGopDepex/IntelGopDriver.depex > > > > > > > > > > > > Why does that file exist in the tree? Let me see... git log > > > > > > says nothing relevant > > > (the file dates back to commit 3cbfba02fef9, "Upload BSD-licensed > > > Vlv2TbltDevicePkg and Vlv2DeviceRefCodePkg to"). > > > > > > > > > > > > Grepping the tree for the filename itself leads to: > > > > > > > > > > > > Vlv2TbltDevicePkg/PlatformPkg.fdf: DXE_DEPEX DXE_DEPEX > Optional > > > > $(WORKSPACE)/$(PLATFORM_PACKAGE)/IntelGopDepex/IntelGopDriver.de > pex > > > > > > Vlv2TbltDevicePkg/PlatformPkgGcc.fdf: DXE_DEPEX DXE_DEPEX > Optional > > > > $(WORKSPACE)/$(PLATFORM_PACKAGE)/IntelGopDepex/IntelGopDriver.de > pex > > > > > > > > > > > > Do these rules exist to override the DEPEX sections of > > > > > > binary-only modules? If > > > so: that's horrible. > > > > > > > > > > > > Anyway, given that edk2 contains at least one .depex file, and > > > > > > your patch is > > > correct according to Git-Attributes>: > > > > > > > > > > > > Reviewed-by: Laszlo Ersek > > > > > > > > > > Thanks! > > > > > > > > > > I had hoped for comments from someone else on cc, since we don't > > > > > have any > > > Maintainers.txt entry for the top level directory :) > > > > > > > > > > But if I don't hear anything before Monday, I'll push it then. > > > > > > > > > > Regards, > > > > > > > > > > Leif > > > > > > > > > > _______________________________________________ > > > > > edk2-devel mailing list > > > > > edk2-devel@lists.01.org > > > > > https://lists.01.org/mailman/listinfo/edk2-devel > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel