Forgot your password?
typodupeerror
Hardware Hacking Software Linux Build

GNU/Linux Running On An 8-Bit Processor 361

Posted by Unknown Lamer
from the some-people-have-lots-of-free-time dept.
dartttt writes, quoting Ubuntu Vibe: "Dmitry Grinberg has successfully booted Ubuntu 9.04 on an 8 bit micro machine with 6.5 KHz CPU and 16 MB RAM. Grinberg did this experiment on a ATmega1284p, 8-bit RISC microcontroller clocked at 24MHz and equipped with 16KB of SRAM and 128KB of flash storage. Since the RAM was too low, he added 30-pin 16MB SIMM to the machine and a 1 GB SD card to host Ubuntu image. ... To get the world's slowest Linux Computer running, he had to write an ARMv5 emulator which supports a 32bit processor and MMU. A similar machine can be made very easily and everything should come in about $20." There is source code available, but it's under a non-commercial use only license. Just how slow is it? "It takes about 2 hours to boot to bash prompt ('init=/bin/bash' kernel command line). Then 4 more hours to boot up the entire Ubuntu ('exec init' and then login). Starting X takes a lot longer. The effective emulated CPU speed is about 6.5KHz, which is on par with what you'd expect emulating a 32-bit CPU & MMU on a measly 8-bit micro. Curiously enough, once booted, the system is somewhat usable. You can type a command and get a reply within a minute." If you like watching a whole lot of nothing, there's a video of the boot process below the fold.

This discussion has been archived. No new comments can be posted.

GNU/Linux Running On An 8-Bit Processor

Comments Filter:
  • Geoworks (Score:5, Informative)

    by Daniel Phillips (238627) on Monday April 02, 2012 @04:10PM (#39552707)

    Nice trick. However, let me point out that in 1990 Geoworks GEOS was capable of running a preemptive multitasking GUI looking much like QT but with better automatic widget layout, on an 8 MHz 8088. I will just heave a great sigh in the name of the lost art of tight coding. No, Linux is not tightly coded. I should know. The best you can say about it is, the other guys are worse.

  • No it won't. (Score:5, Informative)

    by pavon (30274) on Monday April 02, 2012 @04:16PM (#39552809)

    No version of windows ever ran on an 8-bit processor. Windows 1.0-3.0 would run on an 8086, but that is still 16-bit, and Windows 3.1 won't even run on that, it needs a 286 or higher.

  • Re:Why? (Score:5, Informative)

    by Captain Spam (66120) on Monday April 02, 2012 @04:25PM (#39552925) Homepage

    You are aware that the 80386 processor (what Windows 3.1 was designed for), which was 32-bit, was first released in '85, right?

    Note to a specific age group of Slashdot readers: You are aware exactly how old that fact I just presented makes us feel, right? *sigh*

  • Re:Actually, cool! (Score:1, Informative)

    by Anonymous Coward on Monday April 02, 2012 @04:26PM (#39552945)

    uC Linux does not require an MMU.

  • Re:Geoworks (Score:4, Informative)

    by kimvette (919543) on Monday April 02, 2012 @04:26PM (#39552949) Homepage Journal

    Nice trick with Geoworks, but the 8088 is a 16-bit processor on an 8-bit bus.

    Now, GEOS (the predecessor to Geoworks) did run on 8-bit procesors in the '80s, but it was in no way multitasking.

  • by billcopc (196330) <vrillco@yahoo.com> on Monday April 02, 2012 @04:51PM (#39553251) Homepage

    Well, I hope the guy got plenty of "personal enjoyment" because I think it's a lame hack. He didn't actually get Linux working on an 8-bit processor. He got it working in an emulator, which apparently he DID write. At no point did he port the Linux kernel to a new platform. This is right up there with booting Linux on a GP2X console via Bochs.

    So, to recaption this article:

    "ARMv5 emu for underpowered and rarely used AVR chip. ATmega community baffled and bewildered. Oh, and it boots Linux in half a day."

  • Re:Why? (Score:5, Informative)

    by dmitrygr (736758) <dmitrygr@gmail.com> on Monday April 02, 2012 @05:05PM (#39553401) Homepage
    I was bored :)
  • by dmitrygr (736758) <dmitrygr@gmail.com> on Monday April 02, 2012 @05:42PM (#39553815) Homepage
    1. the emulated cpu *effective clockspeed* averages 6.5 KHz in released code (10KHz with better RAM code, that i am releasing later today)
    2. Site is still up (it occasionally hic-ups with a 4xx ot 5xx HTTP error, but mostly it is still up
    3. the linux ram is a 30-pin SIMM of 16MB capacity, the interface to which (incl. refresh) I bit-banged using 3 8-bit IO ports. The AVR's internal RAM is used for emulator SoC state, AVR stack, and the icache
  • Re:75 MHz 286 (Score:4, Informative)

    by Frohboy (78614) on Monday April 02, 2012 @06:30PM (#39554413)

    486 came in a DX model which ran at 33/66Mhz. The 1st Pentiums came in at 75Mhz. The only 286 i remember was a Unisys 8 or 10Mhz. I'm just sayin.

    The 486DX4s ran at 75Mhz (with a 25Mhz bus, since despite the name, they only had a 3x multiplier. The DX4-100 had a 33Mhz FSB.). The first Pentiums were 60 or 66Mhz, with no multiplier (i.e. the CPU and FSB were clocked the same). The 75Mhz Pentiums came a year later and ran on a 50Mhz FSB (at 1.5x), and were cheaper (or at least the same price) compared to the 66Mhz model (since you had a faster CPU, but slower bus), if I recall correctly.

  • Re:Geoworks (Score:5, Informative)

    by david.given (6740) <dg@[ ]lark.com ['cow' in gap]> on Monday April 02, 2012 @07:07PM (#39554809) Homepage Journal

    I wrote some code for it: see here [cowlark.com] (including a Linux86 execution environment, that would allow you to directly run Linux86 binaries from GEOS, that I was really rather proud of).

    I can sum up the coding experience with the phrase: THE HORROR, THE HORROR.

    In order to write code for GEOS you needed a monster, badly written and badly documented SDK and a copy of Borland C. The actual code you wrote was in a C superset called GOC, which was compiled via a buggy preprocessor into incredibly cryptic C, which was then compiled with Borland and linked with a custom linker. Alternatively, if C wasn't your thing, there was an object-oriented dialect of 8086 assembler available. The OO system was bizarre, and allowed for classes to have unspecified superclasses, where the superclass was determined at run time: the system used this to great effect in the UI, where the app author's generic UI was turned into a specific UI implementation for the device. The C bindings were full of bugs, too, including function calls which didn't save all the registers properly...

    The actual architecture exploited the hell out of the 8086 segmentation architecture. Memory was organised as a set of relocatable blocks which were referred to by handles (which, under the hood, were usually segment descriptors). To dereference the memory, you had to lock the block, do your manipulation, then mark the block as dirty if you had changed it, and unlock it. The lock/unlock procedure allowed the system to ensure that the block was in memory, by paging it in if necessary, either from EMS RAM or disk. It was incredibly, utterly, un-Posix, and a complete pain to do anything in. The learning curve was insane.

    Where GEOS really did well was the application stack, which was subtle and elegant. There was a mechanism to allow you to use a file as a heap backing store (using a very similar but annoyingly different API to the block API described above, but that's not really important). The system automagically loaded and saved data from the file as you locked and unlocked blocks. There were standard components for everything up to and including a complete bitmap paint package, a vector drawing package, and a word processor --- and these all used these file heaps as storage. And, of course, you could have multiple components in the same file. OLE! But done right.

    By today's standards, of course, it's all a huge pile of incomprehensible, unmaintainable cruft, all inextricably linked to 16-bit 8086 code. It wasn't just utter mismarketing that killed GEOS: it was the inexorable march of time. It was simply unable to adapt to the 32-bit world. All the clever tricks they did to get decent performance out of an 8086 were liabilities on more modern hardware.

    That said, towards the end, when Geoworks was in its death spiral, they did produce two different attempts to rewrite GEOS for 32-bit RISC processors: GEOS-SE and GEOS-SC. I know absolutely nothing about these other than on the wikipedia page, and if anyone has any info, I'd be fascinated to hear about it.

  • Re:No it won't. (Score:4, Informative)

    by toddestan (632714) on Monday April 02, 2012 @11:20PM (#39556347)

    You can get Windows XP to boot on as little as 18 MB of ram:
    Source [winhistory.de].

"Don't talk to me about disclaimers! I invented disclaimers!" -- The Censored Hacker

Working...