U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] kbuild: Pass -Eno-node_name_not_empty to DTC if supported
@ 2026-10-04  6:17 Marek Vasut
  2026-10-04  6:17 ` [PATCH 2/2] kbuild: Do not pass -Wno-graph_child_address to DTC unless supported Marek Vasut
  2026-10-05  6:44 ` [PATCH 1/2] kbuild: Pass -Eno-node_name_not_empty to DTC if supported Rasmus Villemoes
  0 siblings, 2 replies; 4+ messages in thread
From: Marek Vasut @ 2026-10-04  6:17 UTC (permalink / raw)
  To: u-boot
  Cc: Marek Vasut, David Gibson, Héctor Orón Martínez,
	Mattia Maldini, Rasmus Villemoes, Simon Glass, Tom Rini,
	Vagrant Cascadian

Since DTC 7c78c8542d73 ("Added empty node name check") , U-Boot binman
use of placeholder node names such as @fdt-SEQ and @config-SEQ triggers
DTC ERROR (node_name_not_empty). Inhibit the error, as these placeholder
nodes are updated by binman and replaced by proper nodes, the encoding
in DTB is temporary. Since -Eno-node_name_not_empty is only available in
DTC 1.8.0 and newer, introduce "dtc-option" make function which is very
similar to "cc-option" and other such Kbuild functions, and add the DTC
option conditionally.

This can be triggered on e.g. Debian Testing (as of 2026-09-07) when
using system DTC to build a DT which include binman placeholder nodes:

$ export DTC=/usr/bin/dtc
$ $DTC --version
Version: DTC 1.8.1
$ r8a779g3_sparrowhawk_defconfig
$ make -j$(nproc)
...
./arch/arm/dts/r8a779g0-u-boot.dtsi:61.16-70.9: ERROR (node_name_not_empty): /binman/section/u-boot/fit/images/@fdt-SEQ: Empty node name
./arch/arm/dts/r8a779g0-u-boot.dtsi:76.19-80.9: ERROR (node_name_not_empty): /binman/section/u-boot/fit/configurations/@config-SEQ: Empty node name
ERROR: Input tree has errors, aborting (use -f to force output)
Check /path/to/dts/upstream/src/arm64/renesas/.r8a779g3-sparrow-hawk.dtb.pre.tmp for errors

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
---
Cc: David Gibson <david@gibson.dropbear.id.au>
Cc: Héctor Orón Martínez <zumbi@debian.org>
Cc: Mattia Maldini <mattia512maldini@gmail.com>
Cc: Rasmus Villemoes <rv@rasmusvillemoes.dk>
Cc: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@konsulko.com>
Cc: Vagrant Cascadian <vagrant@debian.org>
Cc: u-boot@lists.u-boot-project.org
---
 scripts/Makefile.lib | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 122c8e78204..330ab3892e9 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -378,6 +378,19 @@ DTC_FLAGS += $(DTC_FLAGS_$(basetarget))
 # Set -@ if the target is a base DTB that overlay is applied onto
 DTC_FLAGS += $(if $(filter $(patsubst $(obj)/%,%,$@), $(base-dtb-y)), -@)
 
+# dtc-option
+# Usage: DTC_FLAGS += $(call dtc-option,-Eno-node_name_not_empty)
+dtc-option = $(call try-run,\
+	printf '/dts-v1/; / {};' | $(DTC) $(1) -I dts -O dtb -o /dev/null,$(1),$(2))
+
+# Since DTC 7c78c8542d73 ("Added empty node name check") , U-Boot binman
+# use of placeholder node names such as @fdt-SEQ and @config-SEQ triggers
+# DTC ERROR (node_name_not_empty). Inhibit the error, as these placeholder
+# nodes are updated by binman and replaced by proper nodes, the encoding
+# in DTB is temporary. Since -Eno-node_name_not_empty is only available in
+# DTC 1.8.0 and newer, add the option conditionally.
+DTC_FLAGS += $(call dtc-option, -Eno-node_name_not_empty)
+
 # Generate an assembly file to wrap the output of the device tree compiler
 quiet_cmd_dt_S_dtb= DTBS    $@
 # Modified for U-Boot
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-10-05 21:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-04  6:17 [PATCH 1/2] kbuild: Pass -Eno-node_name_not_empty to DTC if supported Marek Vasut
2026-10-04  6:17 ` [PATCH 2/2] kbuild: Do not pass -Wno-graph_child_address to DTC unless supported Marek Vasut
2026-10-05 20:59   ` Tom Rini
2026-10-05  6:44 ` [PATCH 1/2] kbuild: Pass -Eno-node_name_not_empty to DTC if supported Rasmus Villemoes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox