summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2008-05-15 16:39:12 +1000
committerJon Loeliger <jdl@jdl.com>2008-05-19 21:18:47 -0500
commita84c065f44ea0f4dcd75ae4ecb8dd1e25a5f87f7 (patch)
tree9ef75959aa688507c5a02448682a89c6339257f9 /Makefile
parent548767f42eb00a2bac6f2a1361b7fd49f7b76908 (diff)
downloaddtc-a84c065f44ea0f4dcd75ae4ecb8dd1e25a5f87f7.tar.gz
dtc: Add program to convert dts files from v0 to v1
This patch adds a new utility program, convert-dtsv0, to the dtc sources. This program will convert dts files from v0 to v1, preserving comments and spacing. It also includes some heuristics to guess an appropriate base to use in the v1 output (so it will use hex for the contents of reg properties and decimal for clock-frequency properties, for example). They're limited and imperfect, but not terrible. The guts of the converter program is a modified version of the lexer from dtc itself. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 7 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index e75acae..a8f02cb 100644
--- a/Makefile
+++ b/Makefile
@@ -46,7 +46,7 @@ else
DEPTARGETS = $(filter-out $(NODEPTARGETS),$(MAKECMDGOALS))
endif
-all: dtc ftdump libfdt
+all: dtc ftdump convert-dtsv0 libfdt
install: all
@$(VECHO) INSTALL
@@ -121,12 +121,16 @@ ifneq ($(DEPTARGETS),)
-include $(DTC_OBJS:%.o=%.d)
endif
#
-# Rules for ftdump
+# Rules for ftdump & convert-dtsv0
#
-BIN += ftdump
+BIN += ftdump convert-dtsv0
ftdump: ftdump.o
+convert-dtsv0: convert-dtsv0-lexer.lex.o srcpos.o
+ @$(VECHO) LD $@
+ $(LINK.c) -o $@ $^
+
ifneq ($(DEPTARGETS),)
-include ftdump.d
endif