linux-next: manual merge of the devicetree tree with the kbuild tree

From: Stephen Rothwell
Date: Tue Jul 09 2024 - 00:27:51 EST


Hi all,

Today's linux-next merge of the devicetree tree got a conflict in:

scripts/Makefile.lib

between commit:

ab6aaea6835b ("kbuild: avoid build error when single DTB is turned into composite DTB")

from the kbuild tree and commit:

dd402cbd0afa ("kbuild: verify dtoverlay files against schema")

from the devicetree tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

--
Cheers,
Stephen Rothwell

diff --cc scripts/Makefile.lib
index 636119dc4403,29da0dc9776d..000000000000
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@@ -407,12 -407,15 +407,19 @@@ cmd_dtc = $(HOSTCC) -E $(dtc_cpp_flags
-d $(depfile).dtc.tmp $(dtc-tmp) ; \
cat $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile)

+# NOTE:
+# Do not replace $(filter %.dtb %.dtbo, $^) with $(real-prereqs). When a single
+# DTB is turned into a multi-blob DTB, $^ will contain header file dependencies
+# recorded in the .*.cmd file.
+ DT_CHECK_CMD = $(DT_CHECKER) $(DT_CHECKER_FLAGS) -u $(srctree)/$(DT_BINDING_DIR) -p $(DT_TMP_SCHEMA)
+
+ ifneq ($(CHECK_DTBS),)
+ quiet_cmd_fdtoverlay = DTOVLCH $@
- cmd_fdtoverlay = $(objtree)/scripts/dtc/fdtoverlay -o $@ -i $(real-prereqs) ; $(DT_CHECK_CMD) $@ || true
++ cmd_fdtoverlay = $(objtree)/scripts/dtc/fdtoverlay -o $@ -i $(filter %.dtb %.dtbo, $^) ; $(DT_CHECK_CMD) $@ || true
+ else
quiet_cmd_fdtoverlay = DTOVL $@
- cmd_fdtoverlay = $(objtree)/scripts/dtc/fdtoverlay -o $@ -i $(real-prereqs)
+ cmd_fdtoverlay = $(objtree)/scripts/dtc/fdtoverlay -o $@ -i $(filter %.dtb %.dtbo, $^)
+ endif

$(multi-dtb-y): FORCE
$(call if_changed,fdtoverlay)

Attachment: pgpfr0jSnRc0G.pgp
Description: OpenPGP digital signature