Installing Debian on the Marvell SheevaPlug
You can use the Debian installer to install Debian on the Marvell SheevaPlug. This routine will install Debian stable (lenny) or testing (squeeze). This installer is currently under development, so there may be problems from time to time but it should generally work pretty well. If you run into any problems, please contact the debian-arm list and we will help you.
The following devices are currently supported:
- SheevaPlug (the SheevaPlug Development Kit)
- eSATA SheevaPlug
Please read the plug variants page to find out about the status of other plug computers.
The SheevaPlug has 512 MB flash memory and a USB and MMC/SD card interface. The eSATA SheevaPlug additionally offers one eSATA port. The Debian installer doesn't currently support installations to flash, but you can use it to install to USB, SD or eSATA. In order to proceed, you will therefore need either a USB stick (or disk), an SD card or an external disk with an eSATA port. While USB sticks work fine, the current version of u-boot (the boot loader on the SheevaPlug) seems to have some trouble with USB hard disks... they will work but you may have to restart the device several times so u-boot will find the disk. There are also problems booting from USB when more than one USB device is connected.
Preparation
Make sure to connect an Ethernet cable to your SheevaPlug (if you haven't already) because the installer will download files from the Internet for the installation.
Upgrading U-Boot
If you're running a version of u-boot older than 3.4.19 or if you're running version 3.4.27 you have to upgrade u-boot before proceeding with this installation! Version 3.4.19 adds SD support and improves USB support (although it's still quite flaky, as mentioned above). Version 3.4.27 has a bug that can cause a Verifying Checksum ... Bad Data CRC error when loading the Debian image.
Starting the Installer
First of all, you have to download the installer. But before you download the installer image, you have to decide whether you want to install Debian stable (lenny) or Debian testing (squeeze). I provide a separate page explaining the differences between the two versions of Debian. If you don't know which one to choose, I suggest you go with Debian testing (squeeze).
Now download the installer image. Download the uImage and uInitrd files for the version of Debian you'd like to install and store them either on a USB stick, MMC/SD card or an TFTP server:
Now connect the install medium (USB stick, SD card or eSATA disk) to your SheevaPlug and connect a mini-USB connector in order to access the serial console. Start your SheevaPlug and a few seconds later you should be able to connect to /dev/ttyUSB1 with 115200 baud. If you need help accessing the serial console, see the guides for Linux, Windows or MacOS X.
When you get serial output, press a key to interrupt the boot process. First of all, you have to change a setting so the device will boot the kernel which is used by Debian. If you have a regular SheevaPlug, you have to issue the following commands:
setenv mainlineLinux yes setenv arcNumber 2097 saveenv reset
If you have an eSATA SheevaPlug, please use these commands instead:
setenv mainlineLinux yes setenv arcNumber 2678 saveenv reset
These command will put in the correct settings and then restart the device so the changes will take effect.
Now you can load the installer. The instructions will depend on where you want to load the installer from. Also note that you may have to replace fatload with ext2load in case you used the ext2 or ext3 filesystem on your USB stick or MMC card.
- USB: If you stored the installer on a USB stick, please use:
usb start fatload usb 0:1 0x01100000 /uInitrd fatload usb 0:1 0x00800000 /uImage
- SD: for MMC/SD cards, use:
mmcinit fatload mmc 0:1 0x01100000 /uInitrd fatload mmc 0:1 0x00800000 /uImage
- TFTP: if you want to load the installer via the network from a TFTP
server, use this:
setenv serverip 192.168.1.2 setenv ipaddr 192.168.1.147 tftpboot 0x01100000 uInitrd tftpboot 0x00800000 uImage
Of course, you have to replace 192.168.1.2 with the IP address of your TFTP server.
Finally, start the installer. If you're using the Debian stable (lenny) installer image, please run these commands:
setenv bootargs console=ttyS0,115200 base-installer/initramfs-tools/driver-policy=most mirror/suite=stable apt-setup/local0/repository="http://people.debian.org/~tbm/orion lenny main" apt-setup/local0/key=http://people.debian.org/~tbm/orion/68FD549F bootm 0x00800000 0x01100000
Please note that there are two lines. The first line, which is very long, has to be written as one line!
On the other hand, for Debian testing (squeeze) run:
setenv bootargs console=ttyS0,115200n8 base-installer/initramfs-tools/driver-policy=most bootm 0x00800000 0x01100000
The Installation
The installation itself should be pretty standard. The installer knows about the SheevaPlug and will create a bootable kernel and ramdisk at the end of the installation. The installer will also offer a partition layout that is known to work. If you want to choose a different layout, make sure that you create a small (ca. 150 MB) /boot partition with the ext2 filesystem.
When the installation is done, you have to configure u-boot so it will automatically boot Debian. Interrupt the boot process of u-boot and enter the following commands. For USB, use this:
setenv bootargs_console console=ttyS0,115200 setenv bootcmd_usb 'usb start; ext2load usb 0:1 0x01100000 /uInitrd; ext2load usb 0:1 0x00800000 /uImage' setenv bootcmd 'setenv bootargs $(bootargs_console); run bootcmd_usb; bootm 0x00800000 0x01100000' saveenv
USB support in u-boot is quite flaky, so if there are problems booting from your USB device you can add ; reset at the end of bootcmd. This will cause the SheevaPlug to reboot when it fails to load the image and try again, until it finally manages to load it.
If you're using an SD card, use these commands instead:
setenv bootargs_console console=ttyS0,115200 setenv bootcmd_mmc 'mmcinit; ext2load mmc 0:1 0x01100000 /uInitrd; ext2load mmc 0:1 0x00800000 /uImage' setenv bootcmd 'setenv bootargs $(bootargs_console); run bootcmd_mmc; bootm 0x00800000 0x01100000' saveenv
Some people have reported problems with MMC support and found that initializing MMC twice helps. If your machine doesn't boot, modify bootcmd_mmc so that it will call mmcinit twice.
Finally, these these commands to boot from eSATA:
setenv bootargs_console console=ttyS0,115200 setenv bootcmd_sata 'ide reset; ext2load ide 0:1 0x01100000 /uInitrd; ext2load ide 0:1 0x00800000 /uImage' setenv bootcmd 'setenv bootargs $(bootargs_console); run bootcmd_sata; bootm 0x00800000 0x01100000' saveenv
Please note that you may have to replace /uInitrd and /uImage with /boot/uInitrd and /boot/uImage depending on the way you installed Debian. By default, Debian will create a separate boot partition, so the full path to the kernel is /uImage. However, if you choose to put everything on the same partition, you have to use /boot/uImage.
Your SheevaPlug is now ready to boot Debian from the USB stick or SD card and it will automatically do so whenever you turn on the SheevaPlug. You can now type the following command to boot:
run bootcmd
Go back to my Debian on SheevaPlug page.