blob: 74a11b79646ae63be08764af9b7a7ba20a0d9016 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
id = 2945
title = "Commit da954d0e introduces a regression on sifive_unleashed when booting from SD card"
state = "opened"
created_at = "2025-05-01T18:13:10.395Z"
closed_at = "n/a"
labels = []
url = "https://gitlab.com/qemu-project/qemu/-/issues/2945"
host-os = "Ubuntu 2022.04"
host-arch = "x86_64"
qemu-version = "v10.0.0-365-g73d29ea241"
guest-os = "U-Boot"
guest-arch = "RISC-V64"
description = """In U-Boot CI, we started to update from v8.2.0 to v9.2.3 and found that the sifive_unleashed target was failing to boot from SD card in our tests (we also test via SPI and this is fine). I have bisected the problem down to commit [da954d0e ("hw/sd/sdcard: Add spi_cmd_SEND_CSD/CID handlers (CMD9 & CMD10)")](https://gitlab.com/qemu-project/qemu/-/commit/da954d0e32444f122a41c24948d4d1c718bf66d4).
When running QEMU we see the following output in the failure case as the only output:
```
U-Boot SPL 2025.07-rc1-00033-gad60d9792896 (May 01 2025 - 17:08:34 +0000)
Trying to boot from MMC1
spl: mmc init failed with error: -110
Error: -110
SPL: failed to boot from all boot devices
#"""
reproduce = """1. wget -O - https://github.com/pengutronix/genimage/releases/download/v14/genimage-14.tar.xz | tar -C /tmp -xJ ; cd /tmp/genimage-14
2. ./configure && make -j$(nproc)
3. git clone https://source.denx.de/u-boot/u-boot.git; cd u-boot
4. wget -O - https://github.com/riscv-software-src/opensbi/releases/download/v1.3.1/opensbi-1.3.1-rv-bin.tar.xz | tar -C /tmp -xJ
5. export OPENSBI=/tmp/opensbi-1.3.1-rv-bin/share/opensbi/lp64/generic/firmware/fw_dynamic.bin
6. make O=/tmp/sifive_unleashed CROSS_COMPILE=riscv64-linux- sifive_unleashed_defconfig
7. make O=/tmp/sifive_unleashed CROSS_COMPILE=riscv64-linux- -sj$(nproc)
8. mkdir -p root
9. cp /tmp/sifive_unleashed/spl/u-boot-spl.bin .
10. cp /tmp/sifive_unleashed/u-boot.itb .
11. rm -rf tmp
12. genimage --inputpath . --config board/sifive/unleashed/genimage_sdcard.cfg
13. cp images/sdcard.img /tmp/sifive_unleashed/
14. qemu-system-riscv64 -smp 5 -m 8G -nographic -M sifive_u,msel=11 -bios /tmp/sifive_unleashed/spl/u-boot-spl.bin -drive file=/tmp/sifive_unleashed/sdcard.img,format=raw,if=sd"""
additional = """The genimage tool is required for making the disk images used here. If building everything here is too much, I can provide the U-Boot binaries needed here out of band."""
|