“It is common to see newbies asking in microcontroller forums if they can run Linux on their puny little 8-bit micro. The results are usually laughter. It is also common to see, in Linux forums, asked what the minimum specs for Linux are. The common answer is that it requires a 32-bit architecture and an MMU and at least a megabyte of ram to fit the kernel. This project aims to (and succeeds in) shatter(ing) these notions. The board you see on the right is based on an ATmega1284p. I’ve made one with an ATmega644a as well, with equal success. This board features no other processor and boots Linux 2.6.34. In fact, it can even bring up a full Ubuntu stack, including (if you have the time) X and gnome.”
So he’s proved that the AVR is Turing complete, but he hasn’t run Linux on it: the AVR is running an ARM emulator.
At the end of the 90’s was a project trying to make Linux run on a 80286, never knew what happen with that.
But if anyone interesting there are another like that: The ELKS Project http://elks.sourceforge.net
Or something really weird Lunix: http://lng.sourceforge.net/
They were able to run a multitasking OS on a C64. And then try (or succeed) to make a Unix like OS.
What I don’t get is WHY does articles like this get so much press by the Linux community? Is it somehow amazing that if you spend long enough bashing at something you can make it run poorly on anything if you have the source? What’s next ‘Here is Linux running on a VCR remote!”. I mean I can understand why the guy did it for himself, he was bored and didn’t have anything better to do with his weekends, i get that, but why give him press for being bored, just because he used some Linux code in his boredom?
Its not like there aren’t plenty of really cool smaller projects that could actually be useful that couldn’t use the press, heck any quick skim through Freshmeat or Distrowatch will find you a dozen to write about easily. Why write about some guy making Linux take 4+ hours to boot on a toaster? Is that REALLY worth writing about?
The only things worth writing about are the things people enjoy reading about. I, for one, enjoyed reading about it. So, yes, it was worth it. it sounds like you’ve never doen anything technically interesting but ultimately pointless before . For those of us who have, its really cool to know we aren’t alone and there is always some one crazier than us.
Uzix is a single user Unix implementation for MSX (Z80) and yes, like Ubuntu/GNU/Linux it’s Free Software.
http://uzix.sourceforge.net/uzix1.0/index.php?lang=us
Wouldn’t it have been more realistic to base the project on Uzix. I mean 16 hours to bootstrap… Yawn!
If he cross-compiled the OpenMSX emulator, he could run Uzix out of the box:
http://openmsx.sourceforge.net/
Oh well, I hope the dude had some fun wasting his time 😉
Edited 2012-03-30 23:34 UTC
I suspect that adding a real MMU (with external memory) would be both easier and more efficient than emulation.
As an academic exercise, I congratulate him on the accomplishment. But honestly the project would have had more potential had it gone the route of adding an MMU to the AtMega and creating a bona-fide linux port. Obviously nobody is going to seriously run an ARM emulator on an AtMega there’s just no use case for that.
it doesn’t even accomplish much as an academic exercise. As the first poster points out, all he’s done is ‘prove’ that the processor in question is Turing-complete, which we already knew.
The slowest and simplest Turing-complete computer in the universe can emulate the fastest and most complex, given enough time. It’s a perfectly well-understood principle and has been for decades. Hence, well, the name.
It’d be nice if we could get a moratorium on all these ‘hey look I ran an emulator on some hilariously underpowered processor and three days later it booted Windows / Linux OMG OMG!’ stories…it’s getting kind of dull.
It should be noted that he didn’t just run an emulator on some hilariously underpowered processor, he wrote an emulator on some hilariously underpowered processor. That makes it impressive.
I would have been far more interested in an article called “Writing a complete ARM emulator for an 8bit CPU”, where he actually described writing the emulator, rather than a silly and sensationalist story about something else.
As it is the article just says “So I wrote an ARM emulator for the AVR” with very little actual detail.
True, it would be an interesting follow up article to hear about that process.
Its sort of like a story about the study of the extinct dodo bird in its native habitat that throws out a line like ” But the Dodo is extinct, so this would require time travel. So I built a time machine. After getting to the proper time…..”
I’d find both parts of that article interesting and impressive, but the time machine is something I would actually want to use.
Now we just need an ARM emulator for 6502! hehehe
I was hoping it would be a little more practical than that, but I guess the aforementioned issues of running a Linux system in a 8-bit environment really are insurmountable!
Edited 2012-04-01 02:13 UTC
Dr.Mabuse,
“I was hoping it would be a little more practical than that, but I guess the aforementioned issues of running a Linux system in a 8-bit environment really are insurmountable!”
Depends if you really mean linux as in the kernel, or gnu/linux as in the whole platform. I think it would be possible to create a gnu/linux-like OS for the atmega. We’d have gnu userspace apps/libs and could compile things like ssh, apache, etc for the microcontrollers.
Fork is going to be the main source of problems since it’s far less efficient without an MMU. I don’t like writing software that fundamentally requires an MMU anyways, but *nix standards don’t give us much choice in the matter when we want to spawn new processes. Consequently this forces many *nix programs to be dependent upon an MMU when they would otherwise not need to be.
This is directly responsible for the eyesore which is vfork.
http://en.wikipedia.org/wiki/Fork_%28operating_system%29#Vf…
http://en.wikipedia.org/wiki/Fork_%28operating_system%29#MM…
I meant Linux as a kernel, but now that I think about it some more, I think userspace apps/libs would be the more important/useful thing to have.
NB: I’ve only done a little programming with PICs (sumorobots with SDCC) and while I did get myself a kit for the AVRs, I never truely followed up on it.
Thanks for the info!
Edited 2012-04-01 09:21 UTC
I agree… instead of all the “I can run linux on x”, it would be much more interesting to create an OS for a 8-bit CPU that implements all necessary apis to be able to compile the GNU userland on it.
Like so many other people, I’m not really impressed. Or let’s put it like this: I’m impressed that he managed to create the electronics, I’m impressed that he wrote an emulator that is good enough to run a linux system on it… But I’m not at all impressed with the claim “I can run Linux on an 8-bit CPU”.
Edited 2012-04-01 10:17 UTC
I wonder if you could make a version of Sweet-16 or in this case Sweet-32 to do the job?
To those who don’t know Sweet-16 were a set of macros for the 6502 and 6800 to directly emulate a 16 bit CPU on a 8bit CPU.
Thus something like
ADD16 A,B would be expanded to 5 ML instructions for the 8bit CPU.
Please note http://en.wikipedia.org/wiki/SWEET16 is not the interpreter I am thinking of. It was another one published in the magazine ‘6502 Micro’.
I think this is pretty neat personally – yes it’s true it isn’t very productive, but then again that’s why computing is such an interesting field, because people can do things just for the hell of it. Not understanding all the negativity myself, this is a cool project by a clearly talented individual.
With my own sega master system emulator nearing completion (and equally non-productive), I think it’s great that people are still playing around with 8-bit microcontrollers 😀