Re: Strange u-boot behavior

From: bob prohaska <fbsd_at_www.zefox.net>
Date: Mon, 7 Jun 2021 11:40:16 -0700
On Sun, Jun 06, 2021 at 10:34:26AM -0700, Mark Millard via freebsd-arm wrote:
> 
> 
> On 2021-Jun-6, at 09:00, bob prohaska <fbsd at www.zefox.net> wrote:
> 
> > 
> > It's a dual-boot system, with a complete FreeBSD-current  install
> > on both USB and microSD storage. 
> 
> How do you control which device provides kernel+world
> if both have a kernel_world?
> 

If the machine is powered up and not touched, it boots from the
microSD card. If boot is interrupted at the u-boot prompt it's
(was) possible to issue a 
usb reset
command, at which point the external USB hard drive was discovered.
At that point issuing a 
run bootcmd_usb0
command would boot kernel and mount world from the USB device. 


> I suggest trying the same vintage that is on 13.0-RELEASE's

I've written the 13.0-release image to a microSD card and tried
that. It reports a version of
U-Boot 2020.10 (Apr 09 2021 - 03:55:54 +0000)

Stopped at the u-boot prompt and given the 
usb reset command, zero storage devices are found. However,
usb tree still reports

USB device tree:
  1  Hub (480 Mb/s, 0mA)
  |   U-Boot Root Hub 
  |
  +-2  Hub (480 Mb/s, 2mA)
    |
    +-3  Vendor specific (12 Mb/s, 90mA)
    |    FTDI FT232R USB UART AM00FGTR
    |  
    +-4  Vendor specific (480 Mb/s, 2mA)
    |  
    +-5  Mass Storage (480 Mb/s, 0mA)
         ASMT ASM105x 12345678D558

The mismatch between what usb reset and usb tree report strikes me
as extremely puzzling.
 
As an experiment, I tried booting with no microSD card installed at
all. This got confusing; u-boot still came up, apparently from the
USB hard drive. The USB disk is still not found by usb scan, but it 
is recognized by  usb tree. 

As a final test I tried connecting a monitor that had been used with 
this Pi previously. The monitor's presence made no difference, the
display looked normal.  

A hands-off boot to single user is successful from the microSD card. 
It's possible to see and access the USB hard drive. 

At this point I'm beginning to suspect some obscure mischief with the
USB-SATA adapter, based only on earlier intermittent problems detecting
the USB hard drive. In those cases a few repeats of usb scan found
the disk and allowed booting from it.   

Thanks for following this goose chase!

bob prohaska
 
Received on Mon Jun 07 2021 - 18:40:16 UTC

Original text of this message