Linux kernel ported to the Nintendo 64
Summary
On Christmas Day 2020, Lauri Kasanen, who had previously worked on Mesa and the Linux graphics stack, announced a new port of the Linux kernel to the Nintendo 64. It was not the first Linux attempt on the console, but the first aimed at being accepted into the official kernel. Kasanen gave porting emulators and games as the purpose, but above all: because it is possible.
Why it is a challenge
The Nintendo 64 came onto the market in 1996. Its processor is a MIPS-based NEC VR4300 running at 93.75 MHz, and the RAM amounts to 4 MB, 8 MB with the Expansion Pak. A modern Linux kernel has to be shrunk considerably for it, and there is no hard disk, no keyboard and no network in the usual sense.
Kasanen therefore wrote not only platform support but also drivers for graphics, sound and the cartridge drive. Linux does not run there as a convenient everyday system but as a basis for custom programs that can rely on familiar interfaces.
Why such projects add value
Ports to exotic hardware look like a gimmick, but they show how adaptable the kernel is. They uncover assumptions in the code, for example about minimum memory, and keep knowledge of older architectures alive. They are also an entry point into kernel work for many developers. Nintendo 64 support was accepted into the official kernel in 2021 with Linux 5.12.
Ideas
- A modern kernel can be shrunk to hardware with a few megabytes of RAM.
- Custom drivers for graphics, sound and cartridges turn a console into a Linux platform.
- Acceptance into the official kernel ensures that a port is maintained.
Insights
- Fun projects uncover hidden assumptions in large code bases.
- A port into the official kernel is more work than a one-off hack, but it lives longer.
Facts
- The Nintendo 64 uses a NEC VR4300 running at 93.75 MHz.
- The console has 4 MB of RAM, 8 MB with the Expansion Pak.
- The port was announced on 25 December 2020.
References
Remarks
- In the same period, Sony released an official Linux driver for the PlayStation 5's DualSense controller.
Recommendations
- Use projects on old or exotic hardware as an entry point to understanding the kernel and drivers.
- For your own kernel changes, follow the rules for later acceptance into the main branch from the start.
Found a mistake or have something to add? Get in touch.
Links to the original source and the Web Archive open in a new tab.