1) Remove the double parentheses around two comparisons in checks.c.
The OSX LLVM-based C compiler warns about them.
2) Put an explicit "=" in the TN() macro, in accordance with c99.
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
When hacking raw fdt files, it's useful to know the actual offsets into
the file each node appears. Add a --debug mode that includes this.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Now that all utils have converted to the new usage framework, we can
rename to just plain "usage()" and avoid naming conflicts.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Often times, fdts get embedded in other larger files. Rather than force
people to `dd` the blob out themselves, make the fdtdump file smarter.
It can now scan the blob looking for the fdt magic. Once locate, it does
a little validation on the main struct to make sure we didn't hit random
binary data.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This starts a new usage framework and then cuts fdtdump over to it.
Now we can do `fdtdump -h` and get something useful back.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
The function that prints a property can be useful to other programs,
so move it into util.
Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
in order to get the upcoming fdt type definitions.
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Device tree can store multiple strings in a single property.
We didn't handle that case properly.
Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
The freetype package already installs a binary named "ftdump", so the dtc
package conflicts with that. So rename the newer dtc tool to "fdtdump".
This even makes a bit more sense:
ftdump: [F]lat device [T]ree [dump]
fdtdump: [F]lat [D]evice [T]ree [dump]
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: David Gibson <david@gibson.dropbear.id.au>