Donnerstag, 11. September 2014

Running debian wheezy ( chroot ) on the Nokia 770

After updating my Nokia 770 to OS2008HE and playing arround with it a bit, I thought about using it as home server (again). However, instead of installing Mer, I decided to go for a fully-fledged Debian and use it in a chroot-environment - as I do with my OpenWRT router. This way I get (security) updates timely, and also packages are typically well tested - while not touching the kernel or the device specific drivers.

Thanks to debootstrap, creating a minimum debian root-fs for ARMel is really easy:
debootstrap --foreign --arch=armel wheezy deb770

However, when trying to chroot on the 770, the' kernel shows its age:
chroot /media/mmc/debian
FATAL: kernel too old
The most recent version of debian still supporting 2.6.16 is debian Lenny, which is unsupported as of mid 2012. The main incompatibility stems from the minimum kernel version debian's glibc is compiled with - for debian wheezy userland it doesn't make much sence to support 2.6.16 when wheezy was shipped with Linux-3.2.

However, thanks to debian's excellent build system (and linux' flexibility in general) it is no big deal to re-build glibc with support for older kernels (if you have an ARM based system with a recent kernel, don't know about cross compilation).
Therefore, I simply chrooted into wheezy on my raspberry Pi, downloaded the source package (eglibc) and modified the following config files:

debian/sysdeps/ -> MIN_KERNEL_SUPPORTED = 2.6.16
debian/ -> replace every kernel version starting with 2.6. with 2.6.16

and followed the building tutorial:

After a few hours, you'll find debian packages of your rebuilt glibc, which can be installed with "dpkg -i". A good idea is to lock those packages for updates, otherwise upgrading your system using apt might break everything again. After you've built a working rootfs once, you can also re-compile and update glibc directly on the N770.

For those of you not eager to spend hours compiling glibc, I made the nokia770 compatible eglibc-packages (linux-2.6.16+, ARMv4te) available here:
However, for installation a system with newer kernel is still required (as dpkg requires glibc too), therefore I'll prepare a patched rootfs soon.

Keine Kommentare:

Kommentar veröffentlichen