Connect with us

Tech

Linux boots in 4.76 days on the Intel 4004

Published

on

Linux boots in 4.76 days on the Intel 4004

Enlarge / A photo of Dmitry Grinberg’s custom Linux/4004 circuit board.

Hardware hacker Dmitry Grinberg recently achieved what might sound impossible: booting Linux on the Intel 4004, the world’s first commercial microprocessor. With just 2,300 transistors and an original clock speed of 740 kHz, the 1971 CPU is incredibly primitive by modern standards. And it’s slow—it takes about 4.76 days for the Linux kernel to boot.

Initially designed for a Japanese calculator called the Busicom 141-PF, the 4-bit 4004 found limited use in commercial products of the 1970s before being superseded by more powerful Intel chips, such as the 8008 and 8080 that powered early personal computers—and then the 8086 and 8088 that launched the IBM PC era.

If you’re skeptical that this feat is possible with a raw 4004, you’re right: The 4004 itself is far too limited to run Linux directly. Instead, Grinberg created a solution that is equally impressive: an emulator that runs on the 4004 and emulates a MIPS R3000 processor—the architecture used in the DECstation 2100 workstation that Linux was originally ported to. This emulator, along with minimal hardware emulation, allows a stripped-down Debian Linux to boot to a command prompt.

Linux/4004.

Grinberg is no stranger to feats of running Linux in unlikely places. As he explains on his website, “In 2012, I ran real Linux on an 8-bit microcontroller (AVR), setting a new world record for lowest-end-machine to ever run Linux.” After others improved on that record in recent years, he decided to surpass himself and others by targeting the very first microprocessor.

The long, slow boot

To make Linux on the 4004 work, Grinberg had to overcome numerous challenges. The 4004 has extremely limited ROM and RAM, no interrupts, and lacks even basic logical operations like AND and OR. Grinberg’s emulator makes clever use of lookup tables and other tricks to squeeze maximum performance out of the primitive CPU.

The final hardware uses the 4004 (overclocked to 790 kHz) along with several other period-correct support chips from Intel’s MCS-4 chipset. It includes a VFD display to show Linux output and can accept input over a serial connection. The whole setup draws about 6 W of power.

To pull it all together, Grinberg designed a custom circuit board with no vias (paths from one side of the circuit board to the other) and only right-angle traces for a retro aesthetic. It’s meant to be wall-mountable as an art piece, slowly executing Linux commands over the course of days or weeks.

While it has no practical purpose, the Linux/4004 project demonstrates the flexibility of Linux and pushes emulation to its limits. Grinberg is considering the possibility of offering kits or fully assembled boards for others who want to experience Linux at its slowest, though this is not yet definite.

The full details of the project, including schematics and source code, are available on Grinberg’s website. For those interested in vintage computing or extreme Linux implementations, it’s a fascinating look at what’s possible with 1970s technology and a lot of clever engineering.

Continue Reading