Re:Linux on an 8-bit micro? (2012)
by derefr on Tuesday September 20, 2016 @04:25AM
(#12537984)
I think the argument is that one would expect "Linux running on architecture Foo" to imply support in Linux for Foo, rather than support in Foo for Linux that allows Linux to run unmodified. I certainly expected, when I clicked, to read about someone's effort to rewrite a minimal subset of the Linux kernel to use exclusively 8-bit registers and no MMU.
[ Parent
| on HN ]
Linux can already run on MMU-less systems (CONFIG_NOMMU). GCC already supports AVRs, though you may have to tweak the backend a bit so ints are 32-bit wide etc.
These are not the big issues in porting the Linux kernel to an AVR. The major problem is that AVR is Harvard architecture and there's probably tons of assumptions in the kernel that code and data resides in the same memory space.
- also ATmega1284P and ATmega644A mentioned in the article doesn't support external code memory nor changing the code memory after boot. However they do support a boot loader that can load code initially. So you would have to implement some sort of paging by resetting the cpu to give control to the bootloader to load the new code. Sound like fun. Also the kernel itself is far too large to fit in code memory, so it would constantly have to page parts in and out through this mechanism.