Comment 13 for bug 1998513

Revision history for this message
Heinrich Schuchardt (xypron) wrote (last edit ):

u-boot-qemu 2021.01+dfsg-3ubuntu0~20.04.6 package tested successfully
with the following observations which are not a change from 2021.01+dfsg-3ubuntu0~20.04.5:

Booting https://cdimage.ubuntu.com/ubuntu-server/focal/daily-preinstalled/current/focal-preinstalled-server-riscv64+unmatched.img.xz (2022-10-31 07:04) on QEMU failed with

Retrieving file: /boot/initrd.img-5.15.0-1022-generic
118495394 bytes read in 15 ms (7.4 GiB/s)
Retrieving file: /boot/vmlinuz-5.15.0-1022-generic
29512704 bytes read in 4 ms (6.9 GiB/s)
append: root=LABEL=cloudimg-rootfs ro earlycon single
Retrieving file: /lib/firmware/5.15.0-1022-generic/device-tree/qemu-riscv.dtb
Failed to load '/lib/firmware/5.15.0-1022-generic/device-tree/qemu-riscv.dtb'
Skipping l0r for failure retrieving fdt
SCRIPT FAILED: continuing...
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
Scanning disk virtio-blk#8...

due to this entry in /boot/extlinux/extlinux.conf:

fdtdir /lib/firmware/5.15.0-1022-generic/device-tree/

Booting manually worked with the following commands:

=> virtio scan
=> load virtio 0:1 $kernel_addr_r /boot/vmlinuz-5.15.0-1022-generic
29512704 bytes read in 3 ms (9.2 GiB/s)
=> load virtio 0:1 $ramdisk_addr_r /boot/initrd.img-5.15.0-1022-generic
118495394 bytes read in 14 ms (7.9 GiB/s)
=> setenv bootargs root=/dev/vda1
=> booti $kernel_addr_r $ramdisk_addr_r:$filesize $fdtcontroladdr

https://cdimage.ubuntu.com/releases/kinetic/release/ubuntu-22.10-preinstalled-server-riscv64+unmatched.img.xz booted in the same way:

=> load virtio 0:1 $kernel_addr_r /boot/vmlinuz-5.19.0-1004-generic
31656960 bytes read in 3 ms (9.8 GiB/s)
=> load virtio 0:1 $ramdisk_addr_r /boot/initrd.img-5.19.0-1004-generic
111792546 bytes read in 13 ms (8 GiB/s)
=> setenv bootargs root=/dev/vda1
=> booti $kernel_addr_r $ramdisk_addr_r:$filesize $fdtcontroladdr
Bad Linux RISCV Image magic!

We should consider moving images for QEMU/Unmatched to using GRUB.