FreeBSD on Marvell Kirkwood systems
Contents
Support policies
Support for all the below is done on a volunteer basis. This port is considered mature at this time. Little new support has been added to this port. It may be removed if it falls below critical mass. It will be included in the 12.0 release, however.
Supported Boards
This port has been tested on the Dreamplug. It's believed to support the Pogoplug, Sheevaplug and Guruplug as well.
The Kirkwood boot process
Most Kirkwood systems use U-Boot as the boot program. This page documents that process.
U-Boot layout
Recent versions of U-Boot are split into a small first-stage loader called SPL and a main boot program. The following table shows SD Card layout expected by system ROM: (note: this is a lie: it's blatantly copied from Allwinner and is likely wrong)
SD Card layout |
||
start |
size |
usage |
0 |
8KB |
Partition table |
8KB |
32KB |
Initial SPL loader |
40KB |
512KB |
U-Boot |
552KB |
472KB |
Reserved |
1024KB |
- |
Free for partitions |
- To write the u-boot files to an SD Card:
# dd if=/usr/local/share/u-boot/u-boot-<portname>/sunxi-spl.bin of=/dev/sd_card_device bs=1024 seek=8 # dd if=/usr/local/share/u-boot/u-boot-<portname>/u-boot.img conv=notrunc,sync of=/dev/sd_card_device bs=1024 seek=40
Old blog post about how to boot the dreamplug from SD
U-boot ports
The main U-Boot program can be configured with many different options for loading a kernel from SD card, USB drives, SATA drives, or the network. When booting FreeBSD the usual process is to have U-Boot start ubldr (a version of loader(8) tailored for use with U-Boot), and ubldr loads and starts the kernel.
To use ubldr, U-Boot must be configured with the CONFIG_API option.
Recently the customized versions of U-Boot have been turned into FreeBSD ports and packages. For instance, you can simply enter pkg install u-boot-dreamplug, and all the files you will need to get U-Boot onto an SD card are installed for you in /usr/local/share/u-boot, including a README file that tells you how to install the file(s) onto the SD card.
The following U-Boot ports and packages will be available for Kirkwood systems pending https://reviews.freebsd.org/D16504:
- sysutils/u-boot-dreamplug
- sysutils/u-boot-guruplug
- sysutils/u-boot-pogoplug
- sysutils/u-boot-sheevaplug
Technical note: these are all slave ports of sysutils/u-boot-master with some predefined variables.