Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

Arch Linux on a Transmeta Crusoe CPU

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
3,096
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Jul 4, 2010

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

  • likes, 1 dislikes

Link to this comment:

Share to:

Uploader Comments (synthead)

  • Please, don´t hide behind a nickname. You deserve all the credit for this work. Do you have a blog or web site? an email address?.

    Best regards,

    FC

  • @macafern Not a problem! I wanted this to work just as much, so I had to do something about it. I learned everything by the wonderful support I've received from the Arch Linux BBS and annoying people on irc.freenode.net with too many questions. I wouldn't have been able to get this far myself :) The most I can ask is to enjoy it (as it sounds like you would!) and chip in to the linux community whenever you can.

  • hey synthead this is GREAT news!!!!. I´ve been waiting for this for years!!!

    I have a handful of Gateway Connected Touchpad internet appliances from Gateway/AOL that used to run a very ancient (2.4 kernel) Midori Linux.

    Now I could finally install an up to date Linux on it!

    Now,how does one install this? is there an archlinux livecd or install cd that boots this kernel by default? or how do I drop this kernel into the cd?

    Where can I reach you?

  • @macafern I take it these guys run a Crusoe? I'm going to upload a video response of what to do in a bit :) I'm on AIM pretty religiously as sawtoothdentist, so hit me up.

see all

All Comments (7)

Sign In or Sign Up now to post a comment!
  • What support is missing exactly from Crusoe for i686 instructions? because it does in fact have an FPU I don't know where you heard that it doesn't. Its more likely that you were hitting other unsupported instructions. or something in -O2 was messing up the CMS

  • I have archlinux, and sometimes it randomley makes 4 new unaccesable desktop screens, i can see them by pressing CTRL + ALT + left mouse click and hold + drag mouse, or CTRL + ALT + back arrow and I can see smaller desktop windows but I cant use them, i want this to stop. any ideas? terminal? configuration?

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more