Re: Troubles booting Pi2 from USB using bootcode.bin method

From: Mark Millard via freebsd-arm <freebsd-arm_at_freebsd.org>
Date: Sun, 31 Oct 2021 05:57:12 UTC

On 2021-Oct-30, at 14:35, bob prohaska <fbsd@www.zefox.net> wrote:

> On Sat, Oct 30, 2021 at 01:41:52AM -0700, Mark Millard via freebsd-arm wrote:
> . . .
> I've captured one failure session at
> http://www.zefox.net/~fbsd/rpi2/bootproblems/bootlog-usb3-solo.fail
> but cannot reliably reproduce it. 

Later below I'll list some notes about the failure modes shown in
> 
> http://www.zefox.net/~fbsd/rpi2/bootproblems/


>> When the console offers the
>> U-Boot> 
>> prompt, is that coming from bootcode.bin, or something else?

The U-Boot> prompt is from u-boot.bin (i.e., U-Boot itself). This
is after bootcode.bin and start.elf do their part of the boot sequence.

>> Could anything be learned from trying to boot the armv7-configured
>> disk on a Pi3B or B+ ?

You could try the same microsd card, USB3 powered hub, and USB3
drive on a RPi3B or RPi3B+ . This would not use the bcm2709-rpi-2-b.dtb .

>> That's a relatively easy experiment.  I'm
>> trying to use a rather old Pi with a comparatively new USB drive.
>> The Pi3s on hand are at least somewhat more modern.
> 

In my RPi2B v1.1 context, when I have access, the USB3 portable SSD is
is first generation USB3 as I remember --but does not require a powered
hub.



Failure mode notes:


For:

. . .
Found 4 ports, multi_tt = 0
Enabling PORT POWER on port 1
Enabling PORT POWER on port 2
Enabling PORT POWER on port 3
Enabling PORT POWER on port 4
Waiting for devices to respond to reset
Found device on port 1
Found highspeed device
Set address 7
Num devices = 4, addr = 7
get_config_descriptor 85 bytes
device class = 0
interface_desc[1] = 4
Device found: type = Mass storage, addr = 7
Trying booting from MSD device addr 7
Retrieving the config descriptor
Found ep_in = 00000001, ep_out = 00000002
GetMaxLun returned 0, max_lun = 0
Sending and retrying TEST_UNIT_READY
Failed to test volume, probably not ready
init_msd returned -2
Failed initialising mass storage device
Trying booting from Ethernet device addr 5
Trying booting from Ethernet device addr 5
Trying booting from Ethernet device addr 5
. . .

This failure mode never even reads a file from the USB3 drive.
U-Boot is not relevant. Not even the RPi* firmware on the USB3
drive is relevant.


For:

. . .
U-Boot 2020.10 (Apr 09 2021 - 04:09:01 +0000)

DRAM:  948 MiB
RPI 2 Model B (0xa21041)
MMC:   mmc@7e300000: 1
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)
. . .

This made it to U-Boot. usb_ready_retry, usb_pgood_delay,
and/or usb_max_blk use might help?



For:

. . .
U-Boot 2020.10 (Apr 09 2021 - 04:09:01 +0000)

DRAM:  948 MiB
Error binding driver 'bcm283x_pinctrl': -12
Error binding driver 'serial_pl01x': -12
Error binding driver 'dwc2_usb': -12
Error binding driver 'sdhci-bcm2835': -12
Error binding driver 'simple_bus': -12
Error binding driver 'bcm2835_video': -12
Some drivers failed to bind
Error binding driver 'simple_bus': -12
Some drivers failed to bind
initcall sequence 3b3e2498 failed at call 0001a270 (err=-12)
### ERROR ### Please RESET the board ###


This made it to U-Boot but seems to be a different failure mode.
I've no clue about the drivers that "failed to bind" or why. I
again wonder about unreliable I/O but have not specific evidence.



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