FreeBSD 8.0 Plug Computer Distribution

From PlugWiki
Jump to: navigation, search

Contents

FreeBSD on the Marvell Sheeva Plug Computer

As of FreeBSD 8.0 the ARM platform is officially a Tier 2 architecture. The FreeBSD project does not provide official releases or pre-built packages for this platform. For details check :[1]

The directions below are for developers who are interested in FreeBSD to boot and install FreeBSD 8.0 onto a USB key or use a DHCP/TFTP/NFS configuration initially and then install FreeBSD.

FreeBSD 8.0 Release State

FreeBSD is offering Marvell SoC support. FreeBSD 8 supports the following devices:

* serial console
* gigabit ethernet
* USB port

The following device are not supported:

* NAND flash
* SD card reader

Booting FreeBSD from USB Storage

MS-DOS FAT file system is a convenient common file system between U-Boot and FreeBSD. One can set up a small (10-20MB) slice on the boot device for the kernel. U-Boot can load the kernel from this slice and also it will be writable (for updates) within FreeBSD.

Known problems and workarounds

Data corruption on UFS filesystems

This is a known problem for details read: [2] As a workaround all UFS volumes should be mounted with the "-o noclusterr -o noclusterw" options. Example:

mount -o rw -o noclusterr -o noclusterw /dev/da0s1a /mnt

These options can be applied to the /etc/fstab entry as:

# Device                Mountpoint      FStype  Options         Dump    Pass#
/dev/da0s2a             /               ufs     rw,noclusterr,noclusterw              0       0

FreeBSD root filesystem on USB Key

FreeBSD 8.0 Release has a bug where USB devices are not detected early enough to mount them as root device. Candidate patches are available (See:[3]) but they are needed to be modified for 8.0 Release.

Tweaked patches are available from this site:

* cam_hook.diff: Patch 1/2:File:Cam hook.diff.gz
* usb_hook.diff: Patch 2/2:File:Usb hook.diff.gz

Applying USB patches

Extract patches with GUnzip: <pre>

armbuild# gunzip Cam_hook.diff.gz
armbuild# gunzip Usb_hook.diff.gz

</pre>

Change directory where you store your surce files: <pre>

armbuild# cd /usr/src

</pre>

Apply both patches: <pre>

armbuild# patch < /path/to/cam_hook.diff
Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|--- sys/sys/kernel.h   2009/07/23 20:50:15
|+++ sys/sys/kernel.h   2009/10/01 18:45:12
--------------------------
Patching file sys/sys/kernel.h using Plan A...
Hunk #1 succeeded at 155 (offset 1 line).
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|--- sys/cam/cam_xpt.c  2009/09/15 00:20:41
|+++ sys/cam/cam_xpt.c  2009/10/02 05:00:03
--------------------------
Patching file sys/cam/cam_xpt.c using Plan A...
Hunk #1 succeeded at 107.
Hunk #2 succeeded at 908.
Hunk #3 succeeded at 4630 (offset 2 lines).
Hunk #4 succeeded at 4685 (offset 2 lines).
Hunk #5 succeeded at 4742 (offset 2 lines).
done

</pre>

<pre>

armbuild# patch < /path/to/usb_hook.diff
Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|--- sys/dev/usb/controller/usb_controller.c     2009/09/28 07:05:14
|+++ sys/dev/usb/controller/usb_controller.c     2009/10/02 21:07:21
--------------------------
Patching file sys/dev/usb/controller/usb_controller.c using Plan A...
Hunk #1 succeeded at 67.
Hunk #2 succeeded at 80.
Hunk #3 succeeded at 138.
Hunk #4 succeeded at 169.
Hunk #5 succeeded at 245.
Hunk #6 succeeded at 454.
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|--- sys/dev/usb/usb_bus.h       2009/09/28 07:45:13
|+++ sys/dev/usb/usb_bus.h       2009/10/02 21:07:21
--------------------------
Patching file sys/dev/usb/usb_bus.h using Plan A...
Hunk #1 succeeded at 51.
done
armbuild#

</pre>

Now you are ready to build your SHEEVAPLUG kernel! :)

SheevaPlug always starts in "single user mode"

When the FreeBSD kernel is loaded as "kernel.bin" and executed with the U-Boot "go" command the kernel defaults to single user mode. To change this behavior apply the following patch:

disable_forcedsingle.diff: File:Disable forcedsingle.diff.gz

Applying the patch:

armbuild# gunzip disable_forcedsingle.diff.gz
armbuild# cd /usr/src
armbuild# patch < /path/to/patch/diable_forcedsingle.diff

BIND crashes with SIG11

Patch for this issue is at the following mails in archive: [4] and [5]

Summary

It is possible to setup a working and usable FreeBSD system on the SheevaPlug computer.



Return to Main Page#Comparing the Operating System Distributions Available for the Plug Computer

Personal tools