eugene-tarassov / vivado-risc-v

Xilinx Vivado block designs for FPGA RISC-V SoC running Debian Linux distro
778 stars 180 forks source link

Kernel cannot read partition table of SD card #192

Open vhg0299 opened 8 months ago

vhg0299 commented 8 months ago

Hello, I have Rocket64b1gem16 config on ZCU104 board, I cannot boot linux with error:

Starting kernel ... [ 0.000000] Linux version 5.19.17-dirty (eugene@gate) (riscv64-linux-gnu-gcc (Ubuntu 9.4.0-1ubuntu1~20.04) 9.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #1 SMP Fri May 5 12:42:56 PDT 2023 . . . [ 6.659017] loop: module loaded [ 6.746330] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver [ 6.760330] ehci-pci: EHCI PCI platform driver [ 6.772505] ehci-platform: EHCI generic platform driver [ 6.785670] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver [ 6.800237] ohci-pci: OHCI PCI platform driver [ 6.811437] ohci-platform: OHCI generic platform driver [ 7.013897] usbcore: registered new interface driver uas [ 7.026017] usbcore: registered new interface driver usb-storage [ 7.090302] mousedev: PS/2 mouse device common for all mice [ 7.222525] usbcore: registered new interface driver usbhid [ 7.234027] usbhid: USB HID core driver [ 7.246595] riscv-pmu-sbi: SBI PMU extension is available [ 7.258090] riscv-pmu-sbi: 16 firmware and 2 hardware counters [ 7.272225] riscv-pmu-sbi: Perf sampling/filtering is not supported as sscof extension is not available [ 7.412790] NET: Registered PF_INET6 protocol family [ 7.498467] mmc0: host does not support reading read-only switch, assuming write-enable [ 7.549867] Segment Routing with IPv6 [ 7.558152] In-situ OAM (IOAM) with IPv6 [ 7.568220] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver [ 7.598020] NET: Registered PF_PACKET protocol family [ 7.613132] 9pnet: Installing 9P2000 support [ 7.623282] Key type dns_resolver registered [ 7.652505] mmc0: new high speed SDHC card at address e624 [ 7.713565] mmcblk0: mmc0:e624 SB16G 14.8 GiB [ 8.007092] I/O error, dev mmcblk0, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0 [ 8.043367] I/O error, dev mmcblk0, sector 1 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0 [ 8.080672] I/O error, dev mmcblk0, sector 2 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0 [ 8.116927] I/O error, dev mmcblk0, sector 3 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0 [ 8.153125] I/O error, dev mmcblk0, sector 4 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0 [ 8.197827] I/O error, dev mmcblk0, sector 5 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0 [ 8.245330] I/O error, dev mmcblk0, sector 6 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0 [ 8.293110] I/O error, dev mmcblk0, sector 7 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0 [ 8.312225] Buffer I/O error on dev mmcblk0, logical block 0, async page read [ 8.412385] I/O error, dev mmcblk0, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0 [ 8.460065] I/O error, dev mmcblk0, sector 1 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0 [ 8.612947] Buffer I/O error on dev mmcblk0, logical block 0, async page read [ 8.629257] mmcblk0: unable to read partition table [ 12.685737] Freeing initrd memory: 4492K [ 12.780932] Freeing unused kernel image (initmem) memory: 2148K [ 12.794177] Run /init as init process Loading, please wait... Starting systemd-udevd version 252.6-1 [ 44.884307] blk_print_req_error: 6 callbacks suppressed [ 44.884582] I/O error, dev mmcblk0, sector 31116160 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 0 [ 44.925180] I/O error, dev mmcblk0, sector 31116161 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 0 [ 44.953427] I/O error, dev mmcblk0, sector 31116162 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 0 [ 44.981115] I/O error, dev mmcblk0, sector 31116163 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 0 [ 45.008575] I/O error, dev mmcblk0, sector 31116164 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 0 [ 45.036275] I/O error, dev mmcblk0, sector 31116165 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 0 [ 45.064190] I/O error, dev mmcblk0, sector 31116166 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 0 [ 45.092390] I/O error, dev mmcblk0, sector 31116167 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 0 [ 45.126075] I/O error, dev mmcblk0, sector 31116160 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0 [ 45.153240] I/O error, dev mmcblk0, sector 31116161 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0 [ 45.188582] Buffer I/O error on dev mmcblk0, logical block 3889520, async page read . . . Begin: Running /scripts/local-block ... done. [ 123.749712] blk_print_req_error: 86 callbacks suppressed [ 123.749997] I/O error, dev mmcblk0, sector 31116160 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 0 [ 123.790342] I/O error, dev mmcblk0, sector 31116161 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 0 [ 123.817477] I/O error, dev mmcblk0, sector 31116162 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 0 [ 123.844480] I/O error, dev mmcblk0, sector 31116163 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 0 [ 123.871877] I/O error, dev mmcblk0, sector 31116164 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 0 [ 123.898862] I/O error, dev mmcblk0, sector 31116165 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 0 [ 123.926012] I/O error, dev mmcblk0, sector 31116166 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 0 [ 123.952997] I/O error, dev mmcblk0, sector 31116167 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 0 [ 123.985590] I/O error, dev mmcblk0, sector 31116160 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0 [ 124.012045] I/O error, dev mmcblk0, sector 31116161 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0 [ 124.044322] Buffer I/O error on dev mmcblk0, logical block 3889520, async page read [ 124.216650] Buffer I/O error on dev mmcblk0, logical block 3889520, async page read done. [ 124.518582] Buffer I/O error on dev mmcblk0, logical block 3889520, async page read [ 124.690597] Buffer I/O error on dev mmcblk0, logical block 3889520, async page read Gave up waiting for root file system device. Common problems:

  • Boot args (cat /proc/cmdline)
    • Check rootdelay= (did the system wait long enough?)
  • Missing modules (cat /proc/modules; ls /dev) ALERT! UUID=68d82fa1-1bb5-435f-a5e3-862176586eec does not exist. Dropping to a shell! (initramfs)

I am using SanDisk 16GB Ultra microSDHC UHS-I/U1 Class 10. Here is the sd card info from u-boot image It the same as mmc node in bootrom.dts.

The Linux image on your release v3.5.0. CPU clock is100 MHz, DDR4 clock 300MHz.

Could you give me some advice about this? Thanks.

eugene-tarassov commented 8 months ago

Most probably SD fails when kernel switches from bus width 1-bit and low speed to 4-bit high speed. This is usually caused by a problem with SD card connection. Check your board pin location constraints and wiring. You can also try to change SD bus parameters in the device tree for the board.