Thread (1 message) 1 message, 1 author, 2011-12-16

Re: [PATCH v5 4/5] Add fdtget utility to read property values from a device tree

From: Simon Glass <hidden>
Date: 2011-12-16 01:37:51

Possibly related (same subject, not in this thread)

Hi,

On Thu, Sep 22, 2011 at 6:20 PM, David Gibson
[off-list ref] wrote:
On Thu, Sep 22, 2011 at 10:11:05AM -0700, Simon Glass wrote:
quoted
This simply utility makes it easy for scripts to read values from the device
tree. It is written in C and uses the same libfdt as the rest of the dtc
package.

What is it for:
- Reading fdt values from scripts
- Extracting fdt information within build systems
- Looking at particular values without having to dump the entire tree

To use it, specify the fdt binary file on command line followed by a list of
node, property pairs. The utility then looks up each node, finds the property
and displays the value.

Each value is printed on a new line.

fdtget tries to guess the type of each property based on its contents. This
is not always reliable, so you can use the -t option to force fdtget to decode
the value as a string, or byte, etc.

To read from stdin, use - as the file.

Usage:
      fdtget <options> <dt file> [<node> <property>]...
Options:
      -t <type>       Type of data
      -h              Print this help

<type>        s=string, i=int, u=unsigned, x=hex
      Optional modifier prefix:
              hh or b=byte, h=2 byte, l=4 byte (default)

Signed-off-by: Simon Glass <redacted>
Acked-by: David Gibson <redacted>
Has this been applied? I cannot see it in the repo.

Regards
Simon
--
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help