Programmer and hardware enthusiast Dmitry Grinberg shared a video in which he boots up and runs commands on a PC powered by a Intel 4004 running Linux. The video demonstrates the excruciating time it takes to do anything or execute the simplest commands. The startup took 4.76 daysfor example, and a simple directory listing did not appear on the screen until 16 hours after entering the ‘ls’ command.
Grinberg booted the machine using the Linux prompt. Fortunately, through the magic of video editing, much of the waiting between commands is sped up. An unedited version of the video exists, running at 120x real time, but it takes over an hour and 40 minutes to watch the whole thing.
Read also
It looks like a lamp but it’s a PC with an RTX 4070 Ti and 32 GB of RAM
Ultimate Elegance: Fractal Design Announces Era 2 Case
The video begins by pointing out that the world’s first commercial microprocessor, the Intel 4004 (released in 1971), predates the first release of Linux by 20 years. This huge gap in time, coupled with the chip’s slowness and lack of modern features, means that Linux never supported it. So Grinberg needed a bit of digital manipulation to achieve his feat.
For full details of the project and setup, Grinberg wrote a detailed blog post titled: “Slow Booting Full Linux on Intel 4004 for Fun, Art and Absolutely No Profit“. In essence, to bridge the hardware/software divide, the enthusiast emulated the MIPS R3000 processor, which has the necessary C compiler support.
Even with these emulation shenanigans, a lot of background work had to be done, and a large portion of the preliminary work for this slow-computing achievement was spent on speed optimizations. Grinberg managed to reduce the size of the Linux kernel to about 2.5MB by removing support for unnecessary features. In doing so, he reduced the boot time from about 8.4 days at the beginning of the optimization process to 4.76 days.
Turning our attention to the embedded video, we see it progress from its introductory message to a ‘loading kernel’ step and then to ‘booting OS’. Eventually, we see the message “Welcome to uMIPS: Feel free to look around slowly” and a prompt flashing on the screen. According to the programmer, we didn’t get to this point until almost five days after the call.
To begin working on the Linux demo, Grinberg typed the directory listing command. It took the system about 16 hours to list the five or six files in the directory. It took a similar amount of time to type and execute a command to display the Linux kernel version (Linux uMIPS 4.4…).
Grinberg continued to run commands to display the CPU version, reported to be an R3000 v.2 due to the ongoing emulation process as mentioned above. To create some ‘fancy graphics’, he ran a Mandelbrot generator in ASCII.
The video ends with the system being questioned about its uptime. This command took about 14 hours to run and display its results on the screen – meaning the system’s reported uptime of 22:47:02 was questionable.
Grinberg admits that his Linux/4004 project is primarily artistic, but it also demonstrates the flexibility of Linux. He designed the 4004’s custom circuit board, with its flashing VFDs and built-in display, for wall mounting and display.
Source: https://www.hardware.com.br/noticias/linux-no-intel-4004.html