Running Debian GNU/Linux on the Thecus n2100 / Allnet 6500

This page is outdated... very outdated. Newer instructions are avaliable at:

I'm leaving the rest of the page in case something is still valid.

Compiling a kernel
   Patches for 2.6.17
Page history


The Thecus n2100 is a network storage device. It has two internal S-ATA ports, three USB-ports and two gigabit ethernet ports.

The CPU is a 600Mhz Intel IOP 80219, a little endian arm cpu based on the Intel XScale core.

It comes with 128Mb ram, but because its standard DDR400 memory it can easily be upgraded. Mine is currently running with 512Mb, and the integrated memory-controller in the CPU is suposed to support up to 1Gb.


This howto is currently not that userfriendly, it's intended for developers and/or people with some knowledge about computers and linux. Half of this is written from my memories of my installation a week ago.

What you need to begin with is an n2100 with an installed hardrive. We will not rewrite the flash, so the device shouldn't be damaged in any way.
But just in case, the normal disclamer applies: I am not responsible for anything, bla bla bla. :)

Step 1. First thing you need is to attach a serial port to the n2100

Step 1b. While you are in the box, make sure the jumper J3/J4 is in the J3 position

Step 2. Add a fan, or power the existing one.

The fan in the n2100 is software controlled, and the kernel module to control that compiles in 2.6.9, but 2.6.16 still needs some work. So, for now I'm using an 80mm computer fan running at 7 volts pointed at the harddisk.

Step 3. Install a tftp-server on your workstation and either compile your own kernel or get my precompiled one:
apt-get install tftpd wget
cd /srv/tftp
You also need a debian installer initrd for arm. Beeing lazy I used the one for the netwinder:

Step 4. Use minicom or some other serial comm-program and connect to the device at 115200,8N1,no flowcontrol. Boot it up!

When you see:
== Executing boot script in 1.000 seconds - enter ^C to abort
you want to press Ctrl+C

You should then end up with a Redboot> prompt

Now you need to specify the IP for the device, and the IP for the tftp-server:
ip -l -h
-l specifies the local IP, and -h is the IP of the server.

You now have to load the initrd and the kernel and then boot the device:
RedBoot> load -r initrd.gz -b 0x00800000
Using default protocol (TFTP)
Raw file loaded 0x00800000-0x009bd09e, assumed entry at 0x00800000
RedBoot> load vmlinux-inst -b 0x00200000
Using default protocol (TFTP)
Address offset = 0x00200000
Entry point: 0x00200000, address range: 0x00200000-0x00369fdc
RedBoot> exec

Step 5. After the device boots you will be presented with the d-i. This will take some time, but should be straight forward except one thing.

Before it reboots you HAVE to open a terminal by selecting "Go Back" in some dialog and select "Execute a shell". There you need to modify the file /target/etc/inittab:
nano /target/etc/inittab
and change the line:
#T0:2345:respawn:/sbin/getty -L ttyS0 9800 vt100
T0:2345:respawn:/sbin/getty -L ttyS0 115200 vt100

Now just exit and finish the installation.

Step 6. Now, to boot into your shiny new system interrupt the Redboot boot with Ctrl+C, and type:
RedBoot> load vmlinux-inst -b 0x00200000
Using default protocol (TFTP)
Address offset = 0x00200000
Entry point: 0x00200000, address range: 0x00200000-0x0031c4ec
RedBoot> exec -c "console=ttyS0,115200 root=/dev/sda1 mem=128M@0xa0000000"
Using base address 0x00200000 and length 0x0011c4ec
If you have installed more memory just change the exec line to the correct amount of memory.



Network: 135Mbits, 190Mbits using jumbo frames.
S-ATA: tiobench

Compiling a kernel

To compile your own kernel you need:
* A 2.6.16(.18) kernel from
* A cross build enviorment that can produce little-endian arm binaries.
* My small patch from here.
* A .config-file to start from.

After putting all that together you can compile your kernel with for example:
export PATH=$PATH:/usr/local/armv5l/3.3.2/bin/
make CROSS_COMPILE=armv5l-linux- ARCH=arm
Your shiny new vmlinux will end up in arch/arm/boot/compressed/vmlinux

The patch is based on Thecus GPLed sources, and includes:

* drivers/i2c/chips/Kconfig: add thecus_rtc

* drivers/i2c/chips/Makefile: add thecus_rtc

* drivers/i2c/chips/thecus_rtc.c: thecus_rtc, really fun file, not only the rtc, but hw control (fan, buzzer, leds) and monitoring, should be split up... I2c drivers for: Ricoh RS372, Philips PCA9532 and Fintek F75373

* drivers/i2c/i2c-core.c: this contains my really small quick ugly hack to make things work. When registering a i2c driver with i2c_register_driver the kernel freezees when checking a second i2c bus adaptor. Needs some investigation.

* drivers/mtd/maps/iop3xx.c: MTD map for IOP3xx

* drivers/mtd/maps/Kconfig: add iop3xx.c

* drivers/mtd/maps/Makefile: add iop3xx.c

* drivers/net/Kconfig: add r1000

* drivers/net/Makefile: add r1000

* drivers/net/r1000.c: add the Realtek r1000 driver from their web, for the gigabit ethernet

* include/asm-arm/arch-iop3xx/iop321.h: change tickrate to 33.00 Mhz, since thats whats on the board

* include/asm-arm/arch-iop3xx/iq31244.h: change flashsize

* include/asm-arm/arch-iop3xx/system.h: add reset-code, probably needs some work

* arch/arm/mach-iop3xx/iq31244-pci.c: add PCI-config for USB and Mini-PCI-slot

Most of the files are messy... Things may be wrong... Some files may not be needed... and if you apply it to a kernel it will probably not work for any other device later...

Last updated 2006-07-09 by David Karlström, daka [at] thg [dot] se

Page history:
2006-06-01: initial page
2006-06-03: add patch version 0.1 with the basics
2006-06-03: add kernel image for installation and basic kernel .config
2006-06-04: add patch version 0.2 with rtc, hardware monitoring, fan, led and buzzer control
2006-06-05: add thecus_io_usage with some examples how to control fan, led and buzzer
2006-06-08: add patch version 0.3 with PCI-bus config for USB and Mini-PCI
2006-07-09: add addserial.html with pictures
2006-07-09: add patches for 2.6.17