diff options
author | Michael Olbrich <m.olbrich@pengutronix.de> | 2014-06-09 17:32:04 +0200 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2014-06-10 20:17:47 +0200 |
commit | b2ec1304d629ed57a9ae77363fa888a12abb30b8 (patch) | |
tree | efd59854bf749402c118a8597a7e4ca5ce88927f /rules/dtc.make | |
parent | 41e7c44df6bf631fbc3e722791e5e449ffff3bc7 (diff) | |
download | ptxdist-b2ec1304d629ed57a9ae77363fa888a12abb30b8.tar.gz ptxdist-b2ec1304d629ed57a9ae77363fa888a12abb30b8.tar.xz |
dtc: Seperate path and filename of dts
Creating multiple device trees result in a quite long DTC_OFTREE_DTS
variable. Splitting it into a path variable and file variable makes it
more handy.
The path can be a ':' separated list to allow device trees from multiple
directories.
For backwards compatibility, the path is only used for relative file
names.
Based on a patch by Teresa Gámez <t.gamez@phytec.de>
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'rules/dtc.make')
-rw-r--r-- | rules/dtc.make | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/rules/dtc.make b/rules/dtc.make index da3697160..4176a579c 100644 --- a/rules/dtc.make +++ b/rules/dtc.make @@ -22,16 +22,24 @@ DTC_VERSION := 1.0.0 # ---------------------------------------------------------------------------- ptx/dtb = $(notdir $(basename $(strip $(1)))).dtb +ptx/dts = $(shell p=$(PTXCONF_DTC_OFTREE_DTS_PATH) ptxd_in_path p "$(strip $(1))" && echo "$${ptxd_reply}") + +ifdef PTXCONF_DTC_OFTREE_DTS +DTC_OFTREE_DTS = $(foreach dts, $(call remove_quotes,$(PTXCONF_DTC_OFTREE_DTS)), \ + $(if $(filter /%,$(dts)),$(dts),$(call ptx/dts,$(dts)))) +endif %.dtb: TMP_DTS = $(STATEDIR)/$(notdir $<).tmp %.dtb: TMP_DEPS = $(PTXDIST_TEMPDIR)/dts.deps %.dtb: DEPS = $(STATEDIR)/dtc.$(notdir $<).deps %.dtb: - echo $(TMP_DTS) @$(call targetinfo) @if [ -z "$(strip $<)" ]; then \ ptxd_bailout "Device-tree for `ptxd_print_path '$@'` undefined!"; \ fi + @if [ ! -e "$(strip $<)" ]; then \ + ptxd_bailout "Device-tree '$<' not found!"; \ + fi @echo CPP `ptxd_print_path "$(TMP_DTS)"` @cpp \ -Wp,-MD,$(TMP_DEPS) \ |