From: Simon Glass <sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
To: Devicetree Compiler
<devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Cc: Jon Loeliger <jdl-CYoMK+44s/E@public.gmane.org>,
David Gibson
<david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org>,
Simon Glass <sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
Subject: [RESEND PATCH v3 2/3] Add documentation for fdtget/put
Date: Sat, 22 Mar 2014 09:07:15 -0600 [thread overview]
Message-ID: <1395500836-12735-3-git-send-email-sjg@chromium.org> (raw)
In-Reply-To: <1395500836-12735-1-git-send-email-sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
The other tools have documentation so it seems reasonable to add something
here.
Signed-off-by: Simon Glass <sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
---
Changes in v3: None
Changes in v2: None
Documentation/manual.txt | 38 ++++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)
diff --git a/Documentation/manual.txt b/Documentation/manual.txt
index 65c8540..5f02426 100644
--- a/Documentation/manual.txt
+++ b/Documentation/manual.txt
@@ -658,3 +658,41 @@ The fdtdump program prints a readable version of a flat device tree file.
The syntax of the fdtdump command line is:
fdtdump <DTB-file-name>
+
+
+3) fdtget -- Get individual properties and lists from a Device Tree
+
+Ths fdtget program allows you to extract properties from nodes, and also
+list nodes and properties.
+
+The syntax of the fdtget commandline is described in the help (fdtget -h).
+Common uses are:
+
+ fdtget -ts <DTB-file-name> /node compatible
+ - Read the compatible string of a node. The -ts is optional since
+ fdtget will normally guess the type correctly.
+
+ fdtget -bx <DTB-file-name> /node bytes
+ - Read the bytes in a property and output in hex. The 'b' prefix
+ forces byte output, since otherwise fdtget will output in 32-bit
+ or 16-bit words if the property length is so-aligned.
+
+ fdtget -p <DTB-file-name> /node
+ - List the properties in a node
+
+ fdtget -l <DTB-file-name> /
+ - List the subnodes for a node (here, the root node)
+
+You can use -d to provide a default value for when the property does not
+exist.
+
+
+4) fdtput -- Write individual properties to a Device Tree
+
+Ths fdtput program allows you to write properties to nodes.
+
+The syntax of the fdtput commandline is described in the help (fdtput -h) and
+the type options are the same as fdtget. You can use -c to create a node if
+it does not exist already, and -p to create all required nodes (like
+'mkdir -p' does with directories). Unfortunately fdtput does not support
+deleting nodes or properties.
--
1.9.1.423.g4596e3a
--
To unsubscribe from this list: send the line "unsubscribe devicetree-compiler" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2014-03-22 15:07 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-22 15:07 [RESEND PATCH v3 0/3] Introduce fdtgrep for subsetting and hashing FDTs Simon Glass
[not found] ` <1395500836-12735-1-git-send-email-sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2014-03-22 15:07 ` [RESEND PATCH v3 1/3] libfdt: Add function to find regions in an FDT Simon Glass
[not found] ` <1395500836-12735-2-git-send-email-sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2014-05-01 16:13 ` Simon Glass
[not found] ` <CAPnjgZ0ehgSd1WprpMd1ZY=LaZaKkBG3MaNPV5ja27Q2p12WvA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-05-02 5:40 ` David Gibson
[not found] ` <20140502054014.GF6035-1s0os16eZneny3qCrzbmXA@public.gmane.org>
2014-06-03 3:12 ` Simon Glass
[not found] ` <CAPnjgZ2OHco3GjH_rPC+7Fu36QqBK2_sWvcaF1WOWFpBNkZTcQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-06-05 14:12 ` David Gibson
[not found] ` <20140605141236.GA25412-RXTfZT5YzpxwFLYp8hBm2A@public.gmane.org>
2015-05-07 1:08 ` Simon Glass
2014-03-22 15:07 ` Simon Glass [this message]
2014-03-22 15:07 ` [RESEND PATCH v3 3/3] Add fdtgrep to grep and subset FDTs Simon Glass
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=1395500836-12735-3-git-send-email-sjg@chromium.org \
--to=sjg-f7+t8e8rja9g9huczpvpmw@public.gmane.org \
--cc=david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org \
--cc=devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=jdl-CYoMK+44s/E@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;
as well as URLs for NNTP newsgroup(s).