Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp273504ybl; Wed, 22 Jan 2020 21:19:37 -0800 (PST) X-Google-Smtp-Source: APXvYqypJTPodGB0XXW36twt4O9VL7RKYAQmZzUm2GeuVPmNpymJRh6a848dJ8/PqqQ+eJNBlvVT X-Received: by 2002:a9d:7757:: with SMTP id t23mr10451425otl.315.1579756777268; Wed, 22 Jan 2020 21:19:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579756777; cv=none; d=google.com; s=arc-20160816; b=bPQWU22bOEoOujgBRskpAwA4iemeo3ROffqG94rAlW2ZmpXHZ17FgddxVZQWXv3G+R HZkT8aPvzUfN7TbV28ulBeeCM984PP2WNtgrFPZh059eFAFdXhoQdmcEqzLsA3sPLlOH DgyR0NKlsmpf/nYK/lc3IfF0pgKZavwcOeQGYsRaJm7CGvETweSMEQx6cf9d1AyGGUPK x8ngoeWA7H2kTV/mkKpff1/+CO5CKl38t2D4tG/mC8OhAFUC0PuSe/Gx24o6K6be5WWS OaTd6q/PU7vTHSvCeBzv05gvpildrAvw9nJMU6LFVeopRAjWP4vY0fNOBL13odp2+fdW l43w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=zyvhWlbLVy/QUJqZipZoV8doyn0WievipAT3nIP5C80=; b=dJgbk3+vGqVs9ZrnLXAGC1hB/kCy2LVW9Qz5jZ0H4nUCFbxojXuh992z19rPAs9c/M Fc4ONJJF4vzrZvUBn3EIF9qYBGysBa07Sfd4Lb8tzTZTBO83ZHigm4++K3pP4imfhowX 9uSk/YqdG8cRbyUrdJxWkaq9/QgrM1NYA5vH6u4SeKr6j8hYjHnIfN0iWSkOgIceOu56 Fql8d1nJEIT4YIbjls/Lkc+7W+6IJAyminVcb1A7hOSjxh8Hsa4QM2+2v7t2UssPD7NA BJvUavkFjijgj4scsI2dPWP4SHSQqAik8sRKIIlYqVsQbhmCaasQ1KecPWUGkkowPJsJ yaEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gibson.dropbear.id.au header.s=201602 header.b=Urb2nN2j; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k8si625473otp.13.2020.01.22.21.19.01; Wed, 22 Jan 2020 21:19:37 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gibson.dropbear.id.au header.s=201602 header.b=Urb2nN2j; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726029AbgAWFNZ (ORCPT + 99 others); Thu, 23 Jan 2020 00:13:25 -0500 Received: from ozlabs.org ([203.11.71.1]:53647 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725535AbgAWFNZ (ORCPT ); Thu, 23 Jan 2020 00:13:25 -0500 Received: by ozlabs.org (Postfix, from userid 1007) id 4839Qp1wQBz9sSL; Thu, 23 Jan 2020 16:13:22 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1579756402; bh=EndBGkPODenb5XpA0SDzQL0qO6AOtb8zZmjrL1qSQkk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Urb2nN2jTgJpLIgiBgErMo0isifQ5rrFdnx6dTAXMhpVjfzi4umWLayu+/LtEAEoa 3XsZlrL0ItA+MlR1Kk4KuW42yuqMXcyXdCWYDkvIgdXj5WFQLKooRPRBVTYgMayQno a6402Djr5CHoQFc5NIgLYX0Gn8I5xQ1w1vk14rMU= Date: Thu, 23 Jan 2020 16:13:16 +1100 From: David Gibson To: Rob Herring Cc: Alexandre Torgue , Frank Rowand , Masahiro Yamada , Michal Marek , Simon Glass , devicetree@vger.kernel.org, "linux-kernel@vger.kernel.org" , Linux Kbuild mailing list , Devicetree Compiler , Steve McIntyre Subject: Re: [RFC PATCH 1/3] dtc: Add dtb build information option Message-ID: <20200123051316.GP2347@umbus.fritz.box> References: <20200113181625.3130-1-alexandre.torgue@st.com> <20200113181625.3130-2-alexandre.torgue@st.com> <20200116005741.GB54439@umbus> <20200117090937.GU54439@umbus> <20200119063916.GD54439@umbus> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="b5sSX5qSQrSInIHt" Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --b5sSX5qSQrSInIHt Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jan 21, 2020 at 09:59:44AM -0600, Rob Herring wrote: > On Sun, Jan 19, 2020 at 12:41 AM David Gibson > wrote: > > > > On Fri, Jan 17, 2020 at 08:43:23AM -0600, Rob Herring wrote: > > > On Fri, Jan 17, 2020 at 6:26 AM David Gibson > > > wrote: > > > > > > > > On Thu, Jan 16, 2020 at 09:58:23AM +0100, Alexandre Torgue wrote: > > > > > Hi David > > > > > > > > > > On 1/16/20 1:57 AM, David Gibson wrote: > > > > > > On Mon, Jan 13, 2020 at 07:16:23PM +0100, Alexandre Torgue wrot= e: > > > > > > > This commit adds the possibility to add build information for= a DTB. > > > > > > > Build information can be: build date, DTS version, "who built= the DTB" > > > > > > > (same kind of information that we get in Linux with the Linux= banner). > > > > > > > > > > > > > > To do this, an extra option "-B" using an information file as= argument > > > > > > > has been added. If this option is used, input device tree is = appended with > > > > > > > a new string property "Build-info". This property is built wi= th information > > > > > > > found in information file given as argument. This file has to= be generated > > > > > > > by user and shouldn't exceed 256 bytes. > > > > > > > > > > > > > > Signed-off-by: Alexandre Torgue > > > > > > > > > > > > At the very least, this patch of the series will need to be sen= t to > > > > > > upstream dtc first. > > > > > > > > > > Ok sorry. I thought that sending all the series would give more > > > > > information. > > > > > > > > That's fair enough, but in order to merge, you'll need to post agai= nst > > > > upstream dtc. > > > > > > > > > > I'm also not terribly clear on what you're trying to accomplish= here, > > > > > > and why it's useful. > > > > > > > > > > Let's take Kernel boot at example (but could be extend to other D= TB "users" > > > > > like U-Boot). When Linux kernel booting we get a log that gives u= seful > > > > > information about kernel image: source version, build date, peopl= e who built > > > > > the kernel image, compiler version. This information is useful fo= r debug and > > > > > support. The aim is to get same kind of information but for the D= TB. > > > > > > > > > > > Since you're doing this specifically for use with dtbs built in= the > > > > > > kernel build, could you just use a: > > > > > > Build-info =3D /incbin/ "build-info.txt"; > > > > > > in each of the in-kernel .dts files? > > > > > > > > > > My first idea was to not modify all existing .dts files. Adding a= n extra > > > > > option in dtc is (for me) the softer way to do it. I mean, compile > > > > > information should come through compiler without modify .dts file= s outside > > > > > from dtc. In this way it will be easy to everybody using dtc (ins= ide our > > > > > outside Linux tree) to add dtb build info (even if they don't how= to write a > > > > > dts file). > > > > > > > > But you're not really having this information coming from the > > > > compiler. Instead you're adding a compiler option that just force > > > > includes another file into the generated tree, and it's up to your > > > > build scripts to put something useful into that file. > > > > > > > > I don't really see that as preferable to modifying the .dts files. > > > > > > > > I also dislike the fact that the option as proposed is much more > > > > general than the name suggests, but also very similar too, but much > > > > more specific than the existing /incbin/ option. > > > > > > > > What might be better would be to have a dtc option which force appe= nds > > > > an extra .dts to the mail .dts compiled. You can then put an overl= ay > > > > template in that file, something like: > > > > > > > > &{/} { > > > > linux,build-info =3D /incbin/ "build-info.txt; > > > > } > > > > > > I like this suggestion either as an include another dts file or an > > > overlay. > > > > Sorry, to be clear what I'm talking about here is just including > > another dts file, and using the compile-type overlay syntax. This is > > not the same as .dtbo style runtime overlays (though the final result > > is about the same in this case). >=20 > Ah, okay. That's probably easier to implement. >=20 > > > The latter could be useful as a way to maintain current dtb > > > files while splitting the source files into base and overlay dts > > > files. > > > > > > But no, let's not prepend this with 'linux'. It's not a property > > > specific for Linux to consume. > > > > It's not really about who consumes it. It's about defining a > > namespace for the new property to exist in, since it's not part of a > > relevant standard (if we wanted to make it such, we should pin down > > what goes in there with much more precision). >=20 > I can't think of any cases of the 'linux' prefix not being about who > consumes it. And we often end up dropping 'linux' because it turns out > to not be Linux specific. I don't care to see u-boot,build-info, > freebsd,build-info, etc. when a given dtb can only have 1 of those. But all other vendor prefixes are about who generated or specified the information, not who consumes it, e.g. "ibm,XXX", "fsl,YYY", etc. > My intent is this property name is added to the DT spec, but I don't > agree we should define what's in it beyond a string. It is information > that is useful for humans identifying what the dtb was built from. >=20 > Rob >=20 --=20 David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson --b5sSX5qSQrSInIHt Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEdfRlhq5hpmzETofcbDjKyiDZs5IFAl4pK2wACgkQbDjKyiDZ s5LRthAAvnFwh1/QPJTb0Pk4hrdDgI4GYCc5H1CNQDjh9ROoEpnEJD2wOfkq7aGK qt0MyXulz6qZDYfmK19gCU+FSP76kij4OfX9aqh0C9gpnMRrqu9Shye0mbFT5iwR 0DFHxmnwyc9xG6HGtVSi3i85yAOYOKubQ95uwgrj5jdXtONhCmYlnC6UeXd4ATDd ykta/FyqAR7lLOJz+9Mdu6lsWoeqOoKe4RWr5fGnQ9PFviJtxr0HCYGpwwuZ4+tQ sPzjBUZ8gJu5btg39Zok883IZi4iK148EpZH/9l+zlHfpMKzajx48cKrjgZO5Va4 Rp0f6NOm8jBQZQ2DnuvN3BDR0WjAcGtUpyczxIf7LEPuLGd3e+LiAVrT7esbx2qc bi31Ci2IYed1YmtjfJLmaPmqtBU4/5f/IiYFD87c5JHJjTO33gp0eIELOG9FeQFF Yrgm1QknHecNd3BODgk8CObZnYGISy7d4hu1JY3/BMe1v2LCUZfahlyPIHF5qipK p98NCmbkzOjoE3C6J5RU7ewALKxauLJq1n1eUMBk8nR+TdsaxEIGkDVRA2upK0+U EgygPrWIu7LFp5cxMNEmZVXIHdzW+ZcCfOBxaO9Bp7zea5HTCLXS1HSFQbrc86wj nmcZjyWAqxtuxgjPOKdhEKLo0gO0c5jCnWQvecghxdNR7aFO/hs= =bV2o -----END PGP SIGNATURE----- --b5sSX5qSQrSInIHt--