Is it possible to run Unix on Arduino?

I wonder if it is possible to run a Unix-based or Unix-like operating system (e.g FreeBSD or Linux) on an Arduino. I know Arduino has 32KB of flash memory and 2KB of SRAM.

I can use serial communication to see the output and send commands. Then a simple sketch will read the input and send it to the kernel.

I don't know if removing features from the source code helps a lot.

Is it possible?

I have seen an AVR emulating an ARM, but the Linux port was something like power-on to first prompt in only a couple of hours.

It's slooooooooooow

I don't care about being slow. I just want to run FreeBSD or Linux on an Arduino.

No. It is not possible in the "context" of usable OS.

The uC has no memory controller to map external RAM; thus some kludge would be needed from external circuitry.

Tiny Core is one of the smallest Linux distributions. It is a minimal Linux Kernel-based operating system focusing on offering a base system using BusyBox and FLTK. Console mode requires only 11MB, while GUI mode requires merely 16MB of space. If you have 64MB RAM, Tiny Core Linux functions effortlessly without GUI.

Google it - it's a lot of work, for very little return, apart from Hackaday bragging rights

TinyCore is a good distro. Does removing features help?

Here's one.

(You could have found it)

... which IMO is highly overrated.

1 Like



It will be useful for fast debugging and more

Whatever it's for, it won't be "fast"

Will Arduino Due run Linux?

I mean faster than Serial.println() statements everywhere

Unless you port the ARM emulator.

The first Arduino board based on an ARM processor. Features 2 channel 12-bit DAC, 84 MHz clock frequency, 32-bit architecture, 512 KB flash and 96 KB SRAM. Unlike most Arduino boards, it operates on 3.3 V and is not 5 V tolerant.

That what wikipedia says

..but lacks an MMU.

That's right. So it isn't possible :frowning:

... but the Op stated UNO-level resources. As one works up the uC resources, theOp's question takes on a different context. In your reference, the context is:

Atmega1284p microcontroller running at 24MHz and added external DRAM module from old computer. Also he attached SD card to SPI interface and so he solved memory problem.

You and I together probably could not squeeze stuff into 2K of SRAM as mapping resources would be in contention with SD buffers and SPI for external RAM. It is even painful to get RTOS into a 2K of SRAM and still be able to generate a serial console prompt.

What if I developed an optimized Unix-like OS for Arduino