[Bug 1925267] Re: u-boot unmatched dtb does not match kernel dtb

William Wilson 1925267 at bugs.launchpad.net
Tue Jul 20 17:41:08 UTC 2021


The verification passed for focal. The daily images are building with
u-boot-menu-4.0.2ubuntu5~20.04.1 and u-boot-
sifive-2021.01+dfsg-3ubuntu0~20.04.1. I have successfully booted these
daily images in qemu and on Unmatched hardware.

Welcome to Ubuntu 20.04.2 LTS (GNU/Linux 5.8.0-29-generic riscv64)

 * Documentation: https://help.ubuntu.com
 * Management: https://landscape.canonical.com
 * Support: https://ubuntu.com/advantage

  System information as of Tue Jul 20 17:31:58 UTC 2021

  System load: 0.89
  Usage of /: 82.1% of 3.22GB
  Memory usage: 9%
  Swap usage: 0%
  Processes: 114
  Users logged in: 0
  IPv4 address for eth0: 10.0.2.15
  IPv6 address for eth0: fec0::5054:ff:fe12:3456

 * Super-optimized for small spaces - read how we shrank the memory
   footprint of MicroK8s to make it the smallest full K8s around.

   https://ubuntu.com/blog/microk8s-memory-optimisation

0 updates can be applied immediately.

Last login: Fri Jul 16 13:46:13 UTC 2021 on ttyS0
ubuntu at ubuntu:~$ apt-cache policy u-boot-menu
u-boot-menu:
  Installed: 4.0.2ubuntu5~20.04.1
  Candidate: 4.0.2ubuntu5~20.04.1
  Version table:
 *** 4.0.2ubuntu5~20.04.1 500
        500 http://ports.ubuntu.com/ubuntu-ports focal-proposed/main riscv64 Packages
        100 /var/lib/dpkg/status
     4.0.1ubuntu0.1 500
        500 http://ports.ubuntu.com/ubuntu-ports focal-updates/universe riscv64 Packages
     4.0.1 500
        500 http://ports.ubuntu.com/ubuntu-ports focal/universe riscv64 Packages
ubuntu at ubuntu:~$ apt-cache policy u-boot-sifive
u-boot-sifive:
  Installed: 2021.01+dfsg-3ubuntu0~20.04.1
  Candidate: 2021.01+dfsg-3ubuntu0~20.04.1
  Version table:
 *** 2021.01+dfsg-3ubuntu0~20.04.1 500
        500 http://ports.ubuntu.com/ubuntu-ports focal-proposed/main riscv64 Packages
        100 /var/lib/dpkg/status
     2020.10+dfsg-1ubuntu0~20.04.2 500
        500 http://ports.ubuntu.com/ubuntu-ports focal-updates/main riscv64 Packages


** Tags removed: verification-needed verification-needed-focal
** Tags added: verification-done verification-done-focal

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to u-boot in Ubuntu.
https://bugs.launchpad.net/bugs/1925267

Title:
  u-boot unmatched dtb does not match kernel dtb

Status in u-boot package in Ubuntu:
  Fix Released
Status in u-boot-menu package in Ubuntu:
  Fix Released
Status in u-boot source package in Focal:
  Fix Committed
Status in u-boot-menu source package in Focal:
  Fix Committed

Bug description:
  [Impact]

   * Without the fix, Unmatched images will not boot in qemu

  [Test Case]

   * `qemu-system-riscv64 \
          -machine virt -nographic -m 2048 -smp 4 \
          -bios /usr/lib/riscv64-linux-gnu/opensbi/generic/fw_jump.elf \
          -kernel /usr/lib/u-boot/qemu-riscv64_smode/uboot.elf \
          -device virtio-net-device,netdev=eth0 -netdev user,id=eth0 \
          -drive file=<unmatched image file>,format=raw,if=virtio`
   * Observe that the above command fails to boot the image in qemu
   * Build a new unmatched image with the version of u-boot-menu
     and u-boot in -proposed. Both are needed.
   * Re-run the above qemu command on the new image, and observe
     that it boots
   * Also boot the new image on HiFive Unmatched hardware to ensure it
     boots.

  [Regression Potential]
    While multiple hardware platforms use u-boot, the only Ubuntu
    image using u-boot-menu is the Unmatched. The risk of regression
    is therefore very low, and only the hardware boot and qemu boot
    need to be tested. 

  [Original Description]
  u-boot unmatched dtb does not match kernel dtb

  We have reverted u-boot-menu upload and stopped using kernel provided
  dtbs, because that was preventing booting hirsute images under qemu.
  As dtb generated by qemu should be used, and there is no kernel
  provided dtb for qemu platform.

  This resulted in unamtched board using dtb provided by u-boot, instead
  of loading and using dtb provided by the kernel builds.

  There are differences between u-boot & kernel dtbs that potentially
  break compat.

  There are two ways of fixing this:

  1) bring uboot dtb in-line with the kernel dtb

  2) fix qemu uboot to not load dtbs from disk, even when extlinux.conf
  asks to; and resume loading the matching kernel dtb from disk

  Option 1) sounds easier for release.

  The diff between u-boot's unmatched dtb & kernel provided dtb is at
  https://paste.ubuntu.com/p/YGKCvVM6yz/

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/u-boot/+bug/1925267/+subscriptions




More information about the foundations-bugs mailing list