Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp8980969ybl; Fri, 17 Jan 2020 04:27:55 -0800 (PST) X-Google-Smtp-Source: APXvYqxE+1Zd8B5YEFEXmOW5ZpMOpfKii6QnjPHTqTizR3YPg/AlcH566SkmJKScD7EdMYnUpWYX X-Received: by 2002:a05:6830:1555:: with SMTP id l21mr5614981otp.41.1579264074802; Fri, 17 Jan 2020 04:27:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579264074; cv=none; d=google.com; s=arc-20160816; b=IkX4/kr0ACQo4FCXzdDpWiW9Krb5NibnY2NtMeTkY9TzYKRnzjMx/qPe7Wl7Q4SzFz YaXNHuYuGjhWWB+Jw1BexLHx8hN7HPeRfUFN2wYCINQMFCrn4hpUinSJNTQLCv/AXgRU qeUUj7kh1pMUXLwuSE+S8IIo835M0W0ZYkzfXd2S76goQNIuWQn/vstZuCAVsfUrcuPK 9QSDxJNOr1yeTr26mYbqrY+ZAIilheUy3Hm3J3HXQ2HYh3wGG+uL4FROdvc6GZ3JcFLy z/SbhE/i3Vaq/c3ZlqfBfIGkHv0O+p8N8rwcfuCUTBqImd1J+G3FNHixfTLALDrhNX9T 8stg== 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=HniAb6CtxgGbPHm4YKIUqax7oTmbahOPf633PmAWDk4=; b=iRHNAXBwuEd67WiobqOnCQ9GzUqFUsq2MPH3u5t0ir/RH5d57urIX2YhWUUs/3Vl3f sPBTv9QWpeZXDUiEvkl2POAytEfVEODmJNYs+VP0DvYyDRpg9ErO/zYegFX2eC14WNbP A3+u2pg4x2iFMXgqm2ezHUKl5hm9abIv9Az97mGxUZ6ni9U3yMXUvJ+KUXJH0kEjZYSu nRs8IMLyt4tp/NkA16Y6WnlhukFfZfr6z4ZpJHz/AlKYYgHcqaFkrxQ4w2grjj8LAmCZ fEJA/Dx+FYjRe+7ugSFc5Q0oIE7iR+8lzOZgET1tIdlR5C3DgQGfknHPfBk1Gup5S2TC xvog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gibson.dropbear.id.au header.s=201602 header.b=TKh3IrbQ; 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 m7si12987449oih.7.2020.01.17.04.27.41; Fri, 17 Jan 2020 04:27:54 -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=TKh3IrbQ; 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 S1727029AbgAQM0u (ORCPT + 99 others); Fri, 17 Jan 2020 07:26:50 -0500 Received: from ozlabs.org ([203.11.71.1]:48903 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726812AbgAQM0t (ORCPT ); Fri, 17 Jan 2020 07:26:49 -0500 Received: by ozlabs.org (Postfix, from userid 1007) id 47zgKd6pB0z9sRR; Fri, 17 Jan 2020 23:26:45 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1579264005; bh=kurz+DTGyHKCLIvcZzXDHOZM5UqyeQHKPspRA/gpp50=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=TKh3IrbQ1yepznLeAk1CcT3rhzHe3vmWKwn5CHGDbZGSnZjOTHAcU9RLfsarsrxcI XfLCeX1zS2KhCU3GeA29/mdbe6L1IRTa8TPIubPcGpbTjFZkAV1EncUmATkK/PoSYI ks4QUlFQDk+0W6JDU6EZ5mFNC2Q6DQgx3ZaNAevI= Date: Fri, 17 Jan 2020 19:09:37 +1000 From: David Gibson To: Alexandre Torgue Cc: robh+dt@kernel.org, Frank Rowand , Masahiro Yamada , Michal Marek , sjg@chromium.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, devicetree-compiler@vger.kernel.org, Steve McIntyre Subject: Re: [RFC PATCH 1/3] dtc: Add dtb build information option Message-ID: <20200117090937.GU54439@umbus> References: <20200113181625.3130-1-alexandre.torgue@st.com> <20200113181625.3130-2-alexandre.torgue@st.com> <20200116005741.GB54439@umbus> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="E75mJrUy8lRi9cGN" 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 --E75mJrUy8lRi9cGN Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jan 16, 2020 at 09:58:23AM +0100, Alexandre Torgue wrote: > Hi David >=20 > On 1/16/20 1:57 AM, David Gibson wrote: > > On Mon, Jan 13, 2020 at 07:16:23PM +0100, Alexandre Torgue wrote: > > > 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). > > >=20 > > > 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 with infor= mation > > > found in information file given as argument. This file has to be gene= rated > > > by user and shouldn't exceed 256 bytes. > > >=20 > > > Signed-off-by: Alexandre Torgue > >=20 > > At the very least, this patch of the series will need to be sent to > > upstream dtc first. >=20 > 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 against upstream dtc. > > I'm also not terribly clear on what you're trying to accomplish here, > > and why it's useful. >=20 > Let's take Kernel boot at example (but could be extend to other DTB "user= s" > like U-Boot). When Linux kernel booting we get a log that gives useful > information about kernel image: source version, build date, people who bu= ilt > the kernel image, compiler version. This information is useful for debug = and > support. The aim is to get same kind of information but for the DTB. >=20 > > 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? >=20 > My first idea was to not modify all existing .dts files. Adding an extra > option in dtc is (for me) the softer way to do it. I mean, compile > information should come through compiler without modify .dts files outside > from dtc. In this way it will be easy to everybody using dtc (inside our > outside Linux tree) to add dtb build info (even if they don't how to writ= e 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 appends an extra .dts to the mail .dts compiled. You can then put an overlay template in that file, something like: &{/} { linux,build-info =3D /incbin/ "build-info.txt; } --=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 --E75mJrUy8lRi9cGN Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEdfRlhq5hpmzETofcbDjKyiDZs5IFAl4hec4ACgkQbDjKyiDZ s5JBkBAAqIBfwpRffu5P/FrP1ByZCpvCoDk8mmoWaN0k75RnPYkHuEoyj3NkVzv4 mpJ0+e5m8yGrrMollgWKrUT3qojPVUYuu/ztkx9nspAa5M2pFiM4P1dLt4n/CVoA qdw/cHhCI1yQ4ws22P5mcw+rdJBegrdJgJNr14VqAy8uZsU8ANoNkmVIkAZO78kY 41Og23xr20h2UDj4is4aUwKRs5n9eSDFv8DWruoQQxgXUkaGlAsJKeCLfRkmuJ81 UnHq6Zkil0ueCvTJSmekz6dV29ius+uoAKZFWp6qMzUmVe4+amR3y1M0dLYXZjhU SkeudGQVEakWnnQ/3YXKD170eRnbBEFD/d0V377Ns6BOApI+YD77KRyMKw+fMoGB pK0HAxHf/rFIGke5H+dRJ+yGikPFKUuCuEvBoOB1/nAtj6aSR/HXqzGed0RQUvc5 D6kvvILwsLry55n4IDsmI+AUzTvRJwcOTmQ47BGAKmwoNaJbNoO55uXzpR5euSjG +yQKirwMsQKXSM3HOx6D+nHpMKxBxPCN0m8s1+5/mJeFvrL3II3jouko+tDsx84A 7rbEEmBil4ggTtv5LOPJCX6v2Ps8WbsWfiOAkP3JqlT+RaGKA8kOo7VrwLoZWprj NmCxLe1tG5MP8UM7NJvbf0dMoV5/pdfYEp1AiSH5dhAgsunnGas= =HQxc -----END PGP SIGNATURE----- --E75mJrUy8lRi9cGN--