From 37c0b6a0916c31a5eae0a9ddfcc5d0b8fb4569c6 Mon Sep 17 00:00:00 2001 From: David Gibson Date: Wed, 10 Nov 2010 09:51:09 +1100 Subject: dtc: Add code to make diffing trees easier This patch adds a "dtdiff" script to do a useful form diff of two device trees. This automatically converts the tree to dts form (if it's not already) and uses a new "-s" option in dtc to "sort" the tree. That is, it sorts the reserve entries, it sorts the properties within each node by name, and it sorts nodes by name within their parent. This gives a pretty sensible diff between the trees, which will ignore semantically null internal rearrangements (directly diffing the dts files can give a lot of noise due to the order changes). Signed-off-by: David Gibson --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index af467ef..a07648c 100644 --- a/Makefile +++ b/Makefile @@ -111,6 +111,7 @@ BIN += convert-dtsv0 BIN += dtc BIN += ftdump +SCRIPTS = dtdiff all: $(BIN) libfdt @@ -155,10 +156,10 @@ endif # intermediate target and building them again "for real" .SECONDARY: $(DTC_GEN_SRCS) $(CONVERT_GEN_SRCS) -install: all +install: all $(SCRIPTS) @$(VECHO) INSTALL $(INSTALL) -d $(DESTDIR)$(BINDIR) - $(INSTALL) $(BIN) $(DESTDIR)$(BINDIR) + $(INSTALL) $(BIN) $(SCRIPTS) $(DESTDIR)$(BINDIR) $(INSTALL) -d $(DESTDIR)$(LIBDIR) $(INSTALL) $(LIBFDT_lib) $(DESTDIR)$(LIBDIR) $(INSTALL) -m 644 $(LIBFDT_archive) $(DESTDIR)$(LIBDIR) -- cgit v1.2.1