Skip to content

Commit cbe826b

Browse files
committed
kbuild: determine base DTB by suffix
When using the -dtbs syntax, you need to list the base first, as follows: foo-dtbs := foo_base.dtb foo_overlay1.dtbo foo_overlay2.dtbo dtb-y := foo.dtb You cannot do this arrangement: foo-dtbs := foo_overlay1.dtbo foo_overlay2.dtbo foo_base.dtb This restriction comes from $(firstword ...) in the current implementation, but it is unneeded to rely on the order in the -dtbs syntax. Instead, you can simply determine the base by the suffix because the base (*.dtb) and overlays (*.dtbo) use different suffixes. Signed-off-by: Masahiro Yamada <[email protected]> Reviewed-by: Nicolas Schier <[email protected]>
1 parent 53243e0 commit cbe826b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/Makefile.lib

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ dtb-$(CONFIG_OF_ALL_DTBS) += $(dtb-)
8383
multi-dtb-y := $(call multi-search, $(dtb-y), .dtb, -dtbs)
8484
# Primitive DTB compiled from *.dts
8585
real-dtb-y := $(call real-search, $(dtb-y), .dtb, -dtbs)
86-
# Base DTB that overlay is applied onto (each first word of $(*-dtbs) expansion)
87-
base-dtb-y := $(foreach m, $(multi-dtb-y), $(firstword $(call suffix-search, $m, .dtb, -dtbs)))
86+
# Base DTB that overlay is applied onto
87+
base-dtb-y := $(filter %.dtb, $(call real-search, $(multi-dtb-y), .dtb, -dtbs))
8888

8989
always-y += $(dtb-y)
9090

0 commit comments

Comments
 (0)