Booting from USB on RPi3

Mark Millard marklmi at yahoo.com
Mon Apr 20 18:22:40 UTC 2020



On 2020-Apr-20, at 10:25, bob prohaska <fbsd atwww.zefox.net> wrote:

> Back on October 24, 2019 Mason Loring Bliss mason at blisses.org
> wrote in part:
> 
> ----------begin excerpt----------
> 
> I'm struggling with how to boot FreeBSD 12 directly from a hard drive on an
> RPi3b+, with no MMC card. It happens automatically with a Raspbian image, and
> I got Devuan to boot this way by changing the right pointers in config.txt,
> but I'm struggling to figure out how to do it on FreeBSD. I'm not sure what
> dictates the boot behaviour.
> 
> ----------end excerpt---------
> The complete post is at:
> https://lists.freebsd.org/pipermail/freebsd-arm/2019-October/020608.html
> Far as I can tell there were no replies.
> 
> In the meantime I've become interested (again) in trying to
> boot a Pi3B from a mechanical hard drive by using the "boot
> from USB" OTP feature on my Pi3B v.1.2. The feature has been
> set, according to the instructions at
> https://www.raspberrypi.org/documentation/hardware/raspberrypi/bootmodes/msd.md
> but when the microSD card is removed nothing happens (no rainbow screen) on
> power-up. Presumably  my Pi3B is too old.

Quoting https://www.raspberrypi.org/documentation/hardware/raspberrypi/bootmodes/msd.md :

QUOTE (presumes temporary boot of the typical RPi OS instead of FreeBSD)
. . . check that the OTP has been programmed with:

$ vcgencmd otp_dump | grep 17:

17:3020000a

Check that the output 0x3020000a is shown. If it is not, then the OTP bit has not been successfully programmed. In this case, go through the programming procedure again. If the bit is still not set, this may indicate a fault in the Pi hardware itself.
END QUOTE

Have you checked this? Does it report 3020000a?

> At some point the Raspberry Pi foundation introduced a new bootcode.bin
> as described in 
> https://www.raspberrypi.org/documentation/hardware/raspberrypi/bootmodes/msd.md
> which was intended to give older Pi2 and Pi3 models the ability to boot from 
> USB at the price of keeping a minimal microSD card in place. All that's
> required on the card is the new version of bootcode.bin plus an empty
> file named timeout to give a mechanical drive time to spin up.
> 
> Has anybody tried it? I wouldn't expect it to work "out of the box",
> but perhaps with some adjustments. 
> 
> In the meantime, I've gotten u-boot to the point of issuing a
> prompt and recognizing a usbboot command, but can't seem to get
> the syntax right. 
> 
> A usb reset command produces
> resetting USB...
> Bus usb at 7e980000: scanning bus usb at 7e980000 for devices... 8 USB Device(s) found
>       scanning usb for storage devices... 1 Storage Device(s) found
> and 
> U-Boot> help usbboot
> usbboot - boot from USB device
> 
> Usage:
> usbboot loadAddr dev:part
> 
> The only command that doesn't cause a syntax error is
> 
> U-Boot> usbboot 7e980000 0:1
> 
> Loading from usb device 0, partition 1: Name: usbda1  Type: U-Boot
> "Synchronous Abort" handler, esr 0x96000045
> elr: 00000000000cd2f8 lr : 00000000000aef5c (reloc)
> elr: 000000003b3a92f8 lr : 000000003b38af5c
> x0 : 000000007e980000 x1 : 000000003af6d900
> x2 : 0000000000000200 x3 : 0000000000000000
> x4 : 0000000000000200 x5 : 0000000000000040
> x6 : 2e34445342903ceb x7 : 000000003af7d9c1
> x8 : 0000000000010041 x9 : 0000000000000008
> x10: 0000000000000006 x11: 000000003af6b2e0
> x12: 0000000000000820 x13: 0000000000000001
> x14: 0000000000000001 x15: 00000000ffffffff
> x16: 0000000000000001 x17: 000000000000004b
> x18: 000000003af57de8 x19: 0000000000000001
> x20: 000000003af6d900 x21: 0000000000000200
> x22: 0000000000000200 x23: 0000000000000000
> x24: 000000003af7db90 x25: 0000000000000000
> x26: 0000000000000000 x27: 0000000000000200
> x28: 000000003f980000 x29: 000000003af4ff60
> 
> Resetting CPU ..
> 
> That seems to suggest I'm using the wrong address or 
> address format. So far, I've not been able to find any
> docs beyond the help feature at the u-boot prompt.
> 
> The usb drive is recognized as /dev/da0 when the machine
> boots 12.1-stable and has a 12.1 stable image on it.



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



More information about the freebsd-arm mailing list