I'm running the latest debian (etch, 4.0r1, which you need to install manually because of a problem with the firmware update as the slug-firmare.net page states) on my slug.

The latest kernel you seem to get with debian currently is 2.6.18, which is pretty outdated. So i went ahead and tried to assemble the stuff needed to build my own kernel, which was more work than i'd expected. The Linksys NSLU2 needs some proprietary firmware, but nevermind signing up at IBM, if you installed the image linked above, the firmware you need is in /lib/firmware/NPE-B. Just make sure the file stays there ;-)

The steps to build your own kernel are:
  • get your hands on a cross-toolchain (i use and enjoy crosstool, for version 0.43 i edited demo-arm-xscale.sh to use gcc 4.0.2 (ICE in 4.1.0) and glibc 2.3.6-tls, you'll probably need to put another patch for glibc into patches/glibc-2.3.6/, get it here). Make sure the tools are in your $PATH!
  • get the kernel sources (at the time of writing, was the newest, which i used)
  • making sure you have subversion installed, issue the command:

    svn co svn://svn.debian.org/svn/kernel/dists/trunk/linux-2.6/debian/patches/features/arm debian-arm-patches
  • extract the kernel sources, and apply the following patches

    tar -xfj linux-
    cd linux-
    patch -p1 < ../debian-arm-patches/ixp4xx-npe-driver-0.3.1.patch
    patch -p1 < ../debian-arm-patches/ixp4xx-net-driver-improve-mac-handling.patch
    patch -p1 < ../debian-arm-patches/nslu2-i2c-gpio-driver-support.patch
    patch -p1 < ../debian-arm-patches/nslu2-mac_plat_info.patch
    patch -p1 < ../debian-arm-patches/nslu2-setup-mac.patch
  • now it's time to configure your kernel, the debian defconfig is a little dated, so i upped my config. put it into your linux source dir and run:

    mv nslu2- .config
    make ARCH=arm CROSS_COMPILE=arm-xscale-linux-gnu- oldconfig
  • if you want to edit the config (it's fairly basic), run the last line above with "menuconfig" at the end (you guessed it ;) big fat note: don't compile in the ixp4xx npe network driver, leave it as a module! the firmware is not part of the initramfs, so the network interface would never come up!
  • build your kernel:

    make ARCH=arm CROSS_COMPILE=arm-xscale-linux-gnu- zImage modules
    mkdir ../modules-
    make ARCH=arm CROSS_COMPILE=arm-xscale-linux-gnu- INSTALL_MOD_PATH=../modules- modules_install
That's basically it for compilation. Now all you need to do is copy the modules (maybe as a tar file) to the box so the modules end up where they belong; then copy arch/arm/boot/zImage to the box's /boot directory, naming it vmlinuz-, for example. then run "mkinitramfs -o /boot/initrd.img-". finally, you need to alter the symlinks 'vmlinuz' und 'initrd.img' in /boot to point to the newly created/copied files.

If you now run 'flash-kernel', it will flash the kernel and the initramfs into the nslu2's boot flash. don't worry - if anything goes wrong, just re-flash the image from the "manual install" link above.

reboot the slug and wait... good luck ;-) if it does not come up again, a good starting point is to simply unplug the external hard drive and check the logfiles.

have fun!