fake's blog

everything fake

Keyword - linux

Entries feed - Comments feed

NSLU2: Compiling a recent kernel

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!

Version 3 of the ROCK Linux Distribution Build Kit a.k.a. "ROCK3" released!

Finally! it's been 20 months, and now it's done - ROCK3 was just released! Read the Announcement (which, despite the changelog, was written by blindcoder - thanks!), download the Source, the Crystal ISO or the Network Install ISO (be sure to read the network install howto) and start contributing!

Read about it on symlink.ch, pro-linux.de, freshmeat.net, yigg.de, golem.de, digg.com, distrowatch.com, osnews.com and lwn.net!

ROCK Linux 3 RC3 released

a few hours ago i released the third Release Candidate of ROCK Linux 3. If th agrees, this should be the final release. Please grab the full Crystal ISO or the Network Install ISO (see the instructions for use). A source snapshot is also available. Note beside: the download location changed because iso.rocklinux.de is unreachable for some unknown reason. As soon as it is reachable again, i will copy the images over there, too.

Please test the ISOs and report any problems on the Release Candidate Bugs page or to the rock-devel Mailinglist.

ROCK Linux 3 RC2

I released RC2 of what most likely will be called "ROCK Linux 3" yesterday, with all reported bugs from RC1 fixed. Unfortnately, neither me nor the other developers are yet used to the 'extraversion' tag, which makes upgrading via rocket from RC1 to RC2 impossible for this release - it will be possible to upgrade RC1 and RC2 to RC3 using rocket update / rocket upgrade.

Please download the full Crystal ISO (667 Mb) or the Network Install ISO (52 Mb) and help testing!

ROCK Linux Release Candidate 1

yesterday i announced a feature freeze and today a Release Candidate of ROCK Linux as of subversion revision 7721.

In the next few days, the rev. 7721 vanilla Crystal ROCK ISO, aka Release Candidate 1, shall be thoroughly tested and as many bugs as possible shall be squashed. If you want to help out, too, grab the full Crystal ISO (667M) or the network install ISO (51M) and install it, try it, use it, and report bugs on the dedicated wiki page or mail directly to the ROCK Linux Developers Mailinglist. Network install instructions are here (unfortunately, for this RC, you'll need them).

If you want to be informed of the next Release Candidate, add the Release Candidates page to your watchlist.

thanks in advance for your support!

- page 2 of 3 -