Re: U-boot on RPI3, sees disk but won't boot it

From: bob prohaska <fbsd_at_www.zefox.net>
Date: Thu, 22 Sep 2022 01:45:00 UTC
On Wed, Sep 21, 2022 at 01:27:45PM -0700, Mark Millard wrote:
> I used:
> 
> tar -xf /usr/ports/distfiles/u-boot/u-boot-2022.04.tar.bz2 u-boot-2022.04/include/configs/rpi.h
> 
> to create a local u-boot-2022.04/include/configs/rpi.h
> in order to look at the modern file. The
> ENV_DEVICE_SETTINGS line from:
> 
> #define CONFIG_EXTRA_ENV_SETTINGS \
> 	"dhcpuboot=usb start; dhcp u-boot.uimg; bootm\0" \
> 	ENV_DEVICE_SETTINGS \
> 	ENV_DFU_SETTINGS \
> 	ENV_MEM_LAYOUT_SETTINGS \
> 	BOOTENV
> 
> appears to be at line 173.
> 
> A correct patch file finds the matching lines despite the
> difference in line numbers, a difference that is not too
> large by its matching criteria (given correct text matches).
> 
> The modern FreeBSD lists might allow text attachments so
> I'll try that publicly. (It still has the 210 line number.)
> 
The patch emailed as an attachment applied without a problem.
Better still, it seemed to help with mass storage device discovery
for the first five or so tries. Around try six, the system lost
the ability to recognize the USB mass storage device and then
seemed to get stuck in a loop, with repeated attempts failing. 

After setting initial_turbo=60 in config.txt the first reboot
found the disk, the second did not. Running usb reset then
found the disk, but run bootcmd_usb0 seemingly caused a reset
that  _then_ found the disk. 

The display of usb tree output isn't always the same. On a failed try it 
looked like
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 AM00KE3E
    |  
    +-4  Vendor specific (480 Mb/s, 2mA)
    |  
    +-5  Hub (480 Mb/s, 100mA)
      |  GenesysLogic USB2.1 Hub 
      |
      +-6  Mass Storage (480 Mb/s, 500mA)
           JMicron  
         
On a successful try it looked like 
       scanning usb for storage devices... 1 Storage Device(s) found
Hit any key to stop autoboot:  0 
U-Boot> usb tree
USB device tree:
  1  Hub (480 Mb/s, 0mA)
  |   U-Boot Root Hub 
  |
  +-2  Hub (480 Mb/s, 2mA)
    |
    +-3  Hub (480 Mb/s, 100mA)
    | |  GenesysLogic USB2.1 Hub 
    | |
    | +-6  Mass Storage (480 Mb/s, 500mA)
    |      JMicron SABRENT 000000000000A
    |    
    +-4  Vendor specific (12 Mb/s, 90mA)
    |    FTDI FT232R USB UART AM00KE3E
    |  
    +-5  Vendor specific (480 Mb/s, 2mA)

Not sure if this is even relevant, but it does seem odd.

Thanks for all your help!

bob prohaska