Contents [hide]

How do I see all categories in this wiki?

Visit Special:Categories and dive inside.

Where can I get help?

Visit the forums or IRC on #openplug at irc.freenode.net.

IRC port is firewalled, what can I do?

There is a free web based IRC client at mibbit.

Where can I get factory default u-boot env variables?

Factory Default u-Boot Environment

UBoot Stuff

U-Boot quick reference?

U-Boot Quick Reference

Which Das U-boot should bring up the plug?

Das U-boot plug support

How can I set up a multi-boot configuration (eg: SD/USB + NAND)?


Kernel and distro stuff

Which Linux kernel should boot the plug?

Currently, the Marvell LSP Linux Kernel,, at the Plug Computer site, is officially supported, however, there is an orion git tree that is regularly upstreamed to mainline kernel.

As for today (April-27 2009) kernel.org 2.6.30-rc2 already have most of the bits to get a kernel up and running, <del>missing the cpuidle framework and a fix for the SDIO interface that can be patched from the Marvell git</del> commited june 8.

Note that in order to boot the kernel.org or the Marvell git kernels you must change few environment variables in u-boot -

setenv mainlineLinux yes setenv arcNumber 2097 saveenv reset

Please make sure you have the latest U-Boot for the Marvell Plug Computer and the latest Marvell Linux LSP Linux Kernel.

Does the Marvell LSP Linux kernel allow external patches/features to be added?

Yes. But patches on mainline kernel might need some minor rework to be adapted to the Marvell LSP.

Can I use the SCST Linux kernel patches (ie., iSCSI-SCST)?

You can but be warned, the hot-plug capability of Marvell USB will be affected, and you will not be able to see USB devices automatically anymore after adding the SCST kernel patches as of the SVN repository for SCST on March 10, 2009.

What blockquote-Built distributions are supported on the plug computer?

The plug ships by default with Ubuntu 9.04, however more and more distributions are being supported like Debian, Gentoo, openwrt, openembedded. Check this for latest updates Distributions

Why only those distributions?

These are great distributions for various reasons but mostly because someone working on the Plug Computer likes them. All other Linux or BSD distributions are welcomed and apblockquoteciated for their attributes as well.

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

What Version of Gentoo is Running on the Plug?

The version of Gentoo is from March 2009 (more or less) Portage source ebuilds. However, giving credit where credit is due, this version started on a Orion-based Buffalo LinkStation adapted for GenLink.

How do I change the Default Plug OS install name from "debian"?

Edit the /etc/hostname file and change the word debian to whatever you want. This will take effect on reboot. Or you can run the /etc/init.d/hostname.sh script to apply it now. This is how you change the name it shows to the windows and OSX machines if you setup and use SAMBA for file sharing.

Why Is Apache not on the Gentoo Distribution?

Lighttpd is fast, small and scales better than Apache on this platform. However, Apache is blockquote-built for the Plug Computer and can be downloaded. Also, you can get the PHP apache module and the PHP fastcgi module for lighttpd as well.

* emerge --ask --getbinpkg apache * emerge --ask --getbinpkg php

Ubuntu FAQ

If your plug came with Ubuntu blockquoteinstalled here are some tips and tricks to get things working well.

Can I log in with ssh?

Yes. An SSH server is blockquoteinstalled. You can log in the ssh or putty (from windows) as root, password: nosoup4u.

Why can't it resolve hostnames?

The default DHCP client configuration ignores the name server returned by the DHCP server - this means that the system won't be able to resolve any host names. To fix this edit /etc/dhcp3/dhclient.conf and comment out or delete the line "supersede domain-name-servers;". Then execute "ifdown eth0 ; ifup eth0".

Can I install more Ubuntu applications?

Yes, but since /var/cache is actually in a ramdisk on the plug with Ubuntu, apt-get will fail because some directories are missing. You can create /var/cache/apt/archives and /var/cache/apt/archives/partial with mkdir. Then apt-get will work fine. Note that the directories will disappear after a reboot. I changed /etc/rc.local to recreate the needed directories on reboot

The time is wrong, and when I tried using ntpdate it could not find the ntp servers on the web.

You may not have any nameservers set up. The ubuntu distribution IP is blockquoteset in /etc/hosts, but you may have to set a nameserver in resolv.conf if its not found with dhcp.

If you find that your changes to resolv.conf are "disappearing" you need to edit /etc/dhcp3/dhclient.conf. Comment out the line: supersede domain-name-servers; (That line causes dhclient to ignore the DNS information coming from your DHCP server.)

pool.ntp.org is a very good server to use with ntpdate.

How do I set up a webserver on the plug? Can I use php?

Get apt-get working (as described above).

  • apt-get install lighttpd
  • apt-get install php5-cgi

Edit /etc/lighttpd/lighttpd.conf to add mod_fastcgi to the list of server.modules. Point server.document-root to your web directory. Ensure /tmp is writable by other users (e.g. web server)

  • Add fastcgi.server = ( ".php" => ((

  • "bin-path" => "/usr/bin/php-cgi",
  • "socket" => "/tmp/php.socket"

Make sure you use a . and not a - between fastcgi and server in the above. also be sure that php IS installed and working by issuing a /usr/bin/php-cgi -v command and viewing the version info reported.

How Can I Make the Hardware Do More?

Make an SD card be the root filesystem


  • SD card ( 512mb or bigger )
  • working serial console
  • a working system with 'cat /proc/mtd' showing a rootfs (for me it was mtd1)

Format your SD card to a filesystem that supports permissions (far as I know fat32 will not work, but I didn't try). ext2 might be a better choice than ext3, as the former avoids additional journal writes to the flash memory.

- I used 'fdisk /dev/mmcblk0' and formatted the partition with ext3 filesystem 'mkfs.ext3 /dev/mmcblk0p1'

Copy the existing root filesystem into the SD card. (assuming mtd1 is your rootfs device)

* mkdir /mnt/sd * mkdir /mnt/tmproot * mount /dev/mmcblk0p1 /mnt/sd * mount /dev/mtdblock1 /mnt/tmproot * cp -av /mnt/tmproot/* /mnt/sd * umount /mnt/tmproot

Update the SD cards fstab to mount itself as root:

* vim /mnt/sd/etc/fstab


'rootfs / rootfs rw 0 0'

to (assuming ext3 filesystem)

'/dev/mmcblk0p1 / ext3 rw 0 0'

(One might wish to add the noatime to the fstab entry to avoid additional writes on file access:

'/dev/mmcblk0p1 / ext3 rw,noatime 0 0'

* umount /mnt/sd * reboot

Get to the u-boot prompt (Marvell>>)

- this can be done by having the serial console connected while rebooting the device, it gives you 3 second to hit any key, just hit a key.

- this can be done by having the serial console connected while rebooting the device, it gives you 3 second to hit any key, just hit a key.

* printenv bootargs_root

Mine: bootargs_root=root=/dev/mtdblock2 ro

* printenv bootargs

Mine: bootargs=console=ttyS0,115200 mtdparts=nand_mtd:0x400000@0x100000(uImage),0x1fb00000@0x500000(rootfs) rw root=/dev/mtdblock1 rw ip=

Change the root filesystem to the SD card.

* set bootargs_root 'root=/dev/mmcblk0p1' * set bootargs=console=ttyS0,115200 mtdparts=nand_mtd:0x400000@0x100000(uImage),0x1fb00000@0x500000(rootfs) rw root=/dev/mmcblk0p1 rw ip= * saveenv * reset

The output of 'df -h' now shows (for my 8gb SD card):

Filesystem Size Used Avail Use% Mounted on /dev/mmcblk0p1 7.4G 487M 6.6G 7% / tmpfs 252M 0 252M 0% /lib/init/rw varrun 252M 36K 252M 1% /var/run varlock 252M 0 252M 0% /var/lock udev 252M 16K 252M 1% /dev tmpfs 252M 0 252M 0% /dev/shm

If something goes wrong and it does not work, you should be able to set the bootargs_root and bootargs back to what they were.

Notes for upgraded SheevaPlugs

If one has upgraded their system, perhaps by using the SheevaPlug Installer, the above process may not work. If the command

* mount /dev/mtdblock1 /mnt/tmproot

takes a long time to finish and ultimately fails, it is likely that the root filesystem is UBIFS rather than JFFS2. Use this command instead:

* mount -t ubifs ubi0:rootfs /mnt/tmproot

The boot environment variables are also somewhat different. If

* printenv bootargs_root

returns bootargs_root=ubi.mtd=1 root=ubi0:rootfs rootfstype=ubifs, then one need only set bootargs_root as above:

* set bootargs_root 'root=/dev/mmcblk0p1'

and one should not change bootargs at all. The new boot command variable is bootcmd, and it references bootargs_root appropriately.

Can the Plug do Bittorrent ?

There are several Bittorrent packages that work on the plug and it's standard OS. Transmission and rTorrent seem to be some of the more compatible due to their small size and speed.

rtorrent can be made to watch a directory for *.torrent files and automatically start transfers of those files to the machine and run as a "service" in a way on the plug.

to install rTorrent you simply type....

apt-get install rtorrent

transmission is installed similarly but it's not as obvious in it's naming...

apt-get install transmission-cli

  • more information is needed here to give details on other bittorrent options.

USB Stuff

What USB devices are supported on the Plug Computer USB port?

Generally, any external USB device Linux supports should show up on the Plug Computer just as it would any Linux distribution under the Marvell LSP Linux kernel. However, there are some special considerations discussed below.

Several USB webcams I tried do not work as drivers are missing from the kernel build. It depends on what drivers are included in the OS you are running on the SheevaPlug.

What Type of USB Disk Can the Plug Use?

Generally, you are restricted to USB "Thumb" drives unless the USB drive has an external power source.

Generally, you are restricted to USB "Thumb" drives unless the USB drive has an external power source.

Standard USB disks can be used. VFAT formatted disks that are used on Windows machines can be mounted and used in the system. you do NOT have to format them or do any Partition table changes to them if you want to use it with VFAT to increase compatibility and portability. ONLY WIPE the partitions and format if you want to dedicate the drive to the use of this device or Linux in general.

Can I Use a Seagate USB FreeAgent Go 250 GB or Similar Large USB Drive?

You can use a Seagate USB FreeAgent Go XXX GB drive, but the Plug Computer cannot provide enough power to spin-up the USB drive by itself through the mini-USB cable connection. You have to use the Seagate FreeAgent docking station to provide power. Although the Plug Computer USB connection can provide enough power for USB "thumb" drives, please do not expect it to power larger USB drives without an alternate power source. IT CAN handle the drives nicely through a powered usb hub. this makes the hub power the drive.

Why Does my USB Drive Report Available Capacity but I cannot Write to the Drive?

If you do a df -h or similar command, you will see that the df reports there is free capacity on a USB thumb drive, e.g.,

  • marvell@linux ~ $ df -h
  • Filesystem Size Used Avail Use% Mounted on
  • rootfs 17G 8.2G 7.7G 52% //dev/root 17G 8.2G 7.7G 52% /
  • rc-svcdir 1.0M 68K 956K 7% /lib/rc/init.d
  • udev 10M 112K 9.9M 2% /devshm 505M 0 505M 0% /dev/shm
  • /dev/sdb2 99G 693M 93G 1% /media/ext3_usb
  • /dev/sdc1 7.5G 3.3G 4.2G 45% /mnt/vfat_usb
  • /dev/sdd1 1.9G 531M 1.3G 30% /mnt/ext2_usb

From this information, you might expect that the file system, Ext2, on the USB thumb drive (2 GB) mounted at /mnt/ext2_usb has free space (e.g., 70% of the capacity is free!). However, that is not the case if you try writing to the Ext2 file system on the 2GB thumb drive. You get a disk full I/O error.

The problem is that the drive was originally partitioned and formatted for Windows and not re-partitioned. In order to fix this issue, just remove the partition table, re-partition and format the drive. Try these commands to get the full storage of the USB drive on the Plug Computer after backing up anything you want to keep since these procedures will fully wipe out your data and drive format:

* dd if=/dev/zero of=/dev/sdd bs=512 count=1000 * fdisk /dev/sdd (as usual) and save newly created partition info * mkfs.ext[2,3] /dev/sdd1


Security Configurations

How can I setup SELinux on the Plug Distributions?

SELinux is a common security configuration on all the Plug Computer distributions. In most cases, some special steps are required because those distributions have not moved over all the SELinux capabilities to the Marvell ARM processor yet.

Cryptographic engine support?

There is a crypto accelerator in the Marvell chip according to the data sheet - AES, DES, 3DES, MD5 and SHA-1 are listed as supported. Where is it documented and what is the status of crypto acceleration engine support in the kernel and/or openssl?

Some hardware documentation is in the functional specifications document from Marvell, p.&nbsp;174-204 and p.&nbsp;634-656.

Beginnings of kernel support (no DMA, AES only) for the crypto engine appears to have been committed to the Marvell kernel git repository on 2009-06-11.

Software support is reported to exist for openssl in the Marvell LSP version of the kernel.

The Marvell kernel that comes with the ShevaPlug includes OCF support for the Marvell CESA device. OpenSSL can be patched to use /dev/crypto. OCF is used by dm_crypt. For example, with a USB disk giving a raw speed of 26Mbyte/s a cryptsetup/luks aes-cbc-essiv:sha256 container gives around 17mb/s reads.

Recentish mainline kernels, for example linux-image-2.6.32-5-kirkwood from Debian include the mv_cesa module that is used by dm_crypt and can be used (in conjunction with cryptodev) by a patched OpenSSL. mv_cesa does not implement DMA so its much slower (see http://code.google.com/p/openrd/issues/detail?id=18). For example the same luks partition as above gets 7.8 Mbyte/sec with mv_cesa (5.6 Mbyte/sec without mv_cesa.

Sebastian Andrzej Siewior was working on DMA, but didn't find it sped things up much. http://lists.debian.org/debian-arm/2009/11/msg00113.html