Skip to contentSkip to conversation

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

PATCH In review Tom Rini 3 participants 4 messages May 24, 2017 – Jun 6, 2017 Kbuild

lore
Share & tools
lore

Tom Rini

author
#0 lore raw

PATCH 1/1 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.

---
 scripts/Makefile.lib | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)
scripts/Makefile.lib +5 -7
index 774aa89a3fe6..80ddb08474cd 100644
@@ -164,14 +164,12 @@ cpp_flags      = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(UBOOTINCLUDE)     \
 
 ld_flags       = $(LDFLAGS) $(ldflags-y)
 
-dts_dir = $(srctree)/arch/$(ARCH)/dts
-
 # Try these files in order to find the U-Boot-specific .dtsi include file
-u_boot_dtsi_options = $(wildcard $(dts_dir)/$(basename $(notdir $<))-u-boot.dtsi) \
-	$(wildcard $(dts_dir)/$(subst $\",,$(CONFIG_SYS_SOC))-u-boot.dtsi) \
-	$(wildcard $(dts_dir)/$(subst $\",,$(CONFIG_SYS_CPU))-u-boot.dtsi) \
-	$(wildcard $(dts_dir)/$(subst $\",,$(CONFIG_SYS_VENDOR))-u-boot.dtsi) \
-	$(wildcard $(dts_dir)/u-boot.dtsi)
+u_boot_dtsi_options = $(wildcard $(dir $<)$(basename $(notdir $<))-u-boot.dtsi) \
+	$(wildcard $(dir $<)$(subst $\",,$(CONFIG_SYS_SOC))-u-boot.dtsi) \
+	$(wildcard $(dir $<)$(subst $\",,$(CONFIG_SYS_CPU))-u-boot.dtsi) \
+	$(wildcard $(dir $<)$(subst $\",,$(CONFIG_SYS_VENDOR))-u-boot.dtsi) \
+	$(wildcard $(dir $<)u-boot.dtsi)
 
 # Uncomment for debugging
 # $(warning u_boot_dtsi_options: $(u_boot_dtsi_options))
Signature · 1 line
1.9.1
#1 lore raw

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

Hi Tom,

Quoted 5 lines · Tom Rini

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.

Verified that it fixes the build breakage.

Quoted 31 lines
---
 scripts/Makefile.lib | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)
scripts/Makefile.lib +5 -7
index 774aa89a3fe6..80ddb08474cd 100644
@@ -164,14 +164,12 @@ cpp_flags      = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(UBOOTINCLUDE)     \
 
 ld_flags       = $(LDFLAGS) $(ldflags-y)
 
-dts_dir = $(srctree)/arch/$(ARCH)/dts
-
 # Try these files in order to find the U-Boot-specific .dtsi include file
-u_boot_dtsi_options = $(wildcard $(dts_dir)/$(basename $(notdir $<))-u-boot.dtsi) \
-	$(wildcard $(dts_dir)/$(subst $\",,$(CONFIG_SYS_SOC))-u-boot.dtsi) \
-	$(wildcard $(dts_dir)/$(subst $\",,$(CONFIG_SYS_CPU))-u-boot.dtsi) \
-	$(wildcard $(dts_dir)/$(subst $\",,$(CONFIG_SYS_VENDOR))-u-boot.dtsi) \
-	$(wildcard $(dts_dir)/u-boot.dtsi)
+u_boot_dtsi_options = $(wildcard $(dir $<)$(basename $(notdir $<))-u-boot.dtsi) \
+	$(wildcard $(dir $<)$(subst $\",,$(CONFIG_SYS_SOC))-u-boot.dtsi) \
+	$(wildcard $(dir $<)$(subst $\",,$(CONFIG_SYS_CPU))-u-boot.dtsi) \
+	$(wildcard $(dir $<)$(subst $\",,$(CONFIG_SYS_VENDOR))-u-boot.dtsi) \
+	$(wildcard $(dir $<)u-boot.dtsi)
 
 # Uncomment for debugging
 # $(warning u_boot_dtsi_options: $(u_boot_dtsi_options))
#2 lore raw

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

In reply to Tom Rini
Quoted 11 lines · Tom Rini

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.

---
 scripts/Makefile.lib | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)
author
#3 lore raw
In reply to Tom Rini
Quoted 10 lines · Tom Rini

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.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/0ea07f8f/attachment.sig>