Commit 0f7faf03bf207ea0bcf91692be76a7103ddd4e2c

Authored by Tom Rini
1 parent 7a53a1a811

scripts/Makefile.lib: Only apply u-boot.dtsi files in the target directory

We only want to apply files such as 'omap5-u-boot.dtsi', which resides
in arch/arm/dts/ to other files in arch/arm/dts/ and not say
test/overlay/.  Rework the make logic to check for -u-boot.dtsi files in
the same directory as their target dts.

Cc: Simon Glass <sjg@chromium.org>
Reported-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Tested-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>

Showing 1 changed file with 5 additions and 7 deletions Side-by-side Diff

scripts/Makefile.lib
... ... @@ -164,14 +164,12 @@
164 164  
165 165 ld_flags = $(LDFLAGS) $(ldflags-y)
166 166  
167   -dts_dir = $(srctree)/arch/$(ARCH)/dts
168   -
169 167 # Try these files in order to find the U-Boot-specific .dtsi include file
170   -u_boot_dtsi_options = $(wildcard $(dts_dir)/$(basename $(notdir $<))-u-boot.dtsi) \
171   - $(wildcard $(dts_dir)/$(subst $\",,$(CONFIG_SYS_SOC))-u-boot.dtsi) \
172   - $(wildcard $(dts_dir)/$(subst $\",,$(CONFIG_SYS_CPU))-u-boot.dtsi) \
173   - $(wildcard $(dts_dir)/$(subst $\",,$(CONFIG_SYS_VENDOR))-u-boot.dtsi) \
174   - $(wildcard $(dts_dir)/u-boot.dtsi)
  168 +u_boot_dtsi_options = $(wildcard $(dir $<)$(basename $(notdir $<))-u-boot.dtsi) \
  169 + $(wildcard $(dir $<)$(subst $\",,$(CONFIG_SYS_SOC))-u-boot.dtsi) \
  170 + $(wildcard $(dir $<)$(subst $\",,$(CONFIG_SYS_CPU))-u-boot.dtsi) \
  171 + $(wildcard $(dir $<)$(subst $\",,$(CONFIG_SYS_VENDOR))-u-boot.dtsi) \
  172 + $(wildcard $(dir $<)u-boot.dtsi)
175 173  
176 174 # Uncomment for debugging
177 175 # $(warning u_boot_dtsi_options: $(u_boot_dtsi_options))