u-boot fails to load FDT from linux-firmware on qemu builders

Bug #1940984 reported by Colin Watson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
u-boot-menu (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

I tried to do a routine upgrade and reflash of the Launchpad riscv64 builders, which pulled in linux-image-5.11.0-1017-generic 5.11.0-1017.18~20.04.1. The resulting image failed to boot with the following (complete) console output:

    Device 0: QEMU VirtIO Block Device
                Type: Hard Disk
                Capacity: 71680.0 MB = 70.0 GB (146800640 x 512)
    ... is now current device
    Scanning virtio 0:1...
    Found /boot/extlinux/extlinux.conf
    Retrieving file: /boot/extlinux/extlinux.conf
    1391 bytes read in 1 ms (1.3 MiB/s)
    U-Boot menu
    1: Ubuntu 20.04.3 LTS 5.11.0-1017-generic
    2: Ubuntu 20.04.3 LTS 5.11.0-1017-generic (rescue target)
    3: Ubuntu 20.04.3 LTS 5.8.0-29-generic
    4: Ubuntu 20.04.3 LTS 5.8.0-29-generic (rescue target)
    Enter choice: 1: Ubuntu 20.04.3 LTS 5.11.0-1017-generic
    Retrieving file: /boot/initrd.img-5.11.0-1017-generic
    189611112 bytes read in 509 ms (355.3 MiB/s)
    Retrieving file: /boot/vmlinuz-5.11.0-1017-generic
    25258496 bytes read in 70 ms (344.1 MiB/s)
    append: root=UUID=b797e480-278b-4efc-ae1a-bb1634c8cbcf rw noquiet root=/dev/vda1
    Unhandled exception: Load access fault
    EPC: 00000000fffb642c RA: 00000000fff73bc4 TVAL: 0000000000000000
    EPC: 000000008024a42c RA: 0000000080207bc4 reloc adjusted

    ### ERROR ### Please RESET the board ###

For the time being I've set `U_BOOT_DEFAULT="l1"` in `/etc/default/u-boot` to force it back to the 5.8 kernel, although that's obviously not very robust. Let me know if there's anything else useful I can provide. The full image is kind of massive (70G, though sparse so with only 13G of actual data), so I hope you can reproduce it with something more stripped-down.

I've attached the libvirt domain definition.

Revision history for this message
Colin Watson (cjwatson) wrote :
Revision history for this message
Colin Watson (cjwatson) wrote :

Hm, I actually get similar results when I revert to 5.8.0-29:

    Device 0: QEMU VirtIO Block Device
                Type: Hard Disk
                Capacity: 71680.0 MB = 70.0 GB (146800640 x 512)
    ... is now current device
    Scanning virtio 0:1...
    Found /boot/extlinux/extlinux.conf
    Retrieving file: /boot/extlinux/extlinux.conf
    1391 bytes read in 2 ms (678.7 KiB/s)
    U-Boot menu
    1: Ubuntu 20.04.3 LTS 5.11.0-1017-generic
    2: Ubuntu 20.04.3 LTS 5.11.0-1017-generic (rescue target)
    3: Ubuntu 20.04.3 LTS 5.8.0-29-generic
    4: Ubuntu 20.04.3 LTS 5.8.0-29-generic (rescue target)
    Enter choice: 3: Ubuntu 20.04.3 LTS 5.8.0-29-generic
    Retrieving file: /boot/initrd.img-5.8.0-29-generic
    181049573 bytes read in 461 ms (374.5 MiB/s)
    Retrieving file: /boot/vmlinuz-5.8.0-29-generic
    20059580 bytes read in 80 ms (239.1 MiB/s)
    append: root=UUID=b797e480-278b-4efc-ae1a-bb1634c8cbcf rw noquiet root=/dev/vda1
    Unhandled exception: Load access fault
    EPC: 00000000fffb642c RA: 00000000fff73bc4 TVAL: 0000000000000000
    EPC: 000000008024a42c RA: 0000000080207bc4 reloc adjusted

    ### ERROR ### Please RESET the board ###

I'll investigate further.

Revision history for this message
Colin Watson (cjwatson) wrote :

OK, this is actually due to the changes between u-boot-menu 4.0.1ubuntu0.1 and 4.0.2ubuntu5~20.04.1. The relevant difference is that the menu entry now has `fdtdir /lib/firmware/5.8.0-29-generic/device-tree/` (or similar) when it previously didn't load a device tree at all.

I successfully worked around this by adding the following to `/etc/default/u-boot`:

    # XXX cjwatson 2021-08-24: Revert to old (nonexistent) default, since using
    # the device tree in /lib/firmware/ results in an image that fails to boot.
    # See https://bugs.launchpad.net/bugs/1940984.
    U_BOOT_FDT_DIR="/usr/lib/linux-image-"

affects: linux-riscv-5.11 (Ubuntu) → u-boot-menu (Ubuntu)
summary: - 5.11.0-1017 fails to boot on qemu builders
+ u-boot fails to load FDT from linux-firmware on qemu builders
Revision history for this message
Heinrich Schuchardt (xypron) wrote :

The bug report indicates a "Load access fault" in U-Boot. This should be fixed.

The bug report does not contain the necessary information for analysis.

Please, provide the U-Boot version that you have been using.
Is the problem reproducible with the current U-Boot package?
Please, provide the output of U-Boot's command printenv.

Marking the bug report as incomplete.

Changed in u-boot-menu (Ubuntu):
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for u-boot-menu (Ubuntu) because there has been no activity for 60 days.]

Changed in u-boot-menu (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.