For the record:
Just tried it (tested with Raspberry Pi 400).
There's no need to download the
u-boot.bin from
https://sourceforge.net/projects/fbsd-u-boot-2021-04-apr18-2021/files/u-boot.bin/download anymore, the one in the package repository works too.
sysutils/u-boot-rpi4 - be sure to get at least 2021.04 or later.
I found another trick: If you have a spare USB pen drive, just
dd
it with the same FreeBSD image as the SD card, plug both in and the Raspberry will magically boot from the SD!
You then can
pkg install u-boot-rpi4
on the Raspi and copy the file in the already mounted msdos partition:
cp /usr/local/share/u-boot/u-boot-rpi4/u-boot.bin /boot/msdos/
Be sure to use
quarterly packages since latest are too old and won't work.
ABI | latest | quarterly |
FreeBSD:13:aarch64 | 2020.10 | 2021.04 |
WTF? Why are latest older than quarterly?
Edit: In case you wonder why i used the pen drive to boot the SD card rather than just putting the card in a reader and mount it there: I don't have a SD card reader.
For the laughs: My o(d)dyssey to
install FreeBSD without an SD card reader:
Items available: Raspberry Pi 400, 1 SD card with shipped Raspi OS (16GB), 1 spare SD card (32GB), 1 USB pen drive (4GB).
- Use Raspberry Pi OS to dd FreeBSD to the pen drive
- First, lets do a freebsd-update fetch install. Ooops, only 600MB free space left on the pen drive. Can't do much with it.
- Ok, lets fetch another FreeBSD image from within the FreeBSD on the pen drive in order to put it on the SD card
- lots of ssl key errors need to be resolved
- Finally, i got an image. Try to dd it to the internal SD card slot
- Use /dev/da0 at first since it's the device you see in all the tutorials.
- After 2 hours of dd running i realized it's the pen drive i wanted to overwrite with the image rather than the SD card. Bummer!
- Read up on Raspberry devices and try /dev/mmc. No luck, no /dev/mmc devices present when booting from pen drive
- Need another plan
- Linux to the rescue!
- Use shipped Raspberry Pi OS to install tinyCore Linux on the pen drive
- I used tinyCore since Raspberry Pi OS doesn't run well from my pen drive. Lots of ext4 errors after a while.
- Use tinyCore to fetch and dd the FreeBSD image to the spare SD card using the internal SD card slot. It worked!
- Didn't want to download files from Stackoverflow, so i need a working FreeBSD installation now:
- Use Raspberry Pi OS to dd the pen drive with FreeBSD - again
- Again trying to mount the SD card from the Freebsd running from the pen drive - no luck, no /dev/mmc devices present
- * after HOURS of try n error *
- Accidentally have both plugged in while booting and realized (pkg wanted to bootstrap again), the Pi has booted from the SD!
- Profit!
Was a lot of fun but i got two more gray hairs!
Configuring X is another story for another thread! Spoiler: You need to edit
/boot/msdos/config.txt