Hi Tom, Marek,
On Tue, 2025-12-02 at 20:32 +0100, Marek Vasut wrote:
> Synchronize local copy of DTC with Linux 6.17 . This includes the
> following picked and squashed commits from Linux kernel. The squash
> was necessary, since the DTC here contains changes which were also
> part of DTC in Linux alraedy, and the squash helped resolve those
> without going back and forth with the changes.
>
> The following commits from Linux are picked:
>
> 8f324cd712df7 # scripts/dtc: consolidate include path options in
> Makefile
> b5b3d9b63b0ee # scripts/dtc: Add yamltree.c to dtc sources
> 7d97a76f226d6 # scripts/dtc: Update to upstream version v1.4.7-14-
> gc86da84d30e4
> ea6f243be74e5 # scripts/dtc: Update to upstream version v1.4.7-57-
> gf267e674d145
> 02d435d4eccd8 # scripts/dtc: Update to upstream version v1.5.0-23-
> g87963ee20693
> 6e321b7637396 # scripts/dtc: Update to upstream version v1.5.0-30-
> g702c1b6c0e73
> 9f19ec91a7a35 # scripts/dtc: dtx_diff - add color output support
> 8287d642f38d1 # scripts/dtc: Update to upstream version v1.5.1-22-
> gc40aeb60b47a
> 4c52deef9225d # scripts/dtc: Revert "yamltree: Ensure consistent
> bracketing of properties with phandles"
> 5d3827e1452ed # scripts/dtc: Remove unused makefile fragments
> 40dd266887654 # scripts/dtc: Update to upstream version v1.6.0-2-
> g87a656ae5ff9
> 8d4cf6b6acb59 # scripts/dtc: use pkg-config to include <yaml.h> in
> non-standard path
> b9bf9ace5ae90 # scripts/dtc: Update to upstream version v1.6.0-11-
> g9d7888cbf19c
> 69a883b6f5ac0 # scripts/dtc: dtx_diff - make help text formatting
> consistent
> 8f829108b8aed # scripts/dtc: only append to HOST_EXTRACFLAGS instead
> of overwriting
> b39b4342ac495 # scripts/dtc: Update to upstream version v1.6.0-31-
> gcbca977ea121
> 93c6424c486b3 # scripts: dtc: Fetch fdtoverlay.c from external DTC
> project
> 0dd574a1d75c3 # scripts/dtc: Update to upstream version v1.6.0-51-
> g183df9e9c2b9
> ec38b5df8a231 # scripts: dtc: Build fdtoverlay tool
> a0c8c431411f5 # scripts: dtc: Remove the unused fdtdump.c file
> e7dc653d4e890 # scripts/dtc: Add missing fdtoverlay to gitignore
> d2bf5d2e3f09c # scripts/dtc: Update to upstream version v1.6.1-19-
> g0a3a9d3449c8
> a60878f5532d0 # scripts/dtc: dtx_diff: remove broken example from help
> text
> 8b739d8658a9b # scripts/dtc: Call pkg-config POSIXly correct
> b6eeafa67df00 # scripts/dtc: Update to upstream version v1.6.1-63-
> g55778a03df61
> f96cc4c787588 # scripts/dtc: Update to upstream version v1.6.1-66-
> gabbd523bae6e
> 09ab9c092ef2b # scripts/dtc: Update to upstream version v1.7.0-93-
> g1df7b047fe43
> ded8a5a498f2d # scripts/dtc: Update to upstream version v1.7.0-95-
> gbcd02b523429
> ee6ff6fca7e71 # scripts/dtc: Update to upstream version v1.7.2-35-
> g52f07dcca47c
>
> This also includes forward port of U-Boot commit
> e8c2d25845c7 ("libfdt: Revert 6dcb8ba4 from upstream libfdt")
> to avoid binary size growth.
>
During testing I discovered the following error on Microchip's PolarFire
SoC Icicle kit. I found it during a bisect between the v2026.01 tag and
the master branch while looking to solve another issue. With these other
issues solved I am left with this one still on master and I am looking
for some help.
The error is: failed on fdt_open_into for DTO, i.e. overlay application
fdt error. This was introduced by 0535e46d55d scripts/dtc: Update to
upstream version v1.7.2-35-g52f07dcca47c, i.e. this patch. Please see
the attached log which includes a `printenv` attached.
Thanks in advance,
Jamie.
> Signed-off-by: Marek Vasut <[email protected]>
> ---
> Cc: Adriano Cordova <[email protected]>
> Cc: Andrew Goodbody <[email protected]>
> Cc: Christian Marangi <[email protected]>
> Cc: Heinrich Schuchardt <[email protected]>
> Cc: Ilias Apalodimas <[email protected]>
> Cc: Patrice Chotard <[email protected]>
> Cc: Sam Edwards <[email protected]>
> Cc: Simon Glass <[email protected]>
> Cc: Tom Rini <[email protected]>
> Cc: [email protected]
> ---
> V2: - Fix off-by-one in fdt_remove_unused_strings()
> - Restore e8c2d25845c7 ("libfdt: Revert 6dcb8ba4 from upstream
> libfdt")
> ---
> scripts/Makefile.lib | 4 +-
> scripts/dtc/.gitignore | 1 +
> scripts/dtc/Makefile | 23 +-
> scripts/dtc/Makefile.dtc | 18 -
> scripts/dtc/checks.c | 686 +++++++++++++++++++++-----
> -
> scripts/dtc/data.c | 74 ++-
> scripts/dtc/dtc-lexer.l | 38 +-
> scripts/dtc/dtc-parser.y | 109 +++--
> scripts/dtc/dtc.c | 58 ++-
> scripts/dtc/dtc.h | 137 ++++--
> scripts/dtc/fdtoverlay.c | 214 +++++++++
> scripts/dtc/flattree.c | 70 ++-
> scripts/dtc/fstree.c | 26 +-
> scripts/dtc/libfdt/fdt.c | 84 ++--
> scripts/dtc/libfdt/fdt.h | 4 +-
> scripts/dtc/libfdt/fdt_addresses.c | 2 +-
> scripts/dtc/libfdt/fdt_overlay.c | 386 +++++++++++----
> scripts/dtc/libfdt/fdt_ro.c | 100 ++--
> scripts/dtc/libfdt/fdt_rw.c | 101 ++--
> scripts/dtc/libfdt/fdt_strerror.c | 1 +
> scripts/dtc/libfdt/fdt_sw.c | 26 +-
> scripts/dtc/libfdt/libfdt.h | 414 +++++++++++++---
> scripts/dtc/libfdt/libfdt_internal.h | 141 ++++--
> scripts/dtc/livetree.c | 156 +++---
> scripts/dtc/srcpos.c | 190 ++++++--
> scripts/dtc/srcpos.h | 31 +-
> scripts/dtc/treesource.c | 319 ++++++++-----
> scripts/dtc/update-dtc-source.sh | 7 +-
> scripts/dtc/util.c | 122 ++---
> scripts/dtc/util.h | 61 +--
> scripts/dtc/version_gen.h | 2 +-
> scripts/dtc/yamltree.c | 235 +++++++++
> tools/libfdt/fdt_rw.c | 2 +-
> 33 files changed, 2830 insertions(+), 1012 deletions(-)
> delete mode 100644 scripts/dtc/Makefile.dtc
> create mode 100644 scripts/dtc/fdtoverlay.c
> create mode 100644 scripts/dtc/yamltree.c
>
U-Boot 2026.01-rc5-00487-g0535e46d55d7-dirty (Jan 16 2026 - 15:59:54 +0000)
CPU: sifive,u54-mc
Model: Microchip PolarFire-SoC Icicle Kit
DRAM: 1020 MiB (total 2 GiB)
Core: 66 devices, 15 uclasses, devicetree: fit
MMC: mmc@20008000: 0
Loading Environment from nowhere... OK
In: serial@20100000
Out: serial@20100000
Err: serial@20100000
Net: eth1: ethernet@20110000, eth0: ethernet@20112000
Hit any key to stop autoboot: 0
RISC-V # printenv
arch=riscv
baudrate=115200
board=mpfs_generic
board_name=mpfs_generic
boot_a_script=load ${devtype} ${devnum}:${distro_bootpart} ${scriptaddr} ${prefix}${script}; source ${scriptaddr}
boot_efi_binary=load ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} efi/boot/bootriscv64.efi; if fdt addr -q ${fdt_addr_r}; then bootefi ${kernel_addr_r} ${fdt_addr_r};else bootefi ${kernel_addr_r} ${fdtcontroladdr};fi
boot_efi_bootmgr=if fdt addr -q ${fdt_addr_r}; then bootefi bootmgr ${fdt_addr_r};else bootefi bootmgr;fi
boot_extlinux=sysboot ${devtype} ${devnum}:${distro_bootpart} any ${scriptaddr} ${prefix}${boot_syslinux_conf}
boot_prefixes=/ /boot/
boot_script_dhcp=boot.scr.uimg
boot_scripts=boot.scr.uimg boot.scr
boot_syslinux_conf=extlinux/extlinux.conf
boot_targets=mmc0 dhcp
bootcmd=run distro_bootcmd
bootcmd_dhcp=devtype=dhcp; if dhcp ${scriptaddr} ${boot_script_dhcp}; then source ${scriptaddr}; fi;setenv efi_fdtfile ${fdtfile}; setenv efi_old_vci ${bootp_vci};setenv efi_old_arch ${bootp_arch};setenv bootp_vci PXEClient:Arch:00027:UNDI:003000;setenv bootp_arch 0x1b;if dhcp ${kernel_addr_r}; then tftpboot ${fdt_addr_r} dtb/${efi_fdtfile};if fdt addr -q ${fdt_addr_r}; then bootefi ${kernel_addr_r} ${fdt_addr_r}; else bootefi ${kernel_addr_r} ${fdtcontroladdr};fi;fi;setenv bootp_vci ${efi_old_vci};setenv bootp_arch ${efi_old_arch};setenv efi_fdtfile;setenv efi_old_arch;setenv efi_old_vci;
bootcmd_mmc0=devnum=0; run mmc_boot
bootdelay=2
bootm_size=0x10000000
cpu=mpfs
distro_bootcmd=for target in ${boot_targets}; do run bootcmd_${target}; done
dtbo_size=0
efi_dtb_prefixes=/ /dtb/ /dtb/current/
eth1addr=00:04:a3:62:80:4b
ethaddr=00:04:a3:62:80:4a
fdt_addr_r=0x88000000
fdtcontroladdr=bf349500
fdtfile=microchip/mpfs-icicle-kit.dtb
kernel_addr_r=0x84000000
load_efi_dtb=load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${prefix}${efi_fdtfile}
loadaddr=0x80200000
mmc_boot=if mmc dev ${devnum}; then devtype=mmc; run scan_dev_for_boot_part; fi
no_of_overlays=0
pxefile_addr_r=0x88200000
ramdisk_addr_r=0x88300000
scan_dev_for_boot=echo Scanning ${devtype} ${devnum}:${distro_bootpart}...; for prefix in ${boot_prefixes}; do run scan_dev_for_extlinux; run scan_dev_for_scripts; done;run scan_dev_for_efi;
scan_dev_for_boot_part=part list ${devtype} ${devnum} -bootable devplist; env exists devplist || setenv devplist 1; for distro_bootpart in ${devplist}; do if fstype ${devtype} ${devnum}:${distro_bootpart} bootfstype; then part uuid ${devtype} ${devnum}:${distro_bootpart} distro_bootpart_uuid ; run scan_dev_for_boot; fi; done; setenv devplist
scan_dev_for_efi=setenv efi_fdtfile ${fdtfile}; for prefix in ${efi_dtb_prefixes}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${efi_fdtfile}; then run load_efi_dtb; fi;done;run boot_efi_bootmgr;if test -e ${devtype} ${devnum}:${distro_bootpart} efi/boot/bootriscv64.efi; then echo Found EFI removable media binary efi/boot/bootriscv64.efi; run boot_efi_binary; echo EFI LOAD FAILED: continuing...; fi; setenv efi_fdtfile
scan_dev_for_extlinux=if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${boot_syslinux_conf}; then echo Found ${prefix}${boot_syslinux_conf}; run boot_extlinux; echo EXTLINUX FAILED: continuing...; fi
scan_dev_for_scripts=for script in ${boot_scripts}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${script}; then echo Found U-Boot script ${prefix}${script}; run boot_a_script; echo SCRIPT FAILED: continuing...; fi; done
scriptaddr=0x88100000
stderr=serial@20100000
stdin=serial@20100000
stdout=serial@20100000
vendor=microchip
Environment size: 3579/8188 bytes
RISC-V # boot
switch to partitions #0, OK
mmc0(part 0) is current device
Scanning mmc 0:2...
Found U-Boot script /boot.scr
624 bytes read in 8 ms (76.2 KiB/s)
## Executing script at 88100000
Working FDT set to bf349500
6420192 bytes read in 85 ms (72 MiB/s)
## Loading kernel (any) from FIT Image at 88100000 ...
Using 'conf-microchip,mpfs-icicle-kit' configuration
Trying 'kernel' kernel subimage
Description: Linux kernel
Type: Kernel Image
Compression: gzip compressed
Data Start: 0x881000cc
Data Size: 6361629 Bytes = 6.1 MiB
Architecture: RISC-V
OS: Linux
Load Address: 0x80200000
Entry Point: 0x80200000
Hash algo: sha256
Hash value: e92dccad51bf9f61f2a08d26a3da904ed5a86950db78d939bd621ef9fe9b95ac
Verifying Hash Integrity ... sha256+ OK
## Loading fdt (any) from FIT Image at 88100000 ...
Using 'conf-microchip,mpfs-icicle-kit' configuration
Trying 'fdt-mpfs-icicle-kit.dtb' fdt subimage
Description: Flattened Device Tree blob
Type: Flat Device Tree
Compression: uncompressed
Data Start: 0x88711400
Data Size: 24242 Bytes = 23.7 KiB
Architecture: RISC-V
Load Address: 0x8a000000
Hash algo: sha256
Hash value: 2a111f7ecb21056e2e315fab673fef4d566d7cdb0284de3deb3663a4fa07c61f
Verifying Hash Integrity ... sha256+ OK
Loading fdt from 0x88711400 to 0x8a000000
Loading Device Tree to 00000000be331000, end 00000000be339fff ... OK
Working FDT set to be331000
## Loading fdt (any) from FIT Image at 88100000 ...
Using 'conf-microchip,mpfs-icicle-cpu-opp' configuration
Trying 'fdt-mpfs-icicle-cpu-opp.dtbo' fdt subimage
Description: Device Tree blob for CPU Operating Points
Type: Flat Device Tree
Compression: uncompressed
Data Start: 0x8871e8a4
Data Size: 1392 Bytes = 1.4 KiB
Architecture: RISC-V
Load Address: 0x8a0c0000
Hash algo: sha256
Hash value: 9355e3feaa4ce663cb5a223ee73a26ef227f02586327b3f9db48b5c35ddcdc78
Verifying Hash Integrity ... sha256+ OK
failed on fdt_open_into for DTO
Could not find a valid device tree
Uncompressing Kernel Image to 80200000
Device tree not found or missing FDT support
### ERROR ### Please RESET the board ###