diff mbox

[U-Boot] dtc: mkimage: Add the possibility to specify DTC

Message ID 20170625074333.58005-1-manu@bidouilliste.com
State Accepted
Commit 47a52cd1e4c2b1e5f205e337bf3e1ae83993b5a4
Delegated to: Tom Rini
Headers show

Commit Message

Emmanuel Vadot June 25, 2017, 7:43 a.m. UTC
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>
---
 Makefile        | 2 +-
 tools/Makefile  | 2 ++
 tools/mkimage.h | 1 -
 3 files changed, 3 insertions(+), 2 deletions(-)

Comments

Simon Glass July 7, 2017, 3:57 a.m. UTC | #1
On 25 June 2017 at 01:43, Emmanuel Vadot <manu@bidouilliste.com> wrote:
> 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>
> ---
>  Makefile        | 2 +-
>  tools/Makefile  | 2 ++
>  tools/mkimage.h | 1 -
>  3 files changed, 3 insertions(+), 2 deletions(-)
>

Acked-by: Simon Glass <sjg@chromium.org>
Tom Rini July 25, 2017, 12:42 a.m. UTC | #2
On Sun, Jun 25, 2017 at 09:43:33AM +0200, Emmanuel Vadot wrote:

> 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>

Applied to u-boot/master, thanks!
diff mbox

Patch

diff --git a/Makefile b/Makefile
index 2385285bb8..358f062f83 100644
--- 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__ \
diff --git a/tools/Makefile b/tools/Makefile
index cb1683e153..62a7921e43 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -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)
diff --git a/tools/mkimage.h b/tools/mkimage.h
index 3f369b748e..baee866665 100644
--- a/tools/mkimage.h
+++ b/tools/mkimage.h
@@ -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_ */