Arch Linux on a Transmeta Crusoe CPU
Arch is a distro that is completely optimized for i686 and x86_64 CPUs. Because it's linux, barriers can be http://aur.archlinux.org/packages.php?ID=38661broken--the sky is the limit--and in this video, I am demonstrating my custom kernel, 'kernel26-crusoe'.
The Transmeta Crusoe CPU emulates x86 instructions, but not all of the instructions required to qualify as an i686 CPU. One major thing it is missing: long noop instructions, or its abbreviated name, nopl. These long noops are occasionally passed to the CPU from software compiled with the -O2 flag, which is an absolute standard for linux software at this current point in time. For the Crusoe, however, nopls cannot be morphed by its internal code morphing software and you get an unavoidable crash.
One work-around would be to compile everything with the -Os flag, which omits all the nopl instructions from being compiled into your software. Unfortunately, since it's 2010, the majority of source code used in current linux distros are expecting the -O2 flag, even to the point where some software explicitly calls it in the makefiles regardless of what flags you specified. -O2 produces faster, more efficient code that utilizes more features of processors later than the Pentium Pro era. Since just about every modern CPU in existence has this capability, this makes perfect sense.
One very important hunk of software that falls short of a successful compile with the -Os flag is glibc. glibc is an extremely common C library that is greatly depended on in just about any distro. Errors 'o plenty is assured if you compile this with -Os, and because we need to use the -Os flag for our system to even finish the boot sequence, we have a check-mate in our possibility of running linux on this machine.
Fortunately, with the help of others (it is linux, isn't it?), I have provided a solution! I was researching this issue to the best of my ability and discovered that the AMD Geode CPU also carries this unfortunate characteristic. But in its benefit, there is a patch floating around for the 2.6 kernel that provides emulation for long noops and promotes full i686 support for the Geode. I thought, 'Since the Crusoe has the same problem, I should be able to use the same patch on it if I apply it in the right places,' and that's exactly what I did. After some trial and error, tweaking, and a few beers, viola! It worked! I produced a perfectly stable, 100%-i686 kernel for the Transmeta Crusoe CPU.
I call this kernel 'linux26-crusoe' and it can be found in the Arch Linux AUR. My PKGBUILD specifies it to provide 'kernel26', so it is 100% backward-compatible with the mainline kernel. Any third-party modules or kernel configuration will "just work," and pacman will properly track this package without any dependency problems. Following this, the PKGBUILD will also only build the 'kernel26-crusoe' package, so if you need 'kernel26-headers', 'kernel26-manpages', or 'kernel26-docs', simply install them from the regular Arch Linux mirrors with pacman.
An overview of the differences between the new kernel, 'kernel26-crusoe', and the official kernel:
- The same nopl (long noop) emulation for the geode is specifically included in the transmeta crusoe section of the source
- The kernel's config file has been set to build for MCRUSOE instead of M686
- MCRUSOE has been patched to be recognized and treated as a full-fledged i686 CPU instead of an i586 CPU
- The PKGBUILD of 'kernel26-crusoe' is written with provides=('kernel26') which gives it 100% compatibility with the mainline kernel (including third-party modules)
- And of course the best part: it works with our mirrors! The standard -O2 flag is supported!
I spent quite some time and many beers figuring this out, so please enjoy it to the fullest extent! Hopefully this will breathe some more life into your older (perfectly usable) hardware!
You can find the AUR package here: http://aur.archlinux.org/packages.php?ID=38661
And the binary version here: http://max-o.sytes.net/kernel26-crusoe-2.6.34-1-i686.pkg.tar.xz
kernel26-crusoe
arch
linux
archlinux
aur
os
o2
transmeta
crusoe
T5800
slatevision
slate
kernel26
kernel
2.6
panic
panics
glibc
init
compile
lnop
long
noop
laptop
laptops
netbook
netbooks
tablet
pc
tablets
pcs
module
modules
Channels:
Arch Linux Videos
Added: 275 days ago by
nate
Views: 97 |
Comments: 0
Not yet rated