Files
eternalwrt-mt798x/package/boot/uboot-mediatek/patches/005-scripts-dtc-drop-yaml-in-DT-validation.patch
T
Shiji YangandDaniel Golle b6ecbb0374 uboot-mediatek: update to v2026.04
Remove upstreamed patches:
  001-pinctrl-mediatek-MT7981-fix-GPIO9-register-map.patch [1]
  010-clk-mediatek-mt7622-fix-infracfg-and-pericfg-clock-o.patch [2]

We also need to backport two new patches from v2026.07-rc2 to address
the yaml build error[3] and MT7621 boot issue[4].

[1] https://github.com/u-boot/u-boot/commit/a1d1fc8d8c8699d80e1b9ab3214752e5882d3740
[2] https://github.com/u-boot/u-boot/commit/52d84fccfd7d8b99e91a70192eec8e0379d63b4b
[3] https://github.com/u-boot/u-boot/commit/8ef8dee4f3a2b2021decfefd853dbd2a1632b77f
[4] https://github.com/u-boot/u-boot/commit/de79075f0f6b8795d1f9e30ff36435583b1a119a
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
2026-06-12 13:55:41 +01:00

76 lines
2.9 KiB
Diff

From 8ef8dee4f3a2b2021decfefd853dbd2a1632b77f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jo=C3=A3o=20Marcos=20Costa?= <joaomarcos.costa@bootlin.com>
Date: Wed, 29 Apr 2026 16:46:15 +0200
Subject: [PATCH] scripts/dtc: drop yaml in DT validation
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
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 | 6 ------
scripts/dtc/Makefile | 8 --------
scripts/dtc/update-dtc-source.sh | 2 +-
3 files changed, 1 insertion(+), 15 deletions(-)
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -86,12 +86,6 @@ base-dtb-y := $(foreach m, $(multi-dtb-y
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))
--- a/scripts/dtc/Makefile
+++ b/scripts/dtc/Makefile
@@ -17,15 +17,7 @@ fdtoverlay-objs := $(libfdt) fdtoverlay.
# 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)
--- a/scripts/dtc/update-dtc-source.sh
+++ b/scripts/dtc/update-dtc-source.sh
@@ -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 \