Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5722628imu; Mon, 26 Nov 2018 04:29:56 -0800 (PST) X-Google-Smtp-Source: AFSGD/Wleg7PECgkpdAHWhNhjf470iSUF57lvPT2pbhK5HpzvvmVkR8VlZ3pLOb/I6gr27Dhb/mV X-Received: by 2002:a63:9e0a:: with SMTP id s10mr24795584pgd.239.1543235396179; Mon, 26 Nov 2018 04:29:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543235396; cv=none; d=google.com; s=arc-20160816; b=O57qk4NSE9I+yxMSHv/Ydfy0cNXv5d1y13qFLZCWX8sSbOHYdCVUJx3kJ2l5oVgARB PGayXeVN7OUiqKYVuvugroTv+Oedl5BMQeckt3rw4UZxWnUyzeeaEOZlbvxgf6cs1P20 DULNoL6cyxI2VsXU9c07C3QC+qcwyHmdN/HyL8wj/latBzL4sgzyVk732YV05bJntUZ1 6LKPNzTNFpMr93toTsOjGCI/+/+w5/JHBgsc/RIrKOZD2T5SfgafJwGg2OoI5WiaGr+s ynUYaTskcU1XLM78+VmUdtrKZmpkBDNueTmNf93wZGTo/smnzDqd6R4RzVIBpFzMA6NO B8lA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=IbV/DRtfxL5/IHiNa3lnwzKQwIb7oHkGnQO6yGu78As=; b=rrRL7G7GIO6Domw4jiO9JMzvurnBwamHBpk/71lQuH713dXx5ePGhH2awLlS79VGkb pB9TMY0Lx21UGAHmEjEl9BvH6pYxWhmlLHxrJQt8foi2DrIC3QHY3MYGnCtFa+lCZwHg clzeMn/P3zad7SPaZlffqmBh+Rx3oo+d74/PxvErX4gXnjAI101y5CuUlHxsFLvuEN2i HaMwJzU8wRaoBE/9YNHenQex8XJEJ0VO08uTUJLYkqSfkxRqGhVXZpEXltsGf9PDhrDd 46aeZShMURgDsr4NvfVq6O/uCpKljPYEnCIy8ZKqIWcMNIqsQz9+XWHUbzTctK7mJYqm /Fhg== ARC-Authentication-Results: i=1; mx.google.com; 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 bc7si138779plb.120.2018.11.26.04.29.28; Mon, 26 Nov 2018 04:29:56 -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; 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 S1726486AbeKZXU2 (ORCPT + 99 others); Mon, 26 Nov 2018 18:20:28 -0500 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:41817 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726203AbeKZXU1 (ORCPT ); Mon, 26 Nov 2018 18:20:27 -0500 X-IronPort-AV: E=Sophos;i="5.56,282,1539640800"; d="scan'208";a="286830708" Received: from vaio-julia.rsr.lip6.fr ([132.227.76.33]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Nov 2018 13:26:26 +0100 Date: Mon, 26 Nov 2018 13:26:24 +0100 (CET) From: Julia Lawall X-X-Sender: jll@hadrien To: frowand.list@gmail.com cc: Rob Herring , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] of: add dtc annotations functionality to dtx_diff In-Reply-To: <1543233669-8696-1-git-send-email-frowand.list@gmail.com> Message-ID: References: <1543233669-8696-1-git-send-email-frowand.list@gmail.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 26 Nov 2018, frowand.list@gmail.com wrote: > From: Frank Rowand > > Add -T and --annotations command line arguments to dtx_diff. These > arguments will be passed through to dtc. dtc will then add source > location annotations to its output. > > Signed-off-by: Frank Rowand Tested-by: Julia Lawall > --- > > This feature depends upon commit 5667e7ef9a9a ("annotations: add the > annotation functionality") in the dtc git repository. To use the > new flags before the new version of dtc is imported to the linux > kernel, download the dtc repository, compile dtc with the make command, > then add the path of the dtc repository to the shell PATH variable. > > scripts/dtc/dtx_diff | 13 ++++++++++++- > 1 file changed, 12 insertions(+), 1 deletion(-) > > diff --git a/scripts/dtc/dtx_diff b/scripts/dtc/dtx_diff > index 8c4fbad2055e..0d8572008729 100755 > --- a/scripts/dtc/dtx_diff > +++ b/scripts/dtc/dtx_diff > @@ -21,6 +21,7 @@ Usage: > diff DTx_1 and DTx_2 > > > + --annotate synonym for -T > -f print full dts in diff (--unified=99999) > -h synonym for --help > -help synonym for --help > @@ -28,6 +29,7 @@ Usage: > -s SRCTREE linux kernel source tree is at path SRCTREE > (default is current directory) > -S linux kernel source tree is at root of current git repo > + -T Annotate output .dts with input source file and line (-T -T for more details) > -u unsorted, do not sort DTx > > > @@ -174,6 +176,7 @@ compile_to_dts() { > > # ----- start of script > > +annotate="" > cmd_diff=0 > diff_flags="-u" > dtx_file_1="" > @@ -208,6 +211,14 @@ while [ $# -gt 0 ] ; do > shift > ;; > > + -T | --annotate ) > + if [ "${annotate}" = "" ] ; then > + annotate="-T" > + elif [ "${annotate}" = "-T" ] ; then > + annotate="-T -T" > + fi > + shift > + ;; > -u ) > dtc_sort="" > shift > @@ -327,7 +338,7 @@ cpp_flags="\ > DTC="\ > ${DTC} \ > -i ${srctree}/scripts/dtc/include-prefixes \ > - -O dts -qq -f ${dtc_sort} -o -" > + -O dts -qq -f ${dtc_sort} ${annotate} -o -" > > > # ----- do the diff or decompile > -- > Frank Rowand > >