Linked by Thom Holwerda on Fri 30th Mar 2012 22:13 UTC, submitted by kragil
Linux "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."
Order by: Score:
Back up
by Vanders on Fri 30th Mar 2012 22:57 UTC
Vanders
Member since:
2005-07-06

All that's left is that pesky 32-bit CPU & MMU requirement. Well the AVR has no MMU and is 8-bit. To conquer this obstacle, I wrote an ARM emulator.

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.

Reply Score: 8

Linux in a 286
by KrustyVader on Fri 30th Mar 2012 23:28 UTC
KrustyVader
Member since:
2006-10-28

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.

Reply Score: 2

RE: Linux in a 286
by bassbeast on Sun 1st Apr 2012 16:40 UTC in reply to "Linux in a 286"
bassbeast Member since:
2007-11-11

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?

Reply Score: 2

RE[2]: Linux in a 286
by Bill Shooter of Bul on Sun 1st Apr 2012 22:06 UTC in reply to "RE: Linux in a 286"
Bill Shooter of Bul Member since:
2006-07-14

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.

Reply Score: 5

http://openmsx.sourceforge.net/UZIX
by ml2mst on Fri 30th Mar 2012 23:33 UTC
ml2mst
Member since:
2005-08-27

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

Reply Score: 4

AtMega MMU
by Alfman on Sat 31st Mar 2012 00:59 UTC
Alfman
Member since:
2011-01-28

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.

Reply Score: 3

RE: AtMega MMU
by AdamW on Sun 1st Apr 2012 07:19 UTC in reply to "AtMega MMU"
AdamW Member since:
2005-07-06

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.

Reply Score: 4

RE[2]: AtMega MMU
by Bill Shooter of Bul on Sun 1st Apr 2012 22:16 UTC in reply to "RE: AtMega MMU"
Bill Shooter of Bul Member since:
2006-07-14

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.

Reply Score: 3

RE[3]: AtMega MMU
by Vanders on Mon 2nd Apr 2012 14:05 UTC in reply to "RE[2]: AtMega MMU"
Vanders Member since:
2005-07-06

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.

Reply Score: 2

RE[4]: AtMega MMU
by Bill Shooter of Bul on Mon 2nd Apr 2012 15:36 UTC in reply to "RE[3]: AtMega MMU"
Bill Shooter of Bul Member since:
2006-07-14

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.

Reply Score: 2

I love these kinds of articles
by jrash on Sat 31st Mar 2012 13:37 UTC
jrash
Member since:
2008-10-28

Now we just need an ARM emulator for 6502! hehehe

Reply Score: 4

No practical use?
by Dr.Mabuse on Sun 1st Apr 2012 02:13 UTC
Dr.Mabuse
Member since:
2009-05-19

How fast is it?

uARM is certainly no speed demon. It takes about 2 hours to boot to bash prompt


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

Reply Score: 2

RE: No practical use?
by Alfman on Sun 1st Apr 2012 05:13 UTC in reply to "No practical use?"
Alfman Member since:
2011-01-28

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

Reply Score: 2

RE[2]: No practical use?
by Dr.Mabuse on Sun 1st Apr 2012 09:20 UTC in reply to "RE: No practical use?"
Dr.Mabuse Member since:
2009-05-19

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.


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

Reply Score: 2

RE[2]: No practical use?
by snowbender on Sun 1st Apr 2012 10:16 UTC in reply to "RE: No practical use?"
snowbender Member since:
2006-05-04

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

Reply Score: 3

Sweet-16
by Earl C Pottinger on Sun 1st Apr 2012 15:37 UTC
Earl C Pottinger
Member since:
2008-07-12

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

Reply Score: 2

Pretty neat
by PhilPotter on Mon 2nd Apr 2012 09:57 UTC
PhilPotter
Member since:
2011-06-10

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 :-D

Reply Score: 2