2021-08-16
While it's relatively straight forward to install FreeBSD 13.0-RELEASE on the Raspberry Pi 4, I ran in to a particular issue that warrants additional visibility.
A simple dd gets our extracted image on the SD card:
$ sudo dd if=FreeBSD-13.0-RELEASE-arm64-aarch64-RPI.img of=/dev/{OUTPUT DEVICE} bs=4M status=progress
$ sync
After inserting the SD card and attempting to boot, however, is where the issue arose. I enabled the UART in the U-Boot config.txt within the MSDOSBOOT partition and hooked up a serial cable.
[all]
arm_64bit=1
dtparam=audio=on,i2c_arm=on,spi=on
dtoverlay=mmc
dtoverlay=disable-bt
device_tree_address=0x4000
kernel=u-boot.bin
enable_uart=1
...
After getting some output from U-Boot in the serial console, it appears that the bootloader is not recognizing the partition table (or a related issue that causes this error).
...
Hit any key to stop autoboot: 0
switch to partitions #0, OK
mmc0 is current device
** No partition table - mmc 0**
Device 0: unknown device
ethernet@7d580000 Waiting for PHY auto negotiation to complete...
...
I wasn't finding what I needed through my go-to search engines but a hop, skip, and a jump over to the FreeBSD Forums quickly yielded this post which helpfully pointed to Bug 255080 solving the issue.
Comment #15 provides a link to the 2021.04 build of the U-Boot binary. Overwrite the u-boot.bin file that lives in the MSDOSBOOT partition base directory and you'll be on your way!
It looks as though the part SKUs have been adjusted slightly and the 2020.10 U-Boot version does not account differing changes in certain models of the RPi 4 and Pi 400. From what it seems, the fix is expected in the next release.