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.

117 thoughts on “Building the worst Linux PC ever

    1. 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.

  1. 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.

  2. 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!

    1. 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).

  3. 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

  4. 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 )

      1. 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!

      2. “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.

      3. 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

    1. 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 :)

  5. 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

    1. 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.

      1. 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.

  6. 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..

    1. 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.

      1. 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..

      2. 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!

  7. 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.

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

      Actually it is a very smart question! When everything is slowed down, bottlenecks are far more apparent as relative time differences are longer – lower the speed, higher the time resolution.

    2. I don’t see any crystal. So it must be running on 8Mhz internal clock. Boosting that to 20Mhz (or overclocking it to 32Mhz, which goes fine with most AVRs) will make it a lot faster.

      What’s the bottleneck in linux? Well, there are tools to measure that even on a normal system with very high accuracy.

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 )

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.