Building the worst Linux PC ever

Linux is generally considered the go-to OS for under powered computers. Wanting to challenge the preconceived notion that Linux requires ‘a computer made in the last 20 years,’ [Dmitry] built the worst Linux PC ever around a simple 8-bit microcontroller.

The ATMega1284p [Dmitry] used doesn’t have a lot to offer as far as RAM and storage goes; just 16 kilobytes of SRAM and a paltry 128 kilobytes of Flash storage. While this may be voluminous in the embedded world, it’s peanuts compared to the gigabytes of RAM and hard drive space on even a low-end netbook. To solve this problem, [Dmitry] threw an antique 30-pin RAM SIMM at the problem. It’s wired up directly to the microcontroller, as is the 1 Gigabyte SD card that serves as the PC’s hard drive.

Linux requires a 32-bit CPU and a memory management unit, something the puny microcontroller doesn’t have. For [Dmitry], the best course of action was emulating an ARM processor on an AVR. We’re not sure if we’re dealing with genius or madness here, but it did prove to be a valuable learning exercise in writing a modular ARM emulator.

How fast is it? [Dmitry] tells us it takes two hours to boot up to a bash prompt, and four more to load up Ubuntu and login. If you want a Megahertz rating, good luck; the effective clock speed is about 6.5 kilohertz. While the worst Linux PC ever won’t win any races, its simple construction puts it within the reach of even the klutziest of hardware builders; the entire device is just a microcontroller, RAM, SD card, a few resistors, and some wire.

If you’d like to build your own worst Linux PC, [Dmitry] has the firmware and disk image available to download. If you want to watch the time-lapse of this thing booting, check out the video after the break.


  1. Freax says:

    He should add a cooling system and overclock the ATMega for improved performance!

  2. HuB says:

    This IS hack a year! Mindblowing!

  3. FrankTheCat says:

    This is beautiful. Brofist.

  4. Neil Cherry says:

    It’s madness, it’s brilliant, but it does show what can be done with an 8 bit (and why it’s sometimes a good idea to use more powerful processors).

  5. Bertho says:

    Absolutely gorgeous!

    I’d like to see the ping statistics on this one. Give this board some wings and there is still time until April 1st to get RFC 1149 implemented.

  6. chippy says:


  7. Sam says:

    I would hardly call this the “worst Linux PC ever”.

    This is really very impressive.

    • Someone in Haiti says:

      Well, as far as performance goes, yes… it IS the worst linux pc ‘ever’ by todays standards.

      Brilliant, daring, crazy – yes. but it is without doubt the slowest thing you could make, and THAT gives it the right to be called the worst ever.

  8. svofski says:

    Yes this is really awesome. Great job, Dmitry!

  9. rasz says:

    hilariously awesome

  10. robint91 says:

    April fools

  11. rue_mohr says:

    multicore! multicore!!!

  12. Riktw says:

    Wow, amazing work :)

  13. Dmitry Grinberg says:

    @robint91: No april fools. It works. See long video or build one to try

  14. Max says:

    1GB of disk storage. Wow that’s quite a lot.
    I used to run Linux on my 386SX with a 40MB hard disk and I think I had 2MB of RAM. Maybe only 640Kb.

    Its always best to only boot such beasts up to the command line. Going into X is normally a bit painful and with different virtual terminals on each F key and mouse/console integration, what do you need any sort of windows for anyway.
    If you must go graphical. OLWM or TWM, FVWM2 if you want to go crazy. No Gnome that’s for sure.

  15. @Max: for this demo I used jaunty-minimal which is 300mb or so, so a smaller card will do. You can use anything else (smaller or larger). I have xfce working too (emulator supports lcds, as you can see in code)

  16. Jeremy says:

    Amazing. Most people who would have considered something like this would have vetoed the idea immediately after conception, but this is a shining example of how nice it is to see “badness” in action.

    Stellar job, Dmitry!

    • Joe says:

      For good reason. “You’re solving the wrong problem.”

      It’s cool that it runs Linux, though. A better idea would be to run something like a BASIC prompt ala the old Commodore 64. You wouldn’t even need to shoehorn a SIMM module or kernel, although it would be wise to have a DOS. Just use a cheap 4GB SD card and you’re good to go for unlimited storage. ;) Note: DOS doesn’t equal MS-DOS clone. Think of just file I/O support with program loading (bootstrapping).

  17. Willaim says:

    and to think that is the time lapse video haha

  18. Havel says:

    If Linus Torvalds was here to see this, he’d want to shake your hand Dmitry. There’s proof that you can boot Linux on just about anything. Now to attempt porting Linux to my Sony Clie. (With a 66MHz processor and 128MB of external storage, I’m sure it’d boot in a reasonable time. lol) Very nice work! :D

  19. The video on vimeo is NOT a timelapse – it is the normal realtie video. The one on youtube is the video with useful parts only and sped up. see the writeup on my site for the youtube link

  20. agumonkey says:

    Please make a video of it running jslinux ! Pleeaase !

  21. Paul says:

    Small point. Linux does not require a MMU. The No-MMU variants were long ago merged into the main source tree.

  22. Well, ubuntu requires an MMU, as do all major distros. Plus without an MMU, you cannot really use swap very well, and then i’d need a while lot more memory than 16MB

  23. naturetm says:

    Lol, amazing! Seeing this made my day. I’ll have to remember it for inspiration when I tell myself something can’t be done. Thanks!

  24. dmcbeing says:

    Ok seriously , this has to be the best hack i have ever seen!(Or not since i cant access the web page :( )

  25. Which page can you not access? My site seems to be up just fine

  26. rossum says:

    Delightful. Smart. Funny. This made my day.

  27. wetomelo says:

    That’s what i call a hack! +1: To “trim the cost” a bit more, power it with an array battery of discarded fruit, or saltwater & coins!

  28. mur1010 says:

    This is awesome.

    Next: Get some tubes, rebuild the ATmega with TTL (Tube-to-Tube Logic) and make it run at mains frequency. How many days for a bash prompt?

    But this project can be useful if you clock the AVR at 20MHz and use a text mode only TTY…

    Anyway I will try to port Linux to run on N8VEM. (First I must build my own N8VEM =P )

    • My AVR is running 24MHz (slight overclocking)

      • mur1010 says:

        Oh, I misunderstood the post. It says that the EFFECTIVE clock speed is 6.5kHz, I thought it was the REAL clock speed. Now, again, imagine some tubes running Linux at AC mains speed. It would take years to boot!

      • Dissy says:

        “Now, again, imagine some tubes running Linux at AC mains speed. It would take years to boot!”

        OK I had to do the math on this one.

        3.6khz takes 2 days. Scale that to 60hz (US Mains)

        3600/60*2 is 216.66 days, or just round up to 217 day periods.
        Strangely enough, 217 / 31 is exactly 7 roughly-months.

        This means the clock signal would need to be 15hz or less in order to break the 2 year mark, to deserve the “It takes years to boot” badge of (dis?)honor.

      • Sven says:

        Dissy, note that the real clock speed is probably 24MHz, the emulated clock speed is 3600Hz.

        If you scale down from 24MHz to 50Hz (since he is probably european) it would take 219 years instead of 4 hours :P

  29. Hirudinea says:

    Linux on a C-64, Linux on a C-64!

    • boomlinde says:

      After seeing this I guess it’s not that farfetched with a 32 mb ram expansion unit and one of the sd card solutions available for the C64. The main problem will be that 6502 is a lot slower than the atmel processors, and that the clock speed of the C64 is already in the sub-mhz range :)

  30. Kevin Keith says:

    Ladies and Gentlemen,
    The Church-Turing Theorem

    Great job! I got into an argument awhile back with someone, who did not understand the distinction between “any turing machine can emulate another turing machine give enough memory” and “any turing machine can emulate another turning machine in a reasonable amount of time.” Little did he know he was implicity saying Church/Turing were wrong

    • Joe says:

      You would think this would be common sense… If they can simulate a machine on paper using simple rules… (designing it) Then you’d have to assume that it would apply to anything inbetween as well!

      But then again, most people’s training in state machines is limited to cases like: “how do I get it to defrost my frozen hamburger?” or “how do I shift gears?”
      That’s 2 systems that can’t really emulate much of anything without a lot of external hardware (not just an ‘unlimited tape’ AKA lots of data storage space). Tell them that a road system could be setup to emulate a simple computer assuming everyone followed the traffic laws most of the time and you had enough traffic to cover all cases, would blow their mind if they even believed you. Hell, most so-called computer scientists think that a state machine has to be 100% accurate (read: everyone follows rules and each case is done once and only once) to function properly. There are in fact computers based on many statistics. Heck, at some level, all digital switches are really only statistically correct. It’s possible to have error rates above 0 and still be able to use the PC for even sensative stuff like 3D games or running Prime95.

      Essentially, a digital switch is trying to approximate 100% relationship to voltage thresholds (say, less than 0.8 and greater than 2.4V) at very high speeds that can cause errors to propagate. Digital != binary but this is where the term is conventionally applied.

    • collinstocks says:

      Not any Turing machine can emulate any other Turing machine. Any Universal Turing machine can emulate any other Turing Machine.

      • Joe1 says:

        Given enough memory and time… :P Yeah, technically there are nonuniversal machines but who the heck uses them? If it supports a modern compiled language like C, then it pretty much [i]has[/i] to be universal. Loops, conditions, variables, and so on are based on the assumption that the targetted machine is universal. Sorry about not being more specific.

  31. Ren says:

    Would Minix be better suited for 8-bit?

  32. xorpunk says:

    Get a socket and get a 333Mhz ARM(fastest non-BGA non-FPGA chip out there) and you have a more realistic solution on breadboard.

    This is pretty cool though, looks like something you’d see a demoscene coder doing instead of mediocre focused work like most people do..

    • Once again, this was done for fun, not for real computation. That being said, I did manage to use it for useful work a few times. In fact, I am adding save-state functionality, much like suspend-to-disk, so that I don’t have to wait the 2 hours every time to use it, even.

    • Plus, ARM chips never work by themselves enough to boot linux, you’ll also need RAM (almost never DIP package), a PMIC (usually needed are at least 2 supplies, almost never DIP package), ROM (for boot code), etc… :)

      • xorpunk says:

        Yeah I’ve researched it many times. Anything POP needs NDA legal stuff and bulk units, even if you don’t use their security API. No non-BGA POP exists though.

        The ROM is actually doable if you hsve a stencil kit.

        I think it’s all to keep market values up and competition down..

      • Joe says:

        High barriers to entry, xorpunk? Yeah, that’s old theory in economics under “how to maintain a monopoly to increase margins for a longer amount of time”. Pretty basic stuff, heh. Any information ‘out there’ can be used to bypass them – These companies sell the chips AND the software to program them so there’s a little left hand and right hand thing going on. It can also be used to find loopholes in their security like all the ‘vendor specific commands’ on ATA hard drives. Broadcom is awful at this. They assume that because the implementation is obscure, that no one will mess with it. Or that the documentation won’t get stolen/purchased by shells… Insane but hey, it’s their business. It just stinks as a hobbyist.

        BTW, the FCC is supposedly partially to blame? Ever try to find a scanner that does uncensored frequency blocks in the US? Repair manuals and schematics for ‘locked’ scanners?

        I went through this math before and an old Nintendo DS or GBA is perfect for this sort of stuff since it is even more hackeddocumented than the routers supported by DD-WRT. Just make a keyboard/serial port and library for your custom hardware and then any application can support keyboard entry and (optionally) a terminal. I have the GBA SP and it still has the functioning link port. Sadly, they ‘borrowed’ the link port to support the RTC and didn’t even run all the pins to the board from what I’ve read. Oddly, the port exists internally to the CPU die. The DS has WIFI, though so you can do a terminal over IP and not need some silly dongle!

      • Joe says:

        Sorry, meant to specify that the DS removed the link port. The GBA doesn’t have the RTC.

  33. Rob says:

    This is thoroughly coated in awesome sauce. Wow! Nicely done!

  34. joshua says:

    wait – how does it to boot to X without a framebuffer?

  35. George Dina says:

    Man, you’re awesome!

  36. Dave says:

    So, he created an IBM xt (Actually the xt ran 4.77mhz) and booted linux.

  37. @joshua. See source code. I support LCD emulation and even you can hook up an LCD to it easily.

  38. MrX says:

    A lot of time is done decompressing Linux, he shouldn’t have compressed the image..

  39. naugtur says:

    uClinux with microkernel would work on that much faster. It runs on picotux which up to now was the lowest-end machine I knew of.

  40. localroger says:

    Very cool!

    This reminds me of the ZiCog hack for the Parallax Propeller, emulating a Z80 in two of the 8 32-bit cogs it runs nearly as fast as an early Z80 machine and several people got CP/M running what used to be usable applications off SD cards with ca. 1980 CP/M disk images.

  41. Joe says:
  42. This is utterly pointless. And I love it.

  43. ZardoZ says:

    I like to see Linux running in a Z80 machine, like a old Spectrum 48k :D

  44. ZardoZ says:

    It will be nice a Z80 linux version. It could be awesome running in a old Spectrum 48k :D

  45. Rune K. Svendsen says:

    So what is the bottleneck? Have you done some profiling? Or is that a stupid question when using a CPU in the KHz range?

  46. mrmajestic17 says:

    “We’re not sure if we’re dealing with genius or madness here…”

    I never knew there was a difference between the two ;) In all seriousness though, this is a pretty awesome project.

  47. popeydc says:

    I want to see how badly this does Hugos Random Benchmark from my local LUG!

  48. Galane says:

    Can the same thing be done with a Propeller chip?

  49. Isaac says:

    I wouldn’t mind an MCU based SSH terminal…. hmmmm…

  50. killersquirrel says:

    I want to see a Turing Machine that can boot Linux…

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Get every new post delivered to your Inbox.

Join 98,523 other followers