Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 18 Dec 2021 19:46:11 -0800
From:      Mark Millard via freebsd-arm <freebsd-arm@freebsd.org>
To:        bob prohaska <fbsd@www.zefox.net>
Cc:        Free BSD <freebsd-arm@freebsd.org>
Subject:   Re: Saving environment variables in u-boot
Message-ID:  <FD77B1A2-874E-4A94-A019-624198A83C83@yahoo.com>
In-Reply-To: <C1A1A1B2-D21F-472C-ABBB-2641D0D69204@yahoo.com>
References:  <20211216180704.GA4173@www.zefox.net> <214132DD-A095-4349-BB81-B79CB8CF6B0C@yahoo.com> <20211217013613.GA4452@www.zefox.net> <E2F6D50B-694A-4108-BD84-C85BC96AD832@yahoo.com> <20211218005946.GA7670@www.zefox.net> <5C44D0E6-2FF1-4EEB-B21A-83333D6FCF46@yahoo.com> <9D416106-660F-40BB-98D2-1354B53D2FEF@yahoo.com> <EC6CC83C-BC0A-4A12-866A-9FA24083FF7E@yahoo.com> <C1A1A1B2-D21F-472C-ABBB-2641D0D69204@yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
[This eventually suggests that the vintage of U-Boot used
in the default Fedora 35 is the problem: a later version
of U-Boot does not get the problem (so far).]

On 2021-Dec-18, at 17:33, Mark Millard <marklmi@yahoo.com> wrote:

> [I decided to have this specific message still under
> the old Subject line.]
> 
> Hmm.
> 
> I just tried a Fedora 35 server install on a RPi4B (8 GiByte)
> using a bus-powered USB3 SSD. It did fine until it did a around
> of downloading and installing= updates to the original image
> install. On reboot it got the:
> 
> scanning usb for storage devices... 0 Storage Device(s) found
> 
> But:
> 
> . . .
> U-Boot> editenv usb_pgood_delay
> edit: 2000
> U-Boot> usb reset
> . . . (found this time) . . .
> U-Boot> boot
> 
> got past that. I'll note that, looking around with
> printenv in U-Boot showed a:
> 
> bootdelay=2
> 
> (That I've not adjusted.)
> 
> Repeated testing has usually booted just fine but
> on occasion gets the:
> 
> scanning usb for storage devices... 0 Storage Device(s) found
> 
> The same sequence involving usb_pgood_delay has always
> managed to find the drive and boot so far.
> 

Note: This context is (so far) with no microsd card in
use at all: Pure USB3 based booting.

I ended up with an example of the USB3 SSD being in a state
that none of the parameters helped usb reset or usb stop
then usb start (many tries). What did finally work was:

U-Boot> usb stop
U-Boot> 

Then: leave the RPi4B powered but unplug the USB3 SSD
from it (so it lost power) and then plug it back in.
Finally:

U-Boot> usb start

(at the same prompt), which finally found the drive.
This had:

usb_max_blk=20
usb_pgood_delay=2000
usb_ready_retry=5

in U-Boot at the time, but I can not tell what of that
might have been necessary.

With the drive found,

U-Boot> boot

worked fine.

This is a context in which there is no external
hub and no option for non-bus power to the drive.

Question:
Does your USB drive allow direct/external power
(no hub)?

Fedora uses a different U-Boot than I've been using
with FreeBSD. But I do not know if that is contributing.
The type of USB3 SSD is the same as I've been using
with FreeBSD for some time.

So far my experiments indicate that having

uEnv.txt
or:
uboot.env

does not contribute to the U-Boot environmental
settings.

I'll note that there is another error message sequence
involved in my sequence, "cannot reset port 2!?" and
then "cannot reset port 1!?":

. . .
U-Boot> usb reset
resetting USB...
Bus xhci_pci: Register 5000420 NbrPorts 5
Starting the controller
USB XHCI 1.00
scanning bus xhci_pci for devices... cannot reset port 2!?
cannot reset port 1!?
4 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found
. . .

Sometimes repeating:

U-Boot> usb stop
. . .
U-Boot> usb start

does lead to finding the drive in only a few tries.

I'll note that the rpi4-u-boot.bin that Fedora 35
is using reports their build as:

U-Boot 2021.10 (Oct 14 2021 - 00:00:00 +0000)

Tracking the development/test builds ends up with:

U-Boot 2021.04-rc3 (Mar 13 2021 - 00:00:00 +0000)

instead.

Hmm. I replaced rpi4-u-boot.bin with the newer one
and so far, no problems finding the USB SSD or
booting in general.


===
Mark Millard
marklmi at yahoo.com




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?FD77B1A2-874E-4A94-A019-624198A83C83>