diff options
author | Masahiro Yamada <masahiroy@kernel.org> | 2023-12-03 17:05:48 +0900 |
---|---|---|
committer | Masahiro Yamada <masahiroy@kernel.org> | 2023-12-10 15:34:37 +0900 |
commit | cbe826b058bb3547f195144fc018957871568320 (patch) | |
tree | 68659e094ed29dd10699b32eaf7740bf54ec0be0 /scripts/Makefile.lib | |
parent | 53243e098397185d910c10207bc3c0c26f072383 (diff) |
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 <masahiroy@kernel.org>
Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>
Diffstat (limited to 'scripts/Makefile.lib')
-rw-r--r-- | scripts/Makefile.lib | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 1a965fe68e01..cd5b181060f1 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -83,8 +83,8 @@ dtb-$(CONFIG_OF_ALL_DTBS) += $(dtb-) multi-dtb-y := $(call multi-search, $(dtb-y), .dtb, -dtbs) # Primitive DTB compiled from *.dts real-dtb-y := $(call real-search, $(dtb-y), .dtb, -dtbs) -# Base DTB that overlay is applied onto (each first word of $(*-dtbs) expansion) -base-dtb-y := $(foreach m, $(multi-dtb-y), $(firstword $(call suffix-search, $m, .dtb, -dtbs))) +# Base DTB that overlay is applied onto +base-dtb-y := $(filter %.dtb, $(call real-search, $(multi-dtb-y), .dtb, -dtbs)) always-y += $(dtb-y) |