Skip to contentSkip to conversation

scripts/Makefile.spl: Use 'sort' in SHRUNK_ARCH_DTB rule

PATCH In review Tom Rini 2 participants 3 messages Mar 19, 2024 – Apr 10, 2024 Kbuild

lore
Share & tools
lore

Tom Rini

author
#0 lore raw

PATCH 1/1 scripts/Makefile.spl: Use 'sort' in SHRUNK_ARCH_DTB rule

With configs such as "am64x_evm_a53" or "imx8mp_venice" which list
multiple device trees to build we get a warning such as:
scripts/Makefile.spl:578: target 'spl/dts/freescale/' given more than once in the same rule

If we sort this list first the warning goes away.

---
 scripts/Makefile.spl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/Makefile.spl +1 -1
index d074ba235006..60db38d5bddd 100644
@@ -575,7 +575,7 @@ endif
 
 SPL_OF_LIST_TARGETS = $(patsubst %,dts/%.dtb,$(subst ",,$(CONFIG_SPL_OF_LIST)))
 SHRUNK_ARCH_DTB = $(addprefix $(obj)/,$(SPL_OF_LIST_TARGETS))
-$(dir $(SHRUNK_ARCH_DTB)):
+$(sort $(dir $(SHRUNK_ARCH_DTB))):
 	$(shell [ -d $@ ] || mkdir -p $@)
 
 .SECONDEXPANSION:
Signature · 1 line
2.34.1
Tested-by on v1 1/1
#1 lore raw

út 19. 3. 2024 v 17:51 odesílatel Tom Rini <[email protected]> napsal:

Quoted 25 lines

With configs such as "am64x_evm_a53" or "imx8mp_venice" which list multiple device trees to build we get a warning such as:
scripts/Makefile.spl:578: target 'spl/dts/freescale/' given more than once in the same rule

If we sort this list first the warning goes away.

---
 scripts/Makefile.spl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/Makefile.spl +1 -1
index d074ba235006..60db38d5bddd 100644
@@ -575,7 +575,7 @@ endif
 
 SPL_OF_LIST_TARGETS = $(patsubst %,dts/%.dtb,$(subst
 ",,$(CONFIG_SPL_OF_LIST)))
 SHRUNK_ARCH_DTB = $(addprefix $(obj)/,$(SPL_OF_LIST_TARGETS))
-$(dir $(SHRUNK_ARCH_DTB)):
+$(sort $(dir $(SHRUNK_ARCH_DTB))):
        $(shell [ -d $@ ] || mkdir -p $@)
 
Quoted 5 lines

.SECONDEXPANSION:
--
2.34.1

The same issue also for zynqmp.

Thanks,
Michal

Signature · 5 lines
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Xilinx Microblaze
Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP ARM64 SoCs
U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP/Versal SoCs
author
#2 lore raw
In reply to Tom Rini
Quoted 8 lines · Tom Rini

With configs such as "am64x_evm_a53" or "imx8mp_venice" which list
multiple device trees to build we get a warning such as:
scripts/Makefile.spl:578: target 'spl/dts/freescale/' given more than once in the same rule

If we sort this list first the warning goes away.

[...]

Applied to u-boot/master, thanks!

Signature · 1 line
Tom