aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthijs Kooijman <matthijs@stdin.nl>2013-05-08 06:59:04 -0400
committerMichal Marek <mmarek@suse.cz>2013-05-23 04:14:34 -0400
commitad06156876c0e55a01e13e1f2dd5c7f9262b1dfa (patch)
tree772848743c8a7fc12fee4f40e7a3f994469bc7f1
parentf66ba560943ae21f5d1e505bad0a3591823b2b37 (diff)
kbuild: Don't assume dts files live in arch/*/boot/dts
In commit b40b25ff (kbuild: always run gcc -E on *.dts, remove cmd_dtc_cpp), dts building was changed to always use the C preprocessor. This meant that the .dts file passed to dtc is not the original, but the preprocessed one. When compiling with a separate build directory (i.e., with O=), this preprocessed file will not live in the same directory as the original. When the .dts file includes .dtsi files, dtc will look for them in the build directory, not in the source directory and compilation will fail. The commit referenced above tried to fix this by passing arch/*/boot/dts as an include path to dtc. However, for mips, the .dts files are not in this directory, so dts compilation on mips breaks for some targets. Instead of hardcoding this particular include path, this commit just uses the directory of the .dts file that is being compiled, which effectively restores the previous behaviour wrt includes. For most .dts files, this path is just the same as the previous hardcoded arch/*/boot/dts path. This was tested on a mips (rt3052) and an arm (bcm2835) target. Signed-off-by: Matthijs Kooijman <matthijs@stdin.nl> Reviewed-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
-rw-r--r--scripts/Makefile.lib2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 51bb3de680b6..8337663aa298 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -264,7 +264,7 @@ $(obj)/%.dtb.S: $(obj)/%.dtb
264quiet_cmd_dtc = DTC $@ 264quiet_cmd_dtc = DTC $@
265cmd_dtc = $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \ 265cmd_dtc = $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \
266 $(objtree)/scripts/dtc/dtc -O dtb -o $@ -b 0 \ 266 $(objtree)/scripts/dtc/dtc -O dtb -o $@ -b 0 \
267 -i $(srctree)/arch/$(SRCARCH)/boot/dts $(DTC_FLAGS) \ 267 -i $(dir $<) $(DTC_FLAGS) \
268 -d $(depfile).dtc $(dtc-tmp) ; \ 268 -d $(depfile).dtc $(dtc-tmp) ; \
269 cat $(depfile).pre $(depfile).dtc > $(depfile) 269 cat $(depfile).pre $(depfile).dtc > $(depfile)
270 270