]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
scripts/dtc: drop yaml in DT validation
authorJoão Marcos Costa <joaomarcos.costa@bootlin.com>
Wed, 29 Apr 2026 14:46:15 +0000 (16:46 +0200)
committerTom Rini <trini@konsulko.com>
Thu, 30 Apr 2026 18:21:47 +0000 (12:21 -0600)
The build issues found in dtc/yamltree were partially mitigated by a
previous commit (807bcd844a: "scripts/dtc: Fix pkg-config behavior under
sysroot"), but upstream dtc simply disabled yaml, and the same should be
done here in order to permanently avoid those issues.

Backport the change below from Linux v5.18 [1]:

ef8795f3f1c ("dt-bindings: kbuild: Use DTB files for validation")

I tested this patch with a couple Yocto builds: u-boot and u-boot-tools,
using the current master branch (rev. "c53b0708f9"), having removed
libyaml-native from u-boot-tools's dependencies.

[1] https://git.kernel.org/linus/ef8795f3f1ce

Signed-off-by: João Marcos Costa <joaomarcos.costa@bootlin.com>
Acked-by: Quentin Schulz <quentin.schulz@cherry.de>
scripts/Makefile.lib
scripts/dtc/Makefile
scripts/dtc/update-dtc-source.sh

index b8969b7de54cbe7201ce652563a9d4b67a0a242a..d66f1ed13b1359354fc1e9f95af23cf64b84fe3a 100644 (file)
@@ -86,12 +86,6 @@ base-dtb-y := $(foreach m, $(multi-dtb-y), $(firstword $(call suffix-search, $m,
 extra-y                                += $(dtb-y)
 extra-$(CONFIG_OF_ALL_DTBS)    += $(dtb-)
 
-# U-Boot specific
-ifneq ($(CHECK_DTBS),)
-extra-y += $(patsubst %.dtb,%.dt.yaml, $(dtb-y))
-extra-$(CONFIG_OF_ALL_DTBS) += $(patsubst %.dtb,%.dt.yaml, $(dtb-))
-endif
-
 # Add subdir path
 
 extra-y                := $(addprefix $(obj)/,$(extra-y))
index 6f309b37e08246ad7422587698de792209b46c9f..2ba8dba03be40713a21928553559827f01e253d2 100644 (file)
@@ -17,15 +17,7 @@ fdtoverlay-objs      := $(libfdt) fdtoverlay.o util.o
 # Source files need to get at the userspace version of libfdt_env.h to compile
 HOST_EXTRACFLAGS := -I$(srctree)/$(src)/libfdt
 
-ifeq ($(wildcard $(PKG_CONFIG_SYSROOT_DIR)/usr/include/yaml.h),)
 HOST_EXTRACFLAGS += -DNO_YAML
-else
-dtc-objs       += yamltree.o
-# To include <yaml.h> installed in a non-default path
-HOSTCFLAGS_yamltree.o := $(shell pkg-config --cflags yaml-0.1)
-# To link libyaml installed in a non-default path
-HOSTLDLIBS_dtc := $(shell pkg-config --libs yaml-0.1)
-endif
 
 # Generated files need one more search path to include headers in source tree
 HOSTCFLAGS_dtc-lexer.lex.o := -I$(src)
index 32ff17ffd089a4d9dcf64947e0e0a1ae19c43adb..94627541533e0c13feb9eb2292731cdc9e69ad7a 100755 (executable)
@@ -32,7 +32,7 @@ DTC_UPSTREAM_PATH=`pwd`/../dtc
 DTC_LINUX_PATH=`pwd`/scripts/dtc
 
 DTC_SOURCE="checks.c data.c dtc.c dtc.h flattree.c fstree.c livetree.c srcpos.c \
-               srcpos.h treesource.c util.c util.h version_gen.h yamltree.c \
+               srcpos.h treesource.c util.c util.h version_gen.h \
                dtc-lexer.l dtc-parser.y"
 LIBFDT_SOURCE="fdt.c fdt.h fdt_addresses.c fdt_empty_tree.c \
                fdt_overlay.c fdt_ro.c fdt_rw.c fdt_strerror.c fdt_sw.c \