Summary of BECAUSE YOU CAN: LINUX ON AN ARDUINO UNO
The article discusses an impressive project by [gvl610] where a full Linux kernel boots on an Arduino Uno, despite the board's limited ATmega328 microcontroller. Achieved via a RISC-V emulator written in pure AVR C, this setup is extremely slow, taking hours to reach a shell. Since the Arduino's 32k memory is insufficient, storage relies on an SD card. This project outperforms the earlier 2012 "Worst PC Ever" which emulated ARM instead of RISC-V, showcasing creativity in overcoming hardware limitations.
Parts used in the Linux on Arduino Uno project:
- Arduino Uno (ATmega328 microcontroller)
- SD card for storage
There are a few “Will it run” tropes when it comes to microcontrollers, one for example is “Will it run Doom?“, while another is “Will it run Linux?”. In one of the lowest spec examples of the last one, [gvl610] has got an up-to-date Linux kernel to boot on a vanilla Arduino Uno. And your eyes didn’t deceive you, that’s a full-fat kernel rather than the cut-down μClinux for microcontrollers.
Those of you who’ve been around a while will probably have guessed how this was done, as the ATmega328 in the Uno has no MMU and is in to way powerful enough for the job. It’s running an emulator, in this case just enough RISC-V to be capable, and as you’d imagine it’s extremely slow. You’ll be waiting many hours for a shell with this machine.
The code is written in pure AVR C, and full instructions for compilation are provided. Storage comes from an SD card, as the ATmega’s meagre 32k is nowhere near enough. If you’re having a bit of deja vu here we wouldn’t blame you, but this one is reputed to be worse than the famous 2012 “Worst PC Ever“, which emulated ARM instead of RISC-V.
Source: BECAUSE YOU CAN: LINUX ON AN ARDUINO UNO