Raspberry Pi B FreeBSD 11.2 does not boot with USB pendrive inserted

I am trying to install FreeBSD on a Raspberry Pi B (not 2 or 3, the old one).
I prepared an SD card with the FreeBSD 11.2 image from download.freebsd.org/ftp/snapshots/arm/armv6/ISO-IMAGES/ and booted the Pi with it. This seems to work fine. Then I added a USB pendrive, and used gpart to make a GPT freebsd-ufs partition on the whole drive. Now when I reboot the Pi with the pendrive inserted it does not boot any more. When I remove the pendrive it boots fine again. Below are some photos of the information on screen. (Sorry for fussy photos, I do not know how to take screenshots on FreeBSD when it does not boot.)
It seems that U-Boot detects the USB pendrive and, somehow believes that it should boot from it.
I would like to change it to "always boot from the sd card", but I do not know how.
Any tips?
 

Attachments

  • booting without pendrive.jpg
    booting without pendrive.jpg
    843.8 KB · Views: 787
  • not booting with pendrive.jpg
    not booting with pendrive.jpg
    817.6 KB · Views: 975
  • gpart.jpg
    gpart.jpg
    941.2 KB · Views: 1,049
My RPi2 recently (a few mnths ago now) started attempting to boot from USB pendrives instead of the micro-SD card.

The SD card kept being assigned as disk2, with the USB memory keys taking up disk0 and disk1, and then the system would unsuccessfully try booting from disk0 and finding no kernel file as that happened to be the /usr file system.

After much google-fu, the workaround I found was to halt the boot at the uboot loader prompt (you have two seconds) and then:

setenv loaderdev disk2
saveenv
boot

The above creates a persistent uboot.env file, so no manual intervention is needed again (unless the number of USB memory keys changes). You'll need to work out the appropriate disk number tweak.
 
started attempting to boot from USB pendrives instead of the micro-SD card.
Wasn't there a rework of FreeBSD uboot recently? I thought I read that upstream uboot is ditching the API which we were using.
So in the end we make out better because we are using the same uboot as Linux without the API which they did not use.
2 less patches required now. We will see some improvements like USB booting.
This is why I recommended -RELEASE instead of -STABLE. There is some rework in the pipe.
 
The change to try booting from USB devices probably occurred around July/August this year judging by my post in the arm mailing list.

Since then I haven't really kept up with what's happening as Great Cow BASIC on FreeBSD and macOS became my next project. So many projects, so little time :)
 
It seems that U-Boot detects the USB pendrive and, somehow believes that it should boot from it.
I would like to change it to "always boot from the sd card", but I do not know how.
Any tips?

This discussion of the RPi boot process is kind of old (i.e., 2012) but it might be useful. Here are the highlights, as they pertain to your particulars:

https://www.raspberrypi.org/forums/viewtopic.php?t=6685 said:
  1. When the Raspberry Pi is first turned on, the ARM core is off, and the GPU core is on. At this point the SDRAM is disabled.
  2. The GPU starts executing the first stage bootloader, which is stored in ROM on the SoC. The first stage bootloader reads the SD card, and loads the second stage bootloader (bootcode.bin) into the L2 cache, and runs it.


The collection of Official Documentation ("Raspberry Pi boot modes") sheds more light on the subject:

https://www.raspberrypi.org/documentation/hardware/raspberrypi/bootmodes/ said:
Boot Sequence
SD card boot
USB boot comprises the following two modes:

HTH,
 
Back
Top