From Fedora Project Wiki

HOWTO: Sheevaplug Fedora USB Boot

Getting started with your Sheevaplug computer

This HOWTO is written from the assumption that you just got a Sheevaplug computer and are not terribly familiar with it. The goal is to explain everything you need to do to start using Fedora on it quickly. Its also assumed that you are using a Fedora Desktop system to access your Sheevaplug computer.

Desktop Setup

The first step is that you will need to make a udev/hal policy adjustment so that it correctly identifies and loads the right kernel modules when you connect to the sheevaplug to your workstation by USB cable.

Make a file to hold the rules:

vi /etc/udev/rules.d/85-sheevaplug.rules

then paste into it the following:

# if no driver has claimed the interface yet, load ftdi_sio
ACTION=="add", SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_interface", \
        ATTRS{idVendor}=="9e88", ATTRS{idProduct}=="9e8f", \
        DRIVER=="", \
        RUN+="/sbin/modprobe -b ftdi_sio"

# add the sheevaplug VID and PID to the list of devices supported by ftdi_sio
ACTION=="add", SUBSYSTEM=="drivers", \
        ENV{DEVPATH}=="/bus/usb-serial/drivers/ftdi_sio", \
        ATTR{new_id}="9e88 9e8f"

# optionally create a convenience symlink for the console device
ACTION=="add", KERNEL=="ttyUSB*", \
        ATTRS{interface}=="SheevaPlug JTAGKey FT2232D B", \
        ATTRS{bInterfaceNumber}=="01", \
        SYMLINK+="sheevaplug"

Next, check to see if you have the "cu" program installed. If not, install the uucp package. To make connecting to the machine easy, I put the following script in root's home directory as usb-setup:

#!/bin/sh

if [ -e /dev/ttyUSB1 ] ; then
        cu -s 115200 -l /dev/ttyUSB1
elif [ -e /dev/ttyUSB2 ] ; then
        cu -s 115200 -l /dev/ttyUSB2
else
        echo "No usb tty found - exiting"
fi

Connecting to it

Now you are ready to make first contact with the little computer. Take the USB cable out and plug it into the mini usb slot of the sheevaplug and the big usb connector to your workstation. Then power up the sheevaplug and wait about 2 or 3 seconds, then run the ./usb-setup command line app. If it does not connect, wait another second and run it again. If you are not getting a connection check your syslog messages to see if there are any kernel messages where it was trying to identify what was being attached. lsusb might also help.

Moving along for those that have a connection. You should just watch it boot up without hitting any keys. You should see a debian-like boot sequence. You can log in as root using the nosoup4u password. You can look around and verify its all working. But, since this is a Fedora wiki page, I assume you want to get rid of Ubuntu. :)

Putting Fedora on USB drive

While developing a system or perhaps even putting it into production, you may need extra space for things. A USB drive is a good choice since the sheevaplug has a usb connection. It can be either a hard disk or flash memory stick. If you can live within the 512Mb memory limit of the sheevaplug, all you need is 1 partition. If you need more memory, you will want to make a second partition for swap. Next question is do you want SE Linux support or not? If not, the ext2 filesystem is fine. If you want extended attributes for any reason, you will want ext3 as the file system.

The next step is preparing the USB drive. Insert the USB drive connector and when the OS shows it on the desktop, umount it. I use the gparted program on the desktop. Be careful to select the right device. Delete the existing partition, create a new one (leaving space for the swap file system if you wanted one). Right click on it and assign the filesystem type - ext2 or ext3. Then create the swap filesystem and apply the changes. When its all done, then right click on the ext2/3 partition and select manage flags. Click on bootable.

That should be it, close the app and remove the usb connector to the disk and plug it back in. You should see a folder opened on your desktop after a few moments. The only thing it should have at this point is the Lost+Found directory. If you don't see the Lost+Found directory, you need to go back and reformat the USB drive with ext2 or 3.

In a terminal window, change to root and cd to the /media directory. Locate the flash drive.

su - root
cd /media/
ls

I will call it flash for now, but substitute the real name in the commands I give you below. Make a symlink

ln -s flash rootfs-f11

Then download these files:

http://ftp.linux.org.uk/pub/linux/arm/fedora/platforms/sheevaplug/uImage-2.6.30-sheevaplug
http://ftp.linux.org.uk/pub/linux/arm/fedora/rootfs/rootfs-f11.tar.bz2

Then untar the rootfs-f11.tar.bz2 file first:

tar -xjvf rootfs-f11.tar.bz2

It should open up into the symlink that you created earlier. Then copy the uImage file into the boot directory.

cp uImage-2.6.30-sheevaplug rootfs-f11/boot

You can do a little customization at this point if you want to make changes to some config files. I for one like to install a .bashrc and .bash_profile to /root to start with. If you wanted a swap file, now would be a good time to set it up by editing the etc/fstab file and adding:

/dev/sda2           swap            swap    defaults        0 0

When you are done, you want to force all updates to be written to the USB drive:

sync

You can now unmount the USB drive since we are done.

Configuring uBoot

The next step is to configure the uBoot system to select the USB drive instead of Ubuntu in flash memory. Power up the sheevaplug and connect to it. This time press the space bar occasionally until uBoot notices you and leaves you at the marvell>> prompt. Run the following commands:

setenv mainlineLinux yes
setenv arcNumber 2097
setenv bootargs_root 'root=/dev/sda1 rootdelay=10'
setenv bootcmd_usb 'usb start; ext2load usb 0:1  0x6400000 /boot/uImage-2.6.30-sheevaplug'
setenv bootcmd 'setenv bootargs $(console) $(bootargs_root); run bootcmd_usb; bootm 0x6400000'
saveenv
reset

Final Adjustments

You should now see it boot into Fedora 11. Log in as root using marvell as the password. First order of business should be to change the password. But to do that you will need networking to be alive. The rootfs image does not include dhclient, so you will need to make a static IP address at first. Open the file:

/etc/sysconfig/network-scripts/ifcfg-eth0

and add something like this (modifying the ip address and the correct dns server):

DEVICE=eth0
ONBOOT=yes
BOOTPROTO=none
NETMASK=255.255.255.0
IPADDR=192.168.1.2
GATEWAY=192.168.1.1
DNS1=XX.XX.XX.XX
DNS2=XX.XX.XX.XX
TYPE=Ethernet
USERCTL=no
PEERDNS=yes
IPV6INIT=no
NM_CONTROLLED=no

now run

ifdown eth0
ifup eth0

and you should have connectivity. You can now run yum install passwd or anything else you want. Just be sure to change the password.