[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Lenny/armel with Debian kernel on Buffalo Linkstation Pro v2



Hi,

After much wailing and gnashing of teeth, I have a Lenny/armel user-space with a stock-ish Debian kernel on a Buffalo Linkstation Pro v2:

~# grep ^Hardware /proc/cpuinfo && uname -a && cat /etc/debian_version
Hardware        : Buffalo/Revogear Kurobox Pro
Linux linkstation 2.6.25-rc8-orion5x #2 Sat Apr 5 20:02:55 UTC 2008 armv5tel GNU/Linux
lenny/sid

The hardware is pretty cheap now - the "Linkstation Live" version seems to be available for $143 and ukp 100 in the US, and UK respectively, according to froogle (2xUSB2/1xGigEther/250G SATA/400MHz/128M). I used a Nokia DKU-5 USB/serial cable for the serial console (3 ukp), but the more widely available "Nokia CA-42" should work as well.

I don't think I'll have any time soon to work on the kernel package install script etc. but hopefully these notes will be useful when it comes to creating this:

A serial console is advised, but not (hopefully) essential for this procedure.

For the kernel build, I used the tar ball from http://photon.itp.tuwien.ac.at/~mattems/linux-2.6_2.6.25~rc8.orig.tar.gz and the debian dir from svn://svn.debian.org/svn/kernel/dists/trunk/linux-2.6/debian

I started off with freelink, and replaced the root with lenny/armel using deboostrap. Here are the rest of my notes:

These notes assume you are starting with Freelink, and the Buffalo kernel image v 2.6.16 (other versions have not been tested). n.b. The buffalo "emergency mode" functionality will be lost (as that comes from the Buffalo initrd).

. Install Lenny Armel userspace (debootstrap etc.) and micro_evtd (not yet Debian packaged, but source available - fan speed control etc.)

. Build Debian kernel 2.6.25-rc8 or later - only the orion5x kernel is needed (comment out the rest of the flavours from linux-2.6-2.6.25~rc8/debian/config/armel/defines)

. Install the kernel packages, and mkinitramfs, also install the "devio", and "uboot-mkimage" packages.

. Make Debian initramfs for the new kernel using mkinitramfs as usual.

. Create the uboot images:

.. Kernel:

devio > mach-change-shim.tmp 'wl 0xe3a01c05,4' 'wl 0xe38110e5,4' && cat mach-change-shim.tmp lsboot/vmlinuz-2.6.25-rc8-orion5x > shimmedimage.tmp && mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n 'Linux-2.6.25-rc8-orion5x' -d shimmedimage.tmp uImage.buffalo

n.b. devio fixes up the machine ID, and this currently needs to be 0x05e5 (not 0x0630 etc. until the kernel has been fixed).


.. initramfs:

mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n 'initrd-2.6.25-rc8-orion5x' -d initrd.img-2.6.25-rc8-orion5x initrd.buffalo

.. Modify the boot environment (default boot prevents the initramfs loading - the kernel says "checking if image is initramfs...it isn't (bad gzip magic numbers); looks like an initrd" - however I'm not really sure why). The modified boot environment appears to works with both Debian, and the Buffalo kernel+initrd - although I've only tested the 2.6.16 buffalo kernel + initrd) - n.b. this can also be done with the serial console, and the setenv command. The nvram command is from the original Buffalo initrd (I think freelink leaves this mounted on /initrd by default, but if not, you can extract this by "dd if=initrd.buffalo.original bs=1 skip=64 | gzip -cd > /tmp/initrd.ext2" and then use mount -t ext2 -o loop).

.. Remove the initrd=0x00800040,15M parameter (check that your env look like those below), and verify

TestBox-linkstation:/# chroot /initrd
TestBox-linkstation:/# nvram -c get bootargs_root
bootargs_root=root=/dev/sda2 rw initrd=0x00800040,15M panic=5
TestBox-linkstation:/# nvram -c set bootargs_root "root=/dev/sda2 rw panic=5"
>nvram_set:bootargs_root = root=/dev/sda2 rw panic=5
TestBox-linkstation:/# nvram -c get bootargs_root
bootargs_root=root=/dev/sda2 rw panic=5

. Install the new uImage.buffalo and initrd.buffalo into /boot

. Reboot.

Cheers,

Tim.


Reply to: