Linux 6.8 Kernel - ERROR: Did not find a cmdline Flattened Device Tree

Hello all,
I’m experimenting with a new 6.8 linux kernel, but I’m getting this error on boot:

Moving Image from 0x44000000 to 0x40200000, end=41724000
ERROR: Did not find a cmdline Flattened Device Tree
Could not find a valid device tree

Booting old 5.15 kernel shows this:

Uncompressing Kernel Image
Moving Image from 0x44000000 to 0x40200000, end=419b6000

Flattened Device Tree blob at 48000000

Booting using the fdt blob at 0x48000000
Using Device Tree in place at 0000000048000000, end 000000004800fcbd

Does anyone has a tip?

Kernel .config: Pastebin Gentoo Kernel 6.8.0

After following the *quick build instructions it mentioned it produced the respective dtb’s and dtbo.
They would look something like this, but these are from a different kernel version.

1 Like

Thank you for your tips. It seems that this kernel generate different device tree files.

riscv /usr/src/linux/arch/riscv/boot/dts/starfive # ls -l
insgesamt 164
-rw-r–r-- 1 root root 10776 14. Mär 22:05 jh7100-beaglev-starlight.dtb
-rw-r–r-- 1 root root 318 14. Mär 21:01 jh7100-beaglev-starlight.dts
-rw-r–r-- 1 root root 5983 14. Mär 21:01 jh7100-common.dtsi
-rw-r–r-- 1 root root 8462 14. Mär 21:01 jh7100.dtsi
-rw-r–r-- 1 root root 10865 14. Mär 22:05 jh7100-starfive-visionfive-v1.dtb
-rw-r–r-- 1 root root 452 14. Mär 21:01 jh7100-starfive-visionfive-v1.dts
-rw-r–r-- 1 root root 31874 14. Mär 21:01 jh7110.dtsi
-rw-r–r-- 1 root root 9645 14. Mär 21:01 jh7110-pinfunc.h
-rw-r–r-- 1 root root 11966 14. Mär 21:01 jh7110-starfive-visionfive-2.dtsi
-rw-r–r-- 1 root root 33418 14. Mär 22:05 jh7110-starfive-visionfive-2-v1.2a.dtb
-rw-r–r-- 1 root root 643 14. Mär 21:01 jh7110-starfive-visionfive-2-v1.2a.dts
-rw-r–r-- 1 root root 33803 14. Mär 22:05 jh7110-starfive-visionfive-2-v1.3b.dtb
-rw-r–r-- 1 root root 1124 14. Mär 21:01 jh7110-starfive-visionfive-2-v1.3b.dts

So - is a change of u-boot configuration nessesary?

1 Like

The .dtb gets generated at build_u-boot. This script does exactly as stated directly in the Starfive VisionFive2 SW TRM -building u-boot page 9 of 29 So I’m going to take a guess those additional files .dts/.dtsi/.dtbo will surface and get created around there also. I prefer podman by the way. podman to build starfive visionfive 2 (aka vf2) kernel

I think cwt has the best handle on using the kernel and its newer patches. The best reference point for everything including this u-boot stuff would be via his PKGBUILD files for the cwt linux kernel releases which get integrated into the cwt archlinux vf2 image releases


btw Gabriel Franco made a Fedora 38 Image available. I’m grateful. Thank you Gabriel Franco and davidlt for all your hardwork and progress to get the Fedora Community on Risc-V and in this case the VF2. No desktop.
Plunk it on an sdcard and give it a go.
There was some discussion about it here. I tweaked it to grab Fedora 39 packages and of course there was some hiccups/breakage and stuff, but it’s all doable. It needs some TLC for the GPU just like the Debian and ArchLinux images. It doesn’t resolve any of your dtb/dtsi/dts stuff, but might offer other discussion forums that could point to some similar issues on other kinds of riscv64 boards namely the hifive unmatched. The packages on this fedora image are vanilla riscv64, not tailored specifically for the vf2 I believe. The Archlinux CWT image however contains packages highly tuned for the specific VF2 SOC built by @cwt (our VF2 IMAGE OVERLORD/SUPERHERO).

1 Like

In the upstream kernel, the name of dtbs will be like this:

puqns67@Puqns67sVisionfive2 /b/d/starfive> pwd
puqns67@Puqns67sVisionfive2 /b/d/starfive> la
总计 108K
-rwxr-xr-x 1 root root 8.0K  3月 8日 23:12 jh7100-beaglev-starlight.dtb*
-rwxr-xr-x 1 root root 8.1K  3月 8日 23:12 jh7100-starfive-visionfive-v1.dtb*
-rwxr-xr-x 1 root root  42K  3月 8日 23:12 jh7110-starfive-visionfive-2-v1.2a.dtb*
-rwxr-xr-x 1 root root  43K  3月 8日 23:12 jh7110-starfive-visionfive-2-v1.3b.dtb*
puqns67@Puqns67sVisionfive2 /b/d/starfive>

If you have uEnv.txt in your /boot directory, please make sure that the dtb file is not specified as jh7110-visionfive-v2.dtb in this file. This is the default behavior.

If you using upstream u-boot, you can safely delete this file (uEnv.txt). Its default value has been modified to the correct value.

Finally, please make sure that the new dtb file has been installed to the correct location. If it is not installed, you can use this command to install it under /boot/dtbs:

INSTALL_DTBS_PATH="/boot/dtbs" make dtbs_install

Thank you - this was the trick. Now I’m on gentoo with 6.8.0 kernel :star_struck:

Last login: Fri Mar 15 10:34:37 CET 2024 on ttyS0
root@riscv ~ # uname -r

1 Like

Does the GPU code work with 6.8.0 on Gentoo?

I’m not able to select the driver (It’s not visible):

Symbol: DRM_POWERVR [=n] │
│ Type : tristate │
│ Defined at drivers/gpu/drm/imagination/Kconfig:4 │
│ Prompt: Imagination Technologies PowerVR (Series 6 and later) & IMG Graphics │
│ Depends on: HAS_IOMEM [=y] && ARM64 && DRM [=y] && PM [=y] │
│ Location: │
│ → Device Drivers │
│ (1) → Graphics support │
│ → Imagination Technologies PowerVR (Series 6 and later) & IMG Graphics (DRM_POWERVR [=n]) │
│ Selects: DRM_EXEC [=n] && DRM_GEM_SHMEM_HELPER [=n] && DRM_SCHED [=n] && DRM_GPUVM [=n] && FW_LOADER [=m]

But I’m a big step closer with the upstream kernel to my personal needs (btrfs, zram, and so on). Feel free to use my kernel config on pastebin. I’ts a copy of the starfive 6.6 defconfig and migrated to 6.8

1 Like

Thanks. I will look at trying it in the future.
I am currently emerging chromium-122.0.6261.29 and it probably has another day or so to finish.