Devicetree
 help / color / mirror / Atom feed
From: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
To: David Gibson <david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org>
Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
Subject: Re: Allow dtc to decompile device tre blobs in hexdump format
Date: Sun, 4 Apr 2010 16:01:24 -0600	[thread overview]
Message-ID: <y2yfa686aa41004041501id8fb3268n72e31151055cb970@mail.gmail.com> (raw)
In-Reply-To: <20100404211153.GC27285@yookeroo>

On Sun, Apr 4, 2010 at 3:11 PM, David Gibson
<david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org> wrote:
> On Sun, Apr 04, 2010 at 12:30:15AM -0600, Grant Likely wrote:
>> On Sat, Apr 3, 2010 at 10:22 PM, David Gibson
>> <david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org> wrote:
>> > When debugging handoffs between different boot stages which use
>> > flattened device trees to communicate, it's often useful to dump the
>> > device tree blob being passed and use dtc to decompile it to something
>> > readable.  However, with some debugging tools it's possible to perform
>> > a hex memory dump of the device tree, but it's awkward or impossible
>> > to directly dump the memory as a binary blob.
[...]
>>
>> Does it really make sense to build marshaling tools into dtc itself?
>
> Well.. is it essential that dtc do this?  Clearly not.  Is it a
> sufficient convenience that it's worth it?  Maybe.
>
>> I think it would make more sense to keep transformation tools
>> independent.  ie. what if I have srecord format?  or intel hex?
>
> If they're a) sufficiently widely used, b) not to hard to implement
> and c) there aren't widely used existing conversion tools then I would
> have no problem with adding support for such formats to.
>
>> A
>> trivial python or perl script would do the job for raw hex.
>
> I've written that trivial python or perl script too darn many times,
> and I'm sick of it.  I can't be the only one.

Oh, I agree.  I don't like reimplementing tools over and over again
either.  What I'm saying is rather than increasing the complexity of
the core dtc codebase, make it a separate script and store it inside
the dtc repo so it is available to all who need it.

>>  The
>> ascii2binary tool should also work.  Also, objcopy handles
>> srecord/ihex conversion beautifully.
>
> Ah, I wasn't previously aware of ascii2binary.  If it's flexible
> enough, that might well undermine the justification for this patch.

:-)

g.

      reply	other threads:[~2010-04-04 22:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-04  4:22 Allow dtc to decompile device tre blobs in hexdump format David Gibson
2010-04-04  6:30 ` Grant Likely
     [not found]   ` <y2vfa686aa41004032330xa771e6d5tdc8550fb9d451433-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-04-04 21:11     ` David Gibson
2010-04-04 22:01       ` Grant Likely [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=y2yfa686aa41004041501id8fb3268n72e31151055cb970@mail.gmail.com \
    --to=grant.likely-s3s/wqlpoipyb63q8fvjnq@public.gmane.org \
    --cc=david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org \
    --cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox