Is there a readable guide to configuring u-boot so it can
find usb hard disks during boot of a raspberry pi 3b+ ?
Below is a sample of a recent boot attempt, using a serial
console. The hair-puller is the scan for usb storage devices
following usb reset. Sometimes it works, sometimes it doesn't.
I've tinkered with setting delays in config.txt and with
usb_pgood_delay being between .1 and 40000, understood to be
in milliseconds. Nothing seems to make a consistent difference,
but after enough attempts the disk shows up and can be booted.
It happens this is booting FreeBSD, but hopefully some folks
using other OS's might be able to offer hints. Once the disk
is found and booted the drive seems to work fine.
The disk is housed in a usb3-SATA enclosure and connected via
a usb3 powered hub plugged into a (usb2) port on the Pi3.
Resetting system ...
U-Boot 2020.10 (Apr 09 2021 - 03:55:54 +0000)
DRAM: 948 MiB
RPI 3 Model B (0xa02082)
MMC: mmc@7e300000: 0
Loading Environment from FAT... In: serial
Out: vidconsole
Err: vidconsole
Net: No ethernet found.
starting USB...
Bus usb@7e980000: USB DWC2
scanning bus usb@7e980000 for devices... unable to get device descriptor (error=-22)
4 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found
Hit any key to stop autoboot: 0
U-Boot> usb reset
resetting USB...
Bus usb@7e980000: USB DWC2
scanning bus usb@7e980000 for devices... unable to get device descriptor (error=-22)
usb_new_device: Cannot read configuration, skipping device 152d:0583
4 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found
U-Boot> setenv usb_pgood_delay 1
U-Boot> usb reset
resetting USB...
Bus usb@7e980000: USB DWC2
scanning bus usb@7e980000 for devices... unable to get device descriptor (error=-22)
5 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found
U-Boot> usb reset
resetting USB...
Bus usb@7e980000: USB DWC2
scanning bus usb@7e980000 for devices... unable to get device descriptor (error=-22)
5 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found
U-Boot> usb reset
resetting USB...
Bus usb@7e980000: USB DWC2
scanning bus usb@7e980000 for devices... unable to get device descriptor (error=-22)
5 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s) found
U-Boot> run bootcmd_usb0
Device 0: Vendor: SABRENT Rev: 1214 Prod:
Type: Hard Disk
Capacity: 953869.7 MB = 931.5 GB (1953525168 x 512)
... is now current device
Scanning usb 0:1...
Found EFI removable media binary efi/boot/bootaa64.efi
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
Scanning disk
mmc@7e300000.blk...
** Unrecognized filesystem type **
Scanning disk usb_mass_storage.lun0...
** Unrecognized filesystem type **
Found 6 disks
No EFI system partition
BootOrder not defined
EFI boot manager: Cannot load any image
1259212 bytes read in 33 ms (36.4 MiB/s)
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
Booting /efi\boot\bootaa64.efi
From this point on boot is normal.
If anybody has hints please share them....
Thanks for reading,
bob prohaska
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)