diff mbox

kbuild: Allow using host dtc instead of kernel's copy

Message ID 1455230079-26931-1-git-send-email-robh@kernel.org
State Accepted
Commit 6b22b3d1614af1a775f2ef006009f15077592c9c
Headers show

Commit Message

Rob Herring (Arm) Feb. 11, 2016, 10:34 p.m. UTC
Development of dtc happens in its own upstream repository, but testing
dtc changes against the kernel tree is useful. Change dtc to a variable
that users can override.

Signed-off-by: Rob Herring <robh@kernel.org>

Cc: Michal Marek <mmarek@suse.com>
Cc: linux-kbuild@vger.kernel.org
---
 scripts/Makefile.lib | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

-- 
2.5.0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Rob Herring (Arm) Feb. 24, 2016, 1:36 a.m. UTC | #1
On Thu, Feb 11, 2016 at 4:34 PM, Rob Herring <robh@kernel.org> wrote:
> Development of dtc happens in its own upstream repository, but testing

> dtc changes against the kernel tree is useful. Change dtc to a variable

> that users can override.

>

> Signed-off-by: Rob Herring <robh@kernel.org>

> Cc: Michal Marek <mmarek@suse.com>

> Cc: linux-kbuild@vger.kernel.org


Applied to DT tree.

> ---

>  scripts/Makefile.lib | 3 ++-

>  1 file changed, 2 insertions(+), 1 deletion(-)

>

> diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib

> index 79e8661..ceceb53 100644

> --- a/scripts/Makefile.lib

> +++ b/scripts/Makefile.lib

> @@ -262,6 +262,7 @@ cmd_gzip = (cat $(filter-out FORCE,$^) | gzip -n -f -9 > $@) || \

>

>  # DTC

>  # ---------------------------------------------------------------------------

> +DTC ?= $(objtree)/scripts/dtc/dtc

>

>  # Generate an assembly file to wrap the output of the device tree compiler

>  quiet_cmd_dt_S_dtb= DTB     $@

> @@ -284,7 +285,7 @@ $(obj)/%.dtb.S: $(obj)/%.dtb

>  quiet_cmd_dtc = DTC     $@

>  cmd_dtc = mkdir -p $(dir ${dtc-tmp}) ; \

>         $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \

> -       $(objtree)/scripts/dtc/dtc -O dtb -o $@ -b 0 \

> +       $(DTC) -O dtb -o $@ -b 0 \

>                 -i $(dir $<) $(DTC_FLAGS) \

>                 -d $(depfile).dtc.tmp $(dtc-tmp) ; \

>         cat $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile)

> --

> 2.5.0

>

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 79e8661..ceceb53 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -262,6 +262,7 @@  cmd_gzip = (cat $(filter-out FORCE,$^) | gzip -n -f -9 > $@) || \
 
 # DTC
 # ---------------------------------------------------------------------------
+DTC ?= $(objtree)/scripts/dtc/dtc
 
 # Generate an assembly file to wrap the output of the device tree compiler
 quiet_cmd_dt_S_dtb= DTB     $@
@@ -284,7 +285,7 @@  $(obj)/%.dtb.S: $(obj)/%.dtb
 quiet_cmd_dtc = DTC     $@
 cmd_dtc = mkdir -p $(dir ${dtc-tmp}) ; \
 	$(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \
-	$(objtree)/scripts/dtc/dtc -O dtb -o $@ -b 0 \
+	$(DTC) -O dtb -o $@ -b 0 \
 		-i $(dir $<) $(DTC_FLAGS) \
 		-d $(depfile).dtc.tmp $(dtc-tmp) ; \
 	cat $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile)