Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Apr 2020 20:00:08 -0700
From:      bob prohaska <fbsd@www.zefox.net>
To:        Mark Millard <marklmi@yahoo.com>
Cc:        freebsd-arm <freebsd-arm@freebsd.org>, bob prohaska <fbsd@www.zefox.net>
Subject:   Re: Booting from USB on RPI3
Message-ID:  <20200425030008.GB7044@www.zefox.net>
In-Reply-To: <5A943B45-FE58-452D-BBC5-534756782276@yahoo.com>
References:  <20200423212614.GA3996@www.zefox.net> <328B7083-1119-43F1-A6E4-61F1FB9E922E@yahoo.com> <20200423233259.GD3996@www.zefox.net> <74DB7BC9-8F60-404B-BF7B-02B06D5A1011@yahoo.com> <20200424021808.GA4638@www.zefox.net> <F0C464CD-2E1A-487C-97D3-D79C7A197132@yahoo.com> <20200424195953.GA6707@www.zefox.net> <5FA69E16-72DE-4175-A0FB-BEFA1A865633@yahoo.com> <20200425001743.GA7044@www.zefox.net> <5A943B45-FE58-452D-BBC5-534756782276@yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Apr 24, 2020 at 05:47:33PM -0700, Mark Millard wrote:
> On 2020-Apr-24, at 17:17, bob prohaska <fbsd at www.zefox.net> wrote:
> 
> > On Fri, Apr 24, 2020 at 03:09:35PM -0700, Mark Millard wrote:
> > [huge snip, hope nothing vital was lost]
> >> 
> >> Now that using both the microsd card and USB drive
> >> as a pair to boot has been shown to work, have you
> >> made the USB drive match what is used on from
> >> the microsd card (such as the msdos file system)
> >> and checked what the USB drive does without
> >> involving the microsd card?
> >> 
> >> (Although, I wonder if the "10 sec" issue ends up
> >> involved, possibly blocking this way of working.)
> > 
> > No. If there's no microSD at all the Pi3B is simply inert
> > on power-up. No rainbow screen, no serial console, nothing. 
> > The OTP boot-from-usb bit is set according to Raspbian,
> > so mine is one of the Pi3's that requires a microSD card.
> 
> Is the RPi3 attached to a powered USB hub? 
Yes.

> Directly to the USB drive? 
Tried that long ago, the power supply on the Pi couldn't cope.
No obvious reason to think it'd be different now.

> A different, probably better, experiment is suggested
> later, one that avoids this USB drive.
> 
> > If there's no microSD filesystem to fall back to, maybe
> > u-boot would keep trying until the USB hard drive woke up.
> 
> u-boot would have to load from someplace and be started
> first in order to be involved at all. The initial code
> is not u-boot code but code internal to the SoC (internal
> firmware).
The Pi3 is able to load bootcode.bin (alone)  from the 
microSD promptly.  Then u-boot can rattle the USB drive. 
If there's nothing else to boot on the microSD it might 
keep trying, how long I don't know. 

> 
> > Somebody also mentioned recompiling u-boot with a longer 
> > timeout, not an unreasonable step.  For now I'll declare 
> > victory and retreat 8-)
> 
> Such would not change the internal firmware code involved
> in looking for msdos file system(s) on mass storage devices
> with a bootcode.bin in the proper place. 
Thus the need for a microSD with a customizable bootcode.bin.

> If that code
> does not find the device in its time frame, bootcode.bin
> is not found and, so, not used.
> 
> Failing to find such a bootcode.bin means using the older,
> buggier code that is the reset of the internal firmware.
> This code is more likely to have problems with drives.
> 
Indeed, on mine it does not appear to even start. AIUI,
a Pi set up to boot without a microSD card should at least
flash the rainbow screen. Mine does nothing.

> > I gather the Raspberry Pi Foundation didn't more widely 
> > publicise the boot-from-usb feature because it didn't work 
> > with a too-large fraction of USB storage devices.
> 
> Which leads to an alternate experiment: a different USB
> "drive", one without the long wait.
> 
> Technically this could be a USB microsd card reader
> with the media you can boot from the microsd card
> slot: That might well prove that you can boot without
> use of the microsd card slot so long as the USB drive
> is compatibile. If yes: Then it becomes a case of
> selecting an appropriate USB drive and getting it set
> up.
>

Is there some larger question that I'm not recognizing?
I've tried a usb flash drive with FreeBSD on it a couple
of times with no microSD. Nothing happened, not even an
output on the serial console. No powered hub in the loop.
 
> > Having 
> > now seen the exercise in person, I understand their motives. 
> > There was absolutely no chance of success without the vast
> > amount of help I got on this list.  
> 
> Given the above possible experiment, are you sure that
> you want to give up now? 

What is the question to be answered? 

I wanted to see if buildworld works any better on a 
mechanical disk than a well-used microSD card. So far, 
the answer appears to be yes: Not a single "indefinite 
wait...." warning even when ~900 megs of swap is in 
use and the machine is crawling at around 70% idle.  

Thanks for reading!

bob prohaska





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20200425030008.GB7044>