Live data from Hacker News

Linux on an 8-bit micro

dmitry.gr

11–20 of 80 posts

Re: Linux on an 8-bit micro

#11
post #6

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 technically it's Linux running on a 32-bit "macro", just one which happens to be implemented in some seriously inefficient manner. There are some real ports of Linux for "limited" architectures, like uClinux (supporting few 32-bit micros, including some MMU-less ones)…

You're saying you can't compile Linux to an 8-bit micro, yet you can emulate a much larger CPU on the same chip and run linux on that? Are you sure?

Re: Linux on an 8-bit micro

#13
post #6

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 technically it's Linux running on a 32-bit "macro", just one which happens to be implemented in some seriously inefficient manner. There are some real ports of Linux for "limited" architectures, like uClinux (supporting few 32-bit micros, including some MMU-less ones)…

So you're saying you can't compile Linux to an 8-bit CPU, but you can run an emulator of a much larger chip on that CPU and run linux on that? Are you sure?

Re: Linux on an 8-bit micro

#15
post #6

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 technically it's Linux running on a 32-bit "macro", just one which happens to be implemented in some seriously inefficient manner. There are some real ports of Linux for "limited" architectures, like uClinux (supporting few 32-bit micros, including some MMU-less ones)…

> which BTW proves again that Linux doesn't fit onto 8-bit micros.

How in the world does it "prove" that, when not only does it "fit", it fits in addition to an emulator? I don't see that it only runs _under_ an emulator proves any such thing.

While this is obviously a "hah, you think it's impossible? I'll show you," type achievement, and running Linux on an 8-bit is never going to be more than a curiosity, it's a neat proof of concept and could trivially be made much faster (through a hybrid approach: a lot of the Linux code could likely be ported quite easily, and a lot of it could probably also be jit'ed relatively easily (especially kernel-land - a special purpose jit whose only purpose is to jit the kernel would be vastly easier than a general purpose jit, not least because you can take a boatload of shortcuts (e.g. manual translation) in cases where a simple/trivial jit doesn't do well.

I think it's a fascinating solution - people have talked about doing ports to limited systems without MMU's etc. before, and it has usually meant severe tradeoffs that means lots of userland won't work (e.g. vfork instead of fork). This is a d'oh moment in that the "solution" if your goal is only to get a port running (rather than for it to be practically usable) has stared us in the face "forever" (there's been virtualization solutions using emulated CPU's since before Linux was around).

Re: Linux on an 8-bit micro

#16
post #8

That's impressive! I remember when "getting linux working on a laptop" was thought to be tricky.[1] ELKS was a linux distribution for old small machines. It was supposed to run on an 8086, and use just 512 KB (not MB) for ram. ( http://web.archive.org/web/19990117003949/http://www.uk.linu... ) ( http://en.wikipedia.org/wiki/Embeddable_Linux_Kernel_Subset ) Wow, still sort of live. ( http://elks.sourceforge.net/ ) [1]…

The intro paragraph of that 2003 FAQ looks eerily like a comparison of smartphones/tablets to laptops might look today!

Re: Linux on an 8-bit micro

#17
post #15
post #6

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 technically it's Linux running on a 32-bit "macro", just one which happens to be implemented in some seriously inefficient manner. There are some real ports of Linux for "limited" architectures, like uClinux (supporting few 32-bit micros, including some MMU-less ones)…

> which BTW proves again that Linux doesn't fit onto 8-bit micros. How in the world does it "prove" that, when not only does it "fit", it fits in addition to an emulator? I don't see that it only runs _under_ an emulator proves any such thing. While this is obviously a "hah, you think it's impossible? I'll show you," type achievement, and running Linux on an 8-bit is never going to be more than a curiosity, it's a ne…

I meant the external DRAM thing - this chip would never be able to run Ubuntu without external RAM and bit-banging DRAM in software is more akin to "crawling" than "running" to be honest.

But yes, in a sense, you can run Linux on 8-bit micro or even a sufficiently long Lego brick Turing Machine.

Re: Linux on an 8-bit micro

#19
Awesomely cool project, but I was somewhat dismayed by the choice of GNOME, as GNOME is quite bloated and a smaller window manager, instead of a DE, seems to make more sense while not detracting from usability.

Re: Linux on an 8-bit micro

#20
post #8

That's impressive! I remember when "getting linux working on a laptop" was thought to be tricky.[1] ELKS was a linux distribution for old small machines. It was supposed to run on an 8086, and use just 512 KB (not MB) for ram. ( http://web.archive.org/web/19990117003949/http://www.uk.linu... ) ( http://en.wikipedia.org/wiki/Embeddable_Linux_Kernel_Subset ) Wow, still sort of live. ( http://elks.sourceforge.net/ ) [1]…

Well, getting Linux working on a laptop was more a case of exciting driver wrangling, rather than performance limiting.
Post reply on HN