FreeBSD requires a few patches to run comfortably and properly on these
devices. The patches are available from my FreeBSD-Kirkwood repo on GitHub.
A patch to vfs_mount.c is only required until [pr]usb/138798[/pr] is fixed.
Until then, we need to insert a delay before mounting the root filesystem,
since our USB drive might not be enumerated.
This patch, shamelessly stolen from the mailing list, will give us the option to force fsck on
the root filesystem. Otherwise, an unclean shutdown would lock us out of
FreeBSD unless we had serial console access.
Patch master.passwd to give root a default password of “root”. There’s
probably a better way to do this.
Patch atomic.h to make BIND in the base system not segfault, stolen from
this mailing list thread.
Patch config.h to fix liblzma on ARM (as reported by Crest!)
This patch disables a warning about unsupported TCP offload for IPv6 packets
in if_mge.
Patch conf/files to allow us to build runfw into the kernel for if_run
wireless controllers. Normally it’s only loadable as a module via
loader, but the way we load the kernel bypasses that.
My kernel configuration file is much more fully-featured than the stock SHEEVAPLUG config file. It includes support for GEOM,
filesystems, USB ethernet controllers, USB audio hardware, and PF/ALTQ.
Comment out PHYSMEM_SIZE in /usr/src/sys/arm/mv/kirkwood/std.sheevaplug, or
your kernel might only boot as far as the copyright declaration on the
DockStar.
Enable automatic fsck, so we can get back into the OS in the event of power
loss or an unclean shutdown.
Turn on NTPd. The DockStar has no real time clock, so this is required to set
the time and date on boot. The -g flag makes NTPd ignore the first huge jump
in time. If you prefer, OpenBSD’s openntpd is available through Ports.
Set a better motd ( :3 ) and tell Ports not to enable some ports’ X11 dependencies.
Set some mount options for our
root filesystem. Disabling clustered reads and writes is
reccommended on ARM.
Add your device’s hostname to the IPv4 and IPv6 loopback addresses in /etc/hosts. This example uses “pochan”.
Finally, edit $DESTDIR/etc/ssh/sshd_config and change PermitRootLogin to yes,
since there will be no user accounts on first boot.