From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Subject: Re: [PATCH 2/3] fdtdump: Prettify output of properties Date: Thu, 15 Jun 2017 19:52:30 -0400 Message-ID: <20170615235230.GP10782@bill-the-cat> References: <1497452030-15588-1-git-send-email-pantelis.antoniou@konsulko.com> <1497452030-15588-3-git-send-email-pantelis.antoniou@konsulko.com> <20170614150639.GF2614@umbus> Mime-Version: 1.0 Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=vcXuMmWt/IVUOa03wVjLE8GV3rdc1sswrEO48l20gyg=; b=s+P2riePHbz9e6thT//BooL/V5Tq0N0vjkbqqzPaaD2zSlmtjGvHPL6XRw0JXsh176 8FiKghNIy9LC+HTl/rhJM+yA7YKiW3+qF8VDw0YnhbPKNynSwNwMW55aFuRCzCJEnHkb N1xdCJbGIVfQn+TzNWCF8TCo7EjJkaTudM3MA= Content-Disposition: inline In-Reply-To: <20170614150639.GF2614@umbus> Sender: devicetree-compiler-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: David Gibson Cc: Pantelis Antoniou , Nishanth Menon , Tero Kristo , Frank Rowand , Rob Herring , Simon Glass , Devicetree Compiler , devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org On Wed, Jun 14, 2017 at 11:06:39PM +0800, David Gibson wrote: > On Wed, Jun 14, 2017 at 05:53:49PM +0300, Pantelis Antoniou wrote: > > Dumping files with large properties results in output with > > arbitrary long lines. > > > > Original (manual line breaks inserted; it's a single long line): > > > > / { > > int = <0x00000001 0x00000024 0x00000004 0x00000000 \ > > 0x000502a4 0x000000df 0x00000003 0x13885783 0x13885783 \ > > 0x00000002 0x62797465 0x00000000 0x00000000 0x00000000 \ > > 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 \ > > 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000>; > > }; > > > > After prettification: > > > > / { > > int = <0x00000001 0x00000002 0x00000008 0x00000010 0x00000024 0x000000ab>, > > <0x00000001 0x00000017 0x00000004 0x00000038 0x00000007 0x00000009>, > > <0x00000000 0x00000068 0x00000214 0x0000b8d9 0x000502a4 0x00000001>, > > <0x00000004 0x0000002b 0x000000df 0x00000003 0x00000002 0x00000001>; > > }; > > > > There are two new options (-w/--width) and (-S/--shift). > > > > Width is the terminal width, shift is the amount of spaces each nest level > > increases by. > > > > Width by default is set to 80, and shift to 4. > > Nack. > > fdtdump is supposed to be a trivial debug tool. If you want to > decompile dtbs "for real" use dtc -I dtb -O dts. There's been times, entirely unrelated to what Pantelis is doing, where I've used fdtdump in production cases because I needed to whack a few things around. If it's just supposed to be a trivial debug tool, we've likely moved well beyond the point where we need to keep trivial tools around if they shouldn't be more widely used, IMHO. Swinging back around to what Pantelis is talking about, it would be kind of annoying, but we could probably integrate dtc into U-Boot like the kernel has. Is that where we're at then? Thanks! -- Tom