Patch turns Transmeta Crusoe into a full i686

A rather simple kernel update released recently is all what it takes to turn a ten-years old Transmeta-powered computer or appliance into a functional computer again.

By “functional” we mean one which is able to run the latest Linux software without crashing. And that happens because of the work of one stubborn Arch Linux contributor. The main problem is that Transmeta´s original Crusoe CPUs really implement the full i586, which is the Pentium I, or more appropriately, a “crippled i686” implementation, that lacks one particular processor instruction “long NOPs”.

So what happens if you slip an installation CD with a recent Linux distro into such a machine?. More often than not, it will hang. “The Crusoe emulates x86 instructions, but not all of the instructions required to qualify as an i686 CPU” says Synthead, “one major thing it is missing: long noop instructions, or its abbreviated name, nopl. He explains: “these long noops are occasionally passed to the CPU from software compiled with the –O2 flag -for i686 optimisations-, which is an absolute standard for Linux software at this current point in time.” and adds that the obvious solution would be to recompile everything for “i586” from sources, but even that is not a solution due to one pervasive Linux library that has grown to require i686: glibc.

“Unfortunately, since it’s 2010, the majority of source code used in current Linux distros are expecting to be compiled for Pentium Pro onwards”, and recompiling is not easy: “some software explicitly calls it in the makefiles regardless of what flags you specified” he adds that “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 i686 optimisations disabled”.

Transmeta Crusoe based machines wont even finish booting if they encounter a glibc that sends the CPU the dreaded “nopl”instructions “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.” he concludes.

Luckily for those of us who are by now are already rolling our eyes upwards with all this marchitecture mumbo jumbo, he´s got a solution for us: he realized the AMD Geode has a
similar limitation, and proceeded to port the Geode code to the Arch Linux kernel and test it in his Crusoe CPU. It worked.

“My PKGBUILD specifies it to provide ‘kernel26’, so it is 100% backwards-compatible with the mainline kernel. Any third-party modules or kernel configuration will “just work,” and pacman -not the game but the Arch Linux package manager- will properly track this package without any dependency problems. “

This means that if you install his new Linux kernel package -or put it on a LiveCD-it will make your trusty ancient Transmeta Crusoe CPU able to run software compiled for the “i686” architecture – that means, the vast majority of 32-bit x86 Linux applications available today, and more importantly, its desktop environments. While many popular applications for Linux are still available in packages compiled for the i586 architecture -like Firefox and Java, others are increasingly using i686 as the architecture when compiled, not to mention the glibc issue explained above.

Synthead explains that updating the kernel is all you need. Apparently, you can begin installing i686 packages worry-free, as the kernel would trap the long NOP instructions and emulate those in the kernel, so, for all intents and purposes, the Crusoe becomes a i686. Or so this scribbler seemed to gather.

“The same nopl (long noop) emulation for the geode is specifically included in the Transmeta Crusoe section of the source, plus, the kernel’s config file has been set to build for MCRUSOE instead of M686 and MCRUSOE has been patched to be recognized and treated as a full-fledged i686 CPU instead of an i586 CPU” he says confidently.

But does it work? Synthead says it does, and even released a YouTube video showing the latest greatest Linux kernel -which at the time of this writing happens to be 2.6.34-1 – working on a Transmeta Crusoe powered machine.

Certainly this won´t make a 400-800 Mhz Transmeta CPU feel like a speed demon, but just being able to boot a modern Linux distro and its applications instead of getting a hanged computer shortly after booting from the installation CD makes a lot of difference.

Those of you with a Transmeta tablet, lappy, or internet appliance like this scribbler´s lovely Gateway/AOL GCTP can grab a binary package of this Crusoe i686 kernel over here . And those of you who prefer source code can grab the patch over there

If you are tech-savvy, this sounds like a good enough reason to try Arch Linux, a lightweight distro designed to be simple “..without unnecessary additions, modifications, or complications..” with simplicity defined as “from a developer standpoint, rather than a user standpoint”.

While the Arch Linux self description might sound intimidating to newcomers, with references to its “text-mode package manager”, remember that so is rpm, dpkg, and yum. The fact that “pacman” -Arch Linux package manager- is text mode that doesn´t mean there are no pretty GUIs for it. In fact, if you look around you will find pretty enticing Arch Linux desktop screen shots.

“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!” the spotlight-shy Mr. Synthead concludes. We asked him for his real name but he seems to think synthead is just OK. So that will be it, then. Hooray for stubborn people like Synthead, decided to fight planned obsolescence!.

Oh, and here is the video. Enjoy.☼