Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5685312imu; Mon, 26 Nov 2018 04:03:06 -0800 (PST) X-Google-Smtp-Source: AFSGD/Vslp+TwxaQH1GN2DbvR60zBkjTS+XsZaCjDWH3xiOE9VSWURDLgdJIR1QRJyc6dN+h6jHK X-Received: by 2002:a63:200e:: with SMTP id g14mr24680469pgg.235.1543233785960; Mon, 26 Nov 2018 04:03:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543233785; cv=none; d=google.com; s=arc-20160816; b=opDOx9TGjymqCLd429XfDfd4M4bYsMeWknNmfYznSzgqE2tK6/yRXJ/N7yzKuE8oI5 DwR2lEiSZDkt9PL6RVtI1E2ZR94w4oqm3RDHURRgvEY5mAJ0JY9tjKmYme5XmaxG7SHi f+aDEVTV2yZzoTXySWMhtdNTi/C3JonGgjGut2v0L9jFixjavw0LRj5I/Mu15VVolOP0 cJ7Mt+KzoWJL/v9XfeVr5a7vY1YbvNdAJvZxGBrntpA5vBr3svFYqzZp0kNWqKhuUY1K hCHm+1U3r9Soi7raUkTUm8ZZ5unF+RClZdMhyCc5cA2kAgL/gh/E6HsdvG5Qdwc0mDfQ 70Tw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=otYbq0C9LVqp27elVROsGPtmHiho10hG3fe3tncFiVU=; b=q1gguJVxjXQ1T3JGke6YSSjzuKMCWvIrFsZFIE2qqTDifpR7Z2mIIyjzr7S7J1fwW2 YfNhqrc6nY9LsuKZ6CqFYUaRDIjz/45QOJHyuQjZ3tXoX19ppoAdJwgeiPJ5ZNahA4/o s0gE0wXsi6eBvYCKAf2Oc6pM1dlZ/qHJiCMXOu/faWPBBQPhMx4Nr9eXCuVlF0jTtxQi hhsoBlSLd+KZv589exRt8slxbqdLXaJDAFR4W0ab0skiLKZ9ABHboBS/7Dxkk08peisa Kd2hj0vcjwVDI+w5RtBgXko0a+FQdDqGVOUL2fzD3iGOmfm5oq8O6CulQO4K+XrxYUdD bGpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=OIys24FN; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g4si151214pfm.85.2018.11.26.04.02.17; Mon, 26 Nov 2018 04:03:05 -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=@gmail.com header.s=20161025 header.b=OIys24FN; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726539AbeKZWzR (ORCPT + 99 others); Mon, 26 Nov 2018 17:55:17 -0500 Received: from mail-pl1-f196.google.com ([209.85.214.196]:42785 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726254AbeKZWzR (ORCPT ); Mon, 26 Nov 2018 17:55:17 -0500 Received: by mail-pl1-f196.google.com with SMTP id x21-v6so13767401pln.9; Mon, 26 Nov 2018 04:01:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=otYbq0C9LVqp27elVROsGPtmHiho10hG3fe3tncFiVU=; b=OIys24FNf70xWYrzu/YZdIPresKoHAK37iPkHMg2p9DZA94CTZL3QIUC5D0U1P8jE+ vBs9iEhHTArO651EfqLzKW5YnEy88W8oVJmMWSOpzEhKQczUnen/ihCsw5gWdDgELvIx l7HDQ6fCZnuVWa0SmNm91POx1bQqWCsIJR6s5Q4fkXR94KxDochfmywX//q2x+zwGFjr E6QgkRpFHRhza2hx6hhe8vq5xGzVorKCNf1wKzyYl3hLPOGrdty7JVhVSbuL3LBkEPP0 8FdS5LYSF5zYvBBUN2kKaH33P2YpvxMenTnI9Xe607DUjzjl0dMorwMqp9hy4+E37kQe Gw2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=otYbq0C9LVqp27elVROsGPtmHiho10hG3fe3tncFiVU=; b=RlDPrf81adb+OC0K+s0Fw4X3uP/lGiGzYtqQuA1YGwLOwndLpIdeD+MtfXkWTWCPnt lTJ4rB1SrjRqRRVr18w5Yl5Z0M+AkpltKqlBJn+ny44QFMdtceaUWsFognYOd+NLmUgy f1/n0ilyX5jKcHGyqUTbkKl8xCtqEa4HsamYelKEXxv7IuAa8Mvpq6RVssKcLTQIM++v K9vW+d0zv5c8lFX430PLmJmNKjmFJ0b1AOuKlD0641cwB+0+ErqUjJ9fMUQPXd3tB6CC UcwtszHkFJP9iKf8WrJbF+uPho2wfDnYL4gylUPI4y2o0xE7iXm9EpHAYEgzt0fED4Lj 4sUA== X-Gm-Message-State: AA+aEWaGzL007nrqBf57IXNWB8pKzVKVa61XZt/dPQibSAHOpXgoqMsa ExadIXr7dKnp2yZe6cZg3ttBI627 X-Received: by 2002:a17:902:e085:: with SMTP id cb5mr27122536plb.24.1543233682079; Mon, 26 Nov 2018 04:01:22 -0800 (PST) Received: from localhost.localdomain ([125.29.25.186]) by smtp.gmail.com with ESMTPSA id h64sm146219pfj.186.2018.11.26.04.01.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 26 Nov 2018 04:01:21 -0800 (PST) From: frowand.list@gmail.com To: Rob Herring Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Julia Lawall Subject: [PATCH] of: add dtc annotations functionality to dtx_diff Date: Mon, 26 Nov 2018 04:01:09 -0800 Message-Id: <1543233669-8696-1-git-send-email-frowand.list@gmail.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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