• Re: u-boot usb mass storage discovery problems

    From Steve Wills@3:770/3 to bob prohaska on Sat Mar 5 20:28:56 2022
    Hi,

    On Monday, November 15, 2021 at 6:26:09 PM UTC-5, bob prohaska wrote:
    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.

    Thank you for this, setting usb_pgood_delay=4000 helped my Pi find it's USB storage and let me boot from it.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From bob prohaska@3:770/3 to Steve Wills on Sun Mar 6 17:43:22 2022
    Steve Wills <steve.wills@gmail.com> wrote:

    Thank you for this, setting usb_pgood_delay=4000 helped my Pi find it's USB storage and let me boot from it.

    Very glad it helped! The idea came from a correspondent on the
    freebsd-arm mailing list, not my own insights...8-(

    There still remains need for a readable u-boot manual. I have
    figured out that even if a Pi (3 in this case) has no microSD
    card and still managed to find and start u-boot on a USB device
    it's unable to save environment variable to the USB device, it
    still wants to write the change to microSD.

    Perhaps recompiling u-boot with appropriate options will either
    make the location of uboot.env selectable, or maybe there's a
    more clever trick. If anybody knows please make a noise.....

    bob prohaska

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Steve Wills@3:770/3 to bob prohaska on Mon Mar 7 06:42:00 2022
    On Sunday, March 6, 2022 at 12:43:24 PM UTC-5, bob prohaska wrote:
    Very glad it helped! The idea came from a correspondent on the
    freebsd-arm mailing list, not my own insights...8-(

    There still remains need for a readable u-boot manual. I have
    figured out that even if a Pi (3 in this case) has no microSD
    card and still managed to find and start u-boot on a USB device
    it's unable to save environment variable to the USB device, it
    still wants to write the change to microSD.

    Perhaps recompiling u-boot with appropriate options will either
    make the location of uboot.env selectable, or maybe there's a
    more clever trick. If anybody knows please make a noise.....

    These lines in /usr/ports/sysutils/u-boot-rpi3/files/rpi3_fragment:

    CONFIG_OF_EMBED=n
    CONFIG_OF_BOARD=y
    CONFIG_CMD_BMP=y
    CONFIG_ENV_IS_IN_FAT=y
    CONFIG_ENV_FAT_INTERFACE="usb"
    CONFIG_ENV_FAT_DEVICE_AND_PART="0:1"
    CONFIG_ENV_FAT_FILE="uboot.env"
    CONFIG_RPI_EFI_NR_SPIN_PAGES=2
    CONFIG_PREBOOT="setenv usb_pgood_delay 4000; usb start"

    seem to produce a u-boot which will delay by default and *save* it's environment to the fat on usb, but it still doesn't *load* those. Still trying to figure that out. This commit seems to have added a way to delay loading the environment:

    https://github.com/u-boot/u-boot/commit/06fd853890f23491605bfd6c9ab0116b79e15aaa

    but I'm not sure how to trigger it after the (properly delayed) usb start finishes.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)