Cookie Consent by TermsFeed

FreeBSD, Raspberry PI - problems booting with USB powered hub connected

FreeBSD, Raspberry PI - problems booting with USB powered hub connected

I’ve been using Raspberry Pis since 2012, running both Linux and FreeBSD.

A couple of Raspberry Pi 4 devices are running local services and are performing as backup servers. They’ve been running for one year on Alpine and btrfs but I’ve then decided to convert both of them to FreeBSD and ZFS.

Everything is ok, I can boot from a read only SD card and use the external usb disks as ZFS pools/volumes. The Rpi4 has two USB3 ports, so I’m using a powered USB 3.0 hub. FreeBSD is able to detect it, but there seems to be a problem with u-boot.

If u-boot detects there’s a powered hub, it seems to go crazy and continue to try to boot from the USB hub. Even if you have a bootable disk/usb pen, u-boot just goes crazy and isn’t even able to recognize the partitions on the SD card. The result is that the Rpi4 won’t boot and start to loop.

I’ve been able to solve by recompiling u-boot without any USB support. This means I always have to use a SD card (or a network boot), but it’s ok for me. U-Boot won’t even see the USB stack and boot directly from the local SD. Then, when FreeBSD kernel has been loaded, all the USB devices will be detected.

If you want to try my binary file - for Raspberry 4, compiled on 03/12/2021, you can find it here. The file is provided as is, it’s working for me but there’s no gurantee that it will be okay for you. I don’t take responsibility at all.


See also