[Bug 233097] U-Boot/ubldr loaderdev broken

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Fri Nov 9 21:10:04 UTC 2018


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=233097

            Bug ID: 233097
           Summary: U-Boot/ubldr loaderdev broken
           Product: Base System
           Version: 12.0-STABLE
          Hardware: arm
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: arm
          Assignee: freebsd-arm at FreeBSD.org
          Reporter: pawel.worach at gmail.com

Board: bcm283x armv6
U-Boot: 2018.09
FreeBSD: stable/12 r340282

Setting loaderdev in U-Boot is supposed to set the correct currdev for ubldr,
this seems to be broken.

Setting loaderdev to "mmc 0:3.0" seems to cause ubldr to use unit=0, slice=0
and partition=3 instead of slice=3 and partition=0.

This is caused by stor_open() in stand/uboot/lib/disk.c which loads a vararg
uboot_devdesc struct as a disk_devdesc struct.

My workaround was to use the disk_devdesc struct in stand/uboot/common/main.c
instead of the uboot_devdesc struct.

Post-workaround:
U-Boot> setenv loaderdev mmc 0:3.0
U-Boot> boot
...
U-Boot env: loaderdev='mmc 0:3.0'
Found U-Boot device: disk
  Checking unit=0 slice=3 partition=0... good.
Booting from disk0s3a:

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-arm mailing list