Installing armel debian on your nas is actually quite simple, thanks to the work of other people. What is basically the way to (network) install debian on a (generic) system? * Compile a kernel for the system * Download and boot the kernel on that system with either a ramdisk (lot's of preparation) or an nfs-root filesystem (the easy way!). * Basically you should have just booted a working system. Be it a ramdisk or an nfs-rooted filesystem. The latter is the easiest.
Step 0: prerequisites
* You will have a serial console cable. (As explained elsewhere on this site) * You will have a tftp server ready. * You will have an nfs-server ready. * This is not your first kernel to compile.
Step 1: Compile the kernel
At this moment you probably have a nice intel based linux system. So you have a problem: you do not have the right compiler. * Head over to: codesourcery to get you a nice set of fresh cross compilers. I have choosen the "ARM GNU/Linux" distribution without source. * Download it, and untar it somewher. * Download your favorite kernel from ftp.kernel.org. (I've tested 2.6.21.5). * Download the em7210/lanner patches from http://git.rtp-net.org/?p=ss4000e.git;a=summary * Unpack your kernel, and patch it up. Something like this wil make your live easy:
ard@asus1:~/nas/src/ss4000e/kernel$ cat env export SS4000EB=/home/ard/nas/src/ss4000e if ! echo $PATH|grep -q $SS4000EB then export PATH="$PATH:$SS4000EB/arm-2007q1/bin" fi export INSTALL_PATH=$SS4000EB/boot export INSTALL_MOD_PATH=$SS4000EB/root
SS4000EB stands for the base directory. I've unpacked the codesourcery stuff there (arm-2007q1). I assume something like this:
$SS4000EB / arm-2007q1 (or whatever the directory created by the codesourcery stuff)
/ kernel / linux-2.6.21.5
/ env (to set your environment correctly)
/ root ( the root of your nfs-rooted environment)
Dot in the env file ( . ./env f.i.). Enter the linux source directory and: ard@asus1:~/nas/src/ss4000e/kernel/linux-2.6.21.5$ cp arch/arm/configs/em7210_defconfig .config . Your source is now ready to compile. Just type make, or make menu-config if you want to look around. After a large coffeebreak, you will have the famous zImage. ard@asus1:~/nas/src/ss4000e/kernel/linux-2.6.21.5$ cp arch/arm/boot/zImage <tftp dir> so you can download it wit tftp.
At this moment you will have a compiled kernel, with the image nicely tucked in your tftp directory ready to run on your nas.
Step 2: prepare your root image
This is really easy: You can try it yourself with debootstrap, or: download the rootfs as indicated at: http://lists.debian.org/debian-arm/2007/01/msg00034.html . Current armel repositories are:
storage:/sys/bus/i2c/drivers/rtc-rs5c372# cat /etc/apt/sources.list deb http://ftp.gnuab.org/debian sid main deb http://armel-debs.applieddata.net/debian sid main deb-src http://ftp.nl.debian.org/debian sid main
The armel-debs.applieddata.net form a really stable release, but since it is Lennerts ADSL connection (I presume), it's not nice to abuse it. Anyway: unpack the rootfs at the right place. Fix up any things that need fixing. THE MOST IMPORTANT THING:
storage:/sys/bus/i2c/drivers/rtc-rs5c372# grep ttyS0 /etc/inittab T0:2345:respawn:/sbin/getty -L ttyS0 115200 vt100
DO NOT FORGET IT! Or else be prepared for lots of power cycling. About that: You don't have to put any disks in yet. Everything is hotswap. The kernel is nice. Yes!
Step 3: boot your system with armel debian
Connect your serial console, and boot the nas. Start typing ^C (as indicated by the boot prompt), follow the first prompt, and type ^C again
+No network interfaces found EM-7210 ver.T04 2005-12-12 (For ver.AA) == Executing boot script in 10.000 seconds - enter ^C to abort RedBoot> fis load rammode RedBoot> g +Ethernet eth0: MAC address 00:0e:0c:b0:68:36 IP: 10.9.9.1/255.255.255.0, Gateway: 10.9.9.1 Default server: 10.9.9.10, DNS server IP: 0.0.0.0 EM-7210 (RAM mode) 2005-12-22 == Executing boot script in 10.000 seconds - enter ^C to abort RedBoot> ip_address -l 192.168.0.101 -h 192.168.0.148 IP: 192.168.0.101/255.255.255.0, Gateway: 10.9.9.1 Default server: 192.168.0.148, DNS server IP: 0.0.0.0 RedBoot> load -v -r -b 0x01008000 -m tftp /boot/zImage
At this point in time, you will have to start the kernel. This is what it looks like after you have debian on the harddisk:
RedBoot> exec -s 0x00400000 -c "console=ttyS0,115200 ro root=/dev/md9 mem=256M@0xa0000000 panic=5" -w 5 About to start execution at 0xa0008000 - abort with ^C within 5 seconds Using base address 0x01008000 and length 0x00235d50
But for now we need to boot the nfs version:
exec -s 0x00400000 -c "console=ttyS0,115200 rw ip=192.168.0.101:192.168.0.130:192.168.0.1:255.255.255.0:storage:eth0:off root=/dev/nfs nfsroot=192.168.0.148:/var/extra-nas1/ard/ss4000e/root mem=256M@0xa0000000 panic=5" -w 5
See your nice debian system booting. w000t!11!! Now you can do it all over again by inserting those disks that are waiting. Prep them the way you like, mdadm them. Whatever. Untar the rootfs from applieddata, and start configuring all over again. Chroot /yourmounteddisk /bin/bash after untarring is your friend!
