dtc: mkimage: Add the possibility to specify DTC
authorEmmanuel Vadot <manu@bidouilliste.com>
Sun, 25 Jun 2017 07:43:33 +0000 (09:43 +0200)
committerTom Rini <trini@konsulko.com>
Sat, 22 Jul 2017 19:36:19 +0000 (15:36 -0400)
FreeBSD recently switch to it's BSDL dtc. While it support most of the
features of the GPL one it still lacks the incbin directive.
Add the possibility to specify which dtc we want to use for compiling dts
and generating fit image.

Signed-off-by: Emmanuel Vadot <manu@bidouilliste.com>
Acked-by: Simon Glass <sjg@chromium.org>
Makefile
tools/Makefile
tools/mkimage.h

index 452596485dd34269be12b593381be1455682001f..a5f56880e36d3c4a8bc12476fafd6bd6cfb50b91 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -349,7 +349,7 @@ OBJDUMP             = $(CROSS_COMPILE)objdump
 AWK            = awk
 PERL           = perl
 PYTHON         ?= python
-DTC            = dtc
+DTC            ?= dtc
 CHECK          = sparse
 
 CHECKFLAGS     := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \
index cb1683e1539ceded1d4c58939b7bb598046fdf7a..62a7921e43a068bd1fa2fde9eaa97430c92e2e11 100644 (file)
@@ -175,6 +175,8 @@ HOSTCFLAGS_rsa-sign.o += -Wno-deprecated-declarations
 endif
 endif
 
+HOSTCFLAGS_fit_image.o += -DMKIMAGE_DTC=\"$(DTC)\"
+
 HOSTLOADLIBES_dumpimage := $(HOSTLOADLIBES_mkimage)
 HOSTLOADLIBES_fit_info := $(HOSTLOADLIBES_mkimage)
 HOSTLOADLIBES_fit_check_sign := $(HOSTLOADLIBES_mkimage)
index 3f369b748ed19ed4896a0a529f86052717080c52..baee8666658f8e82a9d461aebc178b28166ca482 100644 (file)
@@ -44,6 +44,5 @@ static inline ulong map_to_sysmem(void *ptr)
 #define MKIMAGE_MAX_TMPFILE_LEN                256
 #define MKIMAGE_DEFAULT_DTC_OPTIONS    "-I dts -O dtb -p 500"
 #define MKIMAGE_MAX_DTC_CMDLINE_LEN    512
-#define MKIMAGE_DTC                    "dtc"   /* assume dtc is in $PATH */
 
 #endif /* _MKIIMAGE_H_ */