I have a couple of old Game Boy Advance SP systems around somewhere, and I was wondering if it's possible to get an old version of Linux running on one. I'm just doing it for fun, and thought that it might be cool to do if it is possible.
-
2The obvious follow-up question is if you can run CP/M on the Z80 of the GBA, or rather, if anyone has actually done this ...– dirktJul 27, 2016 at 15:06
-
I'd see if someone has ported NetBSD to the device. Even if it hasn't, NetBSD on a Raspberry Pi running the GBA emulator would be very doable. (Even though this isn't specifically what you wanted.)– user12Jul 27, 2016 at 17:20
-
Related: almost posted this as an answer before realizing it was an April Fools joke: nothink.org/misc/OpenBSD-gameboy.html– JALAug 1, 2016 at 16:52
3 Answers
Not Linux, but I know you can run UNIX 5 with a tool called gbaunix. You can read about the process in Amit Singh's paper on kernelthread and you can browse through the source on my unofficial fork on GitHub.
You will need a a copy of the RK05 disk image to use gbaunix. If you don't want to recompile the binary, you can cat
the disk image with the precompiled binary provided in the paper.
$ cat unixv5.tmp disks/unixv5.dsk > unixv5.gba
Linux itself will not run on the GBA SP. The reason for this is that the CPUs (one ARM7TDMI and one Z80) do not have a way to protect and manage memory. The component to do that is the MMU, which needs to be present on all computers that can run Linux.
But a variant called µCLinux (short for microcontroller Linux) has some things stripped out and could theoretically run on the Game Boy Advance SP. But I do not know if 288 KB is enough memory for this ...
-
2
-
2Do any of those microcontrollers run uCLinux and do something useful? Jul 27, 2016 at 16:55
-
One or the other, but rarely both. Most run a compiled BASIC variant, and those that run -n*x kernals have much less memory available. Unless they're doing trivial tasks where cutting developer hours is worth it, code is custom-built. Apparently, ~4Mb is required though, so that information isn't too useful.– wizzwizz4 ♦Jul 27, 2016 at 17:08
-
-
1You can certainly run Linux on a system without an MMU. There's a reason why DSLinux is a thing, despite the fact that its ARM9 also lacks an MMU. So right now, both your first and second paragraphs contradict each other.– forestSep 15, 2018 at 2:15
Thanks to this Slashdot article, I also found a guide from 2004 with instructions on how to port Microcontroller Linux (uClinux) to the GBA. The main site is long dead, but I found a mirror via the WayBack Machine.
The uClinux cvs repo is long dead, but if you can find the September 9th, 2003 snapshot (uClinux-dist-20030909.tar.gz
), you should be able to apply the uclgba patch:
$ tar xzf uClinux-dist-20030909.tar.gz
$ cd uClinux-dist
$ patch -p1 < uclgba_2004-03-14.patch