diff options
author | Simon Glass <sjg@chromium.org> | 2012-01-21 10:14:47 -0800 |
---|---|---|
committer | Jon Loeliger <jdl@jdl.com> | 2012-01-21 15:08:36 -0600 |
commit | 68d057f20d7c3a93b441d2892c4749392bc83b45 (patch) | |
tree | 7d7a59ced649f453898a79ae8ee17f9bc253a30c /Makefile | |
parent | 69df9f0de25db1c37970850115cdf48335d41802 (diff) | |
download | dtc-68d057f20d7c3a93b441d2892c4749392bc83b45.zip dtc-68d057f20d7c3a93b441d2892c4749392bc83b45.tar.gz dtc-68d057f20d7c3a93b441d2892c4749392bc83b45.tar.bz2 |
Add fdtget utility to read property values from a device tree
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 <sjg@chromium.org>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -110,6 +110,7 @@ include Makefile.utils BIN += convert-dtsv0 BIN += dtc BIN += fdtdump +BIN += fdtget SCRIPTS = dtdiff @@ -120,6 +121,7 @@ ifneq ($(DEPTARGETS),) -include $(DTC_OBJS:%.o=%.d) -include $(CONVERT_OBJS:%.o=%.d) -include $(FDTDUMP_OBJS:%.o=%.d) +-include $(FDTGET_OBJS:%.o=%.d) endif @@ -180,6 +182,8 @@ convert-dtsv0: $(CONVERT_OBJS) fdtdump: $(FDTDUMP_OBJS) +fdtget: $(FDTGET_OBJS) $(LIBFDT_archive) + # # Testsuite rules |