[PATCH v4 0/2] kbuild: Support directory targets for DTBs

From: Rob Herring (Arm)

Date: Fri Oct 16 2026 - 15:49:51 EST


This series adds support for using directory targets to build DTBs. This
is primarily useful for architectures with lots of vendor DTS
subdirectories.

v2 had some issues reported after I applied. In fixing David's issue,
that introduced random parallel build issues Arnd reported. I didn't get
it figured out quickly, so I ended up dropping it. I finally got
around to revisiting it with some LLM help this time. Having multiple
paths in the build system to building DTBs complicates things, so I've
reworked things to always use the single target and directory targets
for building.

Arnd, can you give this a spin on your randconfig builds?

Please ack and I'll take this in the DT tree.

Signed-off-by: Rob Herring (Arm) <robh@xxxxxxxxxx>
---
Changes in v4:
- Don't create dtbs-list files in every directory
- Link to v3: https://patch.msgid.link/20261007-dtb-dirs-v3-v3-0-b3ab32b64fa6@xxxxxxxxxx

Changes in v3:
- Convert %.dtbo? rules to single target
- Convert dtbs rule to use directory target
- Link to v2: https://lore.kernel.org/all/20251120204812.1983452-4-robh@xxxxxxxxxx/

---
Rob Herring (Arm) (2):
kbuild: Convert %.dtb(o) targets to single target rules
kbuild: Support directory targets for building DTBs

Makefile | 38 ++++++++++++++++++++++++++------------
drivers/of/unittest-data/Makefile | 5 +++++
scripts/Makefile.build | 7 +++++++
scripts/Makefile.dtbs | 2 ++
4 files changed, 40 insertions(+), 12 deletions(-)
---
base-commit: cee9395acd8043be0644b25c34bfa86623f2b935
change-id: 20261007-dtb-dirs-v3-008fa5ffbc74

Best regards,
--
Rob Herring (Arm) <robh@xxxxxxxxxx>