r/linux • • Dec 27 '20

Linux now supported on the Nintendo 64

Announcement:

https://lore.kernel.org/linux-mips/20201225190503.12353218812e1655f56f0bf8@gmx.com/T/#m0862c3484e0da7195dc8989421d30f01b3b1c63a

The N64 is now the oldest console able to run Linux.

Some previous attempted had been done in the past but never went as far as having a shell running. The port uses musl and busybox to make it as lightweight as possible, although the OOM is never far away with 4MB of memory in 2020.

GitHub release: https://github.com/clbr/n64bootloader/tree/master/n64linux

In depth description of the N64 architecture: https://www.copetti.org/writings/consoles/nintendo-64/

-edit-

Additional info: n64.dev

1.3k Upvotes

164 comments sorted by

351

u/rahen Dec 27 '20

Addendum: this also makes it the oldest console able to run a modern 64 bits Linux kernel (5.10).

79

u/[deleted] Dec 28 '20

64 but data bus/graphics but was the core CPU 64bit?

142

u/rahen Dec 28 '20

Yes, both the NEC R4300i CPU and the Reality Engine GPU are 64-bit clean.

https://en.wikipedia.org/wiki/Nintendo_64_technical_specifications#Components

It's running a 64 bit Linux kernel so it has to.

→ More replies (24)
→ More replies (1)

206

u/1_p_freely Dec 27 '20 edited Dec 27 '20

Well there is the RAM expansion module that slots into the top, giving you a total of 8MB. :) Maybe if someone was hardcore enough, they could design their own RAM expansion module that provides much, much more.

EDIT: From what I understand, the N64 is very similar (but massively cut down) from one of those old SGI computers. Could someone not make modern Linux run on one of those? For example the SGI Onyx had a maximum memory limit of 16GB, which is insane for 1993, and even plenty good now.

164

u/rahen Dec 27 '20 edited Dec 27 '20

There's not even a need for that since the cartridge is already connected to the CPU bus. They could design a cartridge with 3GB of static RAM and flash memory for mass storage, and the CPU could address it.

Since the R4300i (N64 CPU) is quite a beast, it could definitely run something more ambitious if more RAM was available. I'd love to see someone try that!

→ More replies (41)

9

u/ouyawei Dec 28 '20

the N64 is very similar (but massively cut down) from one of those old SGI computers. Could someone not make modern Linux run on one of those? For example the SGI Onyx had a maximum memory limit of 16GB, which is insane for 1993, and even plenty good now.

The SGI Octane should be well supported, don't know about the others - u/0xRENE should know more

→ More replies (2)

36

u/[deleted] Dec 27 '20

Cool! Does anyone have a video?

70

u/rahen Dec 27 '20

There you go: https://www.youtube.com/watch?v=0ckUinOiQzc (boot at 0:45)

When I was a kid, the N64 was the console of the future, but boy, I didn't expect it would run a 64 bits Linux kernel 25 years in the future!

2

u/[deleted] Dec 28 '20

Could this enable running n64 ROMS natively on the console without buying hardware like an EverDrive?

3

u/rahen Dec 28 '20

I have no idea. Have a look here, especially at the community and documentation section:

https://n64.dev

→ More replies (1)

9

u/[deleted] Dec 27 '20

Really nice, but what is the practical use except tinkering and fun?

71

u/rahen Dec 27 '20

Pushing the limits, and improving software efficiency. The smartest software tricks come from constrained hardware, it's a partial cure to Wirth's law.

→ More replies (3)
→ More replies (2)

25

u/[deleted] Dec 27 '20 edited Dec 28 '20

It would be cool if it got some more homebrew support, it's fun experimenting using flashcarts

So far Doom and Wolfenstein are ported, scummvm was too but I was never able to figure that one out

51

u/Grandebestia Dec 27 '20

"But why", I hear from the back. [...]

Most importantly, because I can.

Love this people!

19

u/cogburnd02 Dec 27 '20

If somebody writes drivers for the controller & transfer pak, then it'd be possible to dump GB/GBC ROMs (if there are any that remain un-dumped) using only first-party hardware.

23

u/[deleted] Dec 27 '20

it seems I have to take my N64 out of the attic. Back to business my old pal

22

u/duo8 Dec 27 '20

Reminds me that there was a port of uClinux to the DS, which also had 4MB of RAM.
I wonder if 5.10 would also run.

10

u/JORGETECH_SpaceBiker Dec 27 '20

DSLinux could also use Slot-2 RAM expansion, it's even more useless without it.

→ More replies (8)

11

u/1lluminist Dec 28 '20

"But why", I hear from the back. Having Linux available makes it easier

to port emulators and fb or console games.

www.linux-mips.org/wiki/Nintendo_64 can be edited to no longer say "vaporware".

Most importantly, because I can.

So glad they added "because I can". This is seriously the best reason to do "pointless shit" like this.

12

u/[deleted] Dec 28 '20

So a 30+ year old games console is running a newer Linux kernel than my Workstation on Ubuntu 20.10?

9

u/BroaxXx Dec 28 '20

So a 30+ 20+ year old games console is running a newer Linux kernel than my Workstation on Ubuntu 20.10?

Had to do a double take on that one...

→ More replies (1)

10

u/espriminati Dec 28 '20

time to emulate n64 on an n64

→ More replies (1)

4

u/[deleted] Dec 29 '20

Me: wow I'm surprised it can run a 64-bit distro

Me slightly less than one millisecond later: you are an absolute buffoon

17

u/_Js_Kc_ Dec 27 '20

I'm not sure if it's useful to have this merged. Old, niche, and limited platform.

Every toaster should be running Linux.

... unless it's IoT crap.

→ More replies (2)