[Bug]: rk35xx bootscript hardcodes rootdev=/dev/mmcblk0p1, breaking eMMC boot when kernel mmc numbering differs from U-Boot
What happened?
Board: LCKFB Taishan Pi RK3566 (CSC, BOARDFAMILY rk35xx), image
26.11.0-trunk.33_trixie_current_6.18.48_minimal, mainline U-Boot v2025.04.
Booting from eMMC drops to the initramfs shell:
ALERT! /dev/mmcblk0p1 does not exist. Dropping to a shell!
I believe the root cause is: boot-rk35xx.cmd line 9 hardcodes setenv rootdev "/dev/mmcblk0p1".
On mainline, U-Boot and the kernel number the controllers differently on this family:
- U-Boot v2025.04 rk35x-u-boot.dtsi:
mmc0 = &sdhci(eMMC),mmc1 = &sdmmc0(SD) - kernel rk3566-lckfb-tspi.dts:
mmc0 = &sdmmc0(SD),mmc1 = &sdhci(eMMC)
So booting from eMMC (U-Boot mmc 0), the kernel-side root device is /dev/mmcblk1p1, and the hardcoded default points at the empty SD slot. Whether the default works is a per-board coincidence — on this board the kernel numbers the SD slot mmcblk0, so SD boot is expected to work while eMMC boot fails.
The shipped armbianEnv.txt carries a numbering-independent override (rootdev=UUID=…), but it only helps when env import succeeds. I think #9953 and #10474 already hardened the seeed-rk35xx bootscript against this problem; the generic boot-rk35xx.cmd still falls back to the broken hardcoded default.
The script already computes the boot partition's PARTUUID ( see boot-rk35xx.cmd line 9). Using it for root= removes the U-Boot↔kernel numbering dependency — at least, it worked for me:
-setenv rootdev "/dev/mmcblk0p1"
+setenv rootdev ""
...
test -n "${distro_bootpart}" || distro_bootpart=1
+part uuid ${devtype} ${devnum}:${distro_bootpart} partuuid
+setenv rootdev "PARTUUID=${partuuid}"
btw, boot-generic.cmd.template (#8935) might have the same class of bug, it builds a kernel device name from U-Boot's devnum, and would get the same treatment.
How to reproduce?
- Flash
Armbian_community_26.11.0-trunk.33_Lckfb-taishanpi_trixie_current_6.18.48_minimal.imgto eMMC →ALERT! /dev/mmcblk0p1 does not exist(observed). - Deterministic variant: remove
/boot/armbianEnv.txtfrom the rootfs before flashing → eMMC boot always ends in the sameALERT!. - From any booted system on this board:
lsblkshows the rootfs onmmcblk1p1;/proc/device-tree/aliasesmapsmmc0→sdmmc0 (SD),mmc1→sdhci (eMMC).
Branch
main (main development branch)
On which host OS are you running the build script and observing this problem?
Ubuntu 24.04 Noble
Are you building on Windows WSL2?
- [ ] Yes, my Ubuntu/Debian/OtherOS is running on WSL2
Relevant log URL
No response
Code of Conduct
- [x] I agree to follow this project's Code of Conduct
Hey @nizne9! 👋
Thanks for opening your first issue with the Armbian project — we’re glad to have you here! 🧡
Your input doesn’t just help us improve the project — it benefits everyone who uses Armbian.
If you'd like to stay informed about project updates or collaborate more closely with the team,
you can optionally share some personal contact preferences at armbian.com/update-data.
This helps us keep in touch without relying solely on GitHub notifications.
Also, don’t forget to ⭐ star the repo to support the work — and welcome aboard! 🚀