Installing Debian on a Iomega iConnect Wireless Data Station

 

Installing Debian on a Iomega iConnect Wireless Data Station is not that difficult but will unavoidably void your warranty. You will need to rip apart the device in order to access the console port.

Requirements:

  • Access to the Serial Console through a USB to serial interface such as the FTDI - TTL-232R-3V3-WE (some soldering required)
  • USB harddisk or stick (harddisk is advisable since stick tend to wear off)
  • Ethernet Connection for debian installation - Important!!! you MUST use Gigabit Ethernet!!! due to a bug in the Debian Install Kernel
  • Linux Host in order to setup the kernel

First step is to rip apart the iConnect and reach the serial port as depicted here.

After connecting your host to the iconnect through the usb serial adapter you should be getting a prompt:

Marvell>>

In the prompt type:

setenv mainlineLinux yes
setenv arcNumber 1682
saveenv
reset

Take note! You must really saveenv and reset

Next we will load the debian lenny install environment either through USB or TFTP (this procedure is based on the procedure published here used for the OpenRD). Links to the debian uInitrd and uImage are available here. I provide you here 2 alternatives, you can use a USB stick formated using ext2 or you can download the initrd and kernel through TFTP by setting up a TFTP server in your host (e.g. atftpd), please use only ONE of the options.

==USB==

usb start
ext2load usb 0:1 0x01100000 /uInitrd
ext2load usb 0:1 0x00800000 /uImage

==TFTP==

dhcp
setenv serverip 192.168.1.100
tftpboot 0x01100000 uInitrd
tftpboot 0x00800000 uImage

After loading the kernel and Initrd into memory we configure the boot arguments to the debian installer

setenv bootargs console=ttyS0,115200n8 base-installer/initramfs-tools/driver-policy=most

Last we boot the kernel + Initrd

bootm 0x00800000 0x01100000

You should be able to use the debian installer without any troubles, as it is no different from the x86 installer. In the end it will nonetheless fail to install the kernel and boot loader, but don’t panic :)

After install, we still need to setup the kernel and initrd.

Mount the USB disk into which you just installed Debian, in your Linux host.

mount /dev/sdb1 /mnt

(or whatever device your usb disk/boot partition is on)

apt-get uboot-mkimage

(this only works in debian based linux distributions)

cd /mnt/
mkimage -A arm -O linux -T kernel  -C none -a 0x00008000 -e 0x00008000 \

-n Linux-2.6.29-2 -d vmlinuz-2.6.29-2-kirkwood uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 \

-n initramfs -d initrd.img-2.6.29-2-kirkwood uInitrd

You can now unmount the USB device from your host and get back to your iConnect.

At the uBoot prompt type:

setenv bootargs_console 'console=ttyS0,115200 mtdparts=orion_nand:0xc0000@0x0(uboot),0x20000@0xa0000(env),0x300000@0x100000(zImage),0x300000@0x540000(initrd),0x1f400000@0x980000(boot) root=/dev/sda2 rootdelay=10 3'

This line currently setups the MTD device (in case you want to use it in the future) and delays boot in order to give the kernel time to detect the external USB device where the root filesystem lies.

In order to have a backup solution in the improbable case that a kernel doesn’t boot we setup a bootcmd that downloads a kernel from a TFTP daemon running at 192.168.1.100

setenv bootcmd_tftp 'set ipaddr 192.168.1.101; set serverip 192.168.1.100; tftpboot 0x00800000 uImage'

The previously line will have as a drawback, your system will take longer to boot (much longer, >20sec) as it will have to timeout trying to retrieve the kernel through TFTP.

Last the lines that will boot your kernel:

setenv bootcmd_usb 'usb start; ext2load usb 0:1 0x00800000 /uImage'
setenv bootcmd 'setenv bootargs $(bootargs_console); run bootcmd_tftp; bootm 0x00800000; run bootcmd_usb; bootm 0x00800000; reset'
saveenv
reset

Now that we have debian lenny installed moving to squeeze is a “normal” procedure. You need to update your /etc/apt/sources.list and issue:

apt-get update
apt-get dist-upgrade

That is it! Your system should be up and running. If you run into any problem drop a comment.

In my next post, I’ll describe how to cross-compile to the iConnect and how to build a custom kernel specifically targeted at the iConnect.

written by Diogo Gomes