johang / sd-card-images

Scripts to build bootable SD card images with Debian for various single-board computers
https://sd-card-images.johang.se
GNU General Public License v3.0
151 stars 33 forks source link

Libre ROC-RK3328-CC not booting #49

Closed wilbert-vb closed 1 year ago

wilbert-vb commented 1 year ago

I created sd-images for all three available Debian releases following the instructions (cat a b > c) None of them boot. The Libre board shows solid yellow and red LEDS (no heartbeat), no HDMI output and network is offline.

The sd-images look alright, FAT32 partition and linux partition, the linux filesystem shows no errors. The FAT partition is not formatted.

The Libre board boots Raspbian and Armbian with success from the same microSD cards.

How can I help solve this?

Edit: fdisk -l sd-image:

Device                  Boot Start     End Sectors  Size Id Type
boot-roc_rk3328_cc.bin1       8192   65535   57344   28M  c W95 FAT32 (LBA)
boot-roc_rk3328_cc.bin2 *    65536 7419903 7354368  3.5G 83 Linux

fdisk -l Armbian:

Device         Boot Start       End   Sectors   Size Id Type
/dev/mmcblk0p1      32768 247234560 247201793 117.9G 83 Linux

disk -l Raspbian

Device                                                     Boot  Start     End Sectors  Size Id Type
2022-09-22-raspbian-bullseye-arm64-lite+roc-rk3328-cc.img1        8192  532479  524288  256M  c W95 FAT32 (LBA)
2022-09-22-raspbian-bullseye-arm64-lite+roc-rk3328-cc.img2      532480 2875391 2342912  1.1G 83 Linux
johang commented 1 year ago

Please connect to the UART console and show the output during boot.

wilbert-vb commented 1 year ago

Johan, it took me this long to find an adapter that supports 1.5Mbps.

Anyway, I was able to generate the attached log file. screenlog.0.zip

How do I proceed?

knuxyl commented 1 year ago

Begin: Waiting for root file system ... [ 10.530351] dwmmc_rockchip ff520000.mmc: Busy; trying anyway This is the problem, the kernel is unable to do anything with the root file system. I'm not sure why, I don't know if it's mounted at the wrong place if it would say "Busy", but I doubt it, so I have no clue, but that's where to start.

Edit : It looks like the kernel isn't looking for the right partition ALERT! PARTUUID=d04916bb-02 does not exist. Dropping to a shell!

wilbert-vb commented 1 year ago

ALERT! PARTUUID=d04916bb-02 does not exist.

blkid output shows: PARTUUID="d04916bb-01"

johang commented 1 year ago

U-boot clearly loads the kernel from SD card (0xff500000), but looks like Linux then tries to mount the rootfs from the eMMC (0xff520000).

wilbert-vb commented 1 year ago

U-boot clearly loads the kernel from SD card (0xff500000), but looks like Linux then tries to mount the rootfs from the eMMC (0xff520000).

The kernel does not find the SD card (dwmmc_rockchip ff500000.mmc)

johang commented 1 year ago

I wonder why...

@wilbert-vb, can you do cat /proc/modules when it reaches "Gave up waiting for root file system device"?

wilbert-vb commented 1 year ago

I wonder why...

@wilbert-vb, can you do cat /proc/modules when it reaches "Gave up waiting for root file system device"? screenlog.1.zip

johang commented 1 year ago

I think this is a Debian kernel problem and might be fixed by this patch: https://salsa.debian.org/kernel-team/linux/-/commit/1c12e30895c359c2ac27a5fe09fa4d0e665d4525

johang commented 1 year ago

I added Debian experimental to the builds. It should show up in a few days. You can try to see if it can find the SD-card, but I don't expect the image to work well other than that.

wilbert-vb commented 1 year ago

I installed a linux-image from the Libre Computer repo /etc/apt/sources.list.d/libre-computer-deb.list: deb [signed-by=/usr/share/keyrings/libre-computer-deb.gpg] https://deb.libre.computer/repo linux main non-free

I also modified u-boot by enabling setexpr:

#
# Shell scripting commands
#
# CONFIG_CMD_CAT is not set
CONFIG_CMD_ECHO=y
CONFIG_CMD_ITEST=y
CONFIG_CMD_SOURCE=y
CONFIG_CMD_SETEXPR=y
CONFIG_CMD_SETEXPR_FMT=y

And the result is a login prompt. It looks like I don't have network, though, only console login.