riscv64 images fail to boot in qemu

Bug #1923162 reported by Dimitri John Ledkov on 2021-04-09
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux-riscv (Ubuntu)
Undecided
Unassigned
Hirsute
Undecided
Unassigned
u-boot (Ubuntu)
Critical
Unassigned
Hirsute
Critical
Unassigned
u-boot-menu (Ubuntu)
Critical
Unassigned
Hirsute
Critical
Unassigned

Bug Description

When booting v5.11 based riscv unmatched image in qemu with uboot, it fails to boot.

When booting v5.11 based riscv unmatched kernel+initrd directly, it boots fine.

Somehow, it seems that u-boot fails to correctly load & start v5.11 kernel.

Related branches

Dimitri John Ledkov (xnox) wrote :
Changed in u-boot (Ubuntu):
milestone: none → ubuntu-21.04
importance: Undecided → Critical
Dimitri John Ledkov (xnox) wrote :
Dimitri John Ledkov (xnox) wrote :

This is reproducible with any uboot from focal/groovy/hirsute.

Dimitri John Ledkov (xnox) wrote :

It appears that although fdtdir option from u-boot-menu works on bare metal, it breaks qemu booting.

Thus revert it from now, seeking more details from u-boot upstream.

Changed in u-boot-menu (Ubuntu):
status: New → Triaged
importance: Undecided → Critical
Changed in u-boot (Ubuntu):
status: New → Incomplete
importance: Critical → Low
Changed in u-boot-menu (Ubuntu):
milestone: none → ubuntu-21.04
Changed in u-boot (Ubuntu):
milestone: ubuntu-21.04 → none
Changed in linux-riscv (Ubuntu):
status: New → Invalid
tags: added: fr-1282
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package u-boot-menu - 4.0.2ubuntu4

---------------
u-boot-menu (4.0.2ubuntu4) hirsute; urgency=medium

  * Revert "Add support for ubuntu kernels location of device trees." as
    it breaks booting riscv64 images with qemu, as the qemu in-ram dtb
    should be used not the one from disk. LP: #1923162

u-boot-menu (4.0.2ubuntu3) hirsute; urgency=medium

  * Add support for ubuntu kernels location of device trees.

 -- Dimitri John Ledkov <email address hidden> Mon, 12 Apr 2021 15:50:07 +0100

Changed in u-boot-menu (Ubuntu):
status: Triaged → Fix Released
Dimitri John Ledkov (xnox) wrote :

So the issue around providing fdtdir was that qemu did not know what fdt file to attempt loading, and hence was failing to boot.

Now that we dropped fdtdir in extlinux.conf, all riscv64 boards need to use preboot to pick up fdt from the .itb. This was already the case on unleashed and smode, but not on unmatched.

Add USE_PREBOOT config option to unmatched too, thus bringing it inline with unleashed & qemu.

Changed in u-boot (Ubuntu):
status: Incomplete → Confirmed
importance: Low → Critical
milestone: none → ubuntu-21.04
Changed in u-boot (Ubuntu):
status: Confirmed → In Progress
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package u-boot - 2021.01+dfsg-3ubuntu6

---------------
u-boot (2021.01+dfsg-3ubuntu6) hirsute; urgency=medium

  * Set USE_PREBOOT on unmatched board too (just like unleashed & qemu),
    otherwise u-boot's fdtfile from itb is not used (i.e. when
    extlinux.conf does not specify fdtdir). LP: #1923162

 -- Dimitri John Ledkov <email address hidden> Tue, 13 Apr 2021 14:52:32 +0100

Changed in u-boot (Ubuntu Hirsute):
status: In Progress → Fix Released
Changed in u-boot (Ubuntu Hirsute):
status: Fix Released → New
tags: added: block-proposed block-proposed-hirsute
Iain Lane (laney) on 2021-04-21
tags: removed: block-proposed block-proposed-hirsute
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package u-boot - 2021.01+dfsg-3ubuntu8

---------------
u-boot (2021.01+dfsg-3ubuntu8) hirsute; urgency=medium

  * Skip processing fdtdir on qemu-riscv64_smode target, as it crashes the
    riscv qemu VM. LP: #1925267 LP: #1923162

 -- Dimitri John Ledkov <email address hidden> Wed, 21 Apr 2021 01:25:13 +0100

Changed in u-boot (Ubuntu Hirsute):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers