Booting from USB on RPI3

Mark Millard marklmi at yahoo.com
Sat Apr 25 00:47:41 UTC 2020


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? Directly to the
USB drive? Do both ways behave the same absent a a microsd
card? (I presume the 6 sec configuration in both cses.)

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).

> 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. 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.

> 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.

> 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?


===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)



More information about the freebsd-arm mailing list