12

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.

  • 2
    The 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 ... – dirkt Jul 27 '16 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.) – user12 Jul 27 '16 at 17:20
  • Related: almost posted this as an answer before realizing it was an April Fools joke: nothink.org/misc/OpenBSD-gameboy.html – JAL Aug 1 '16 at 16:52
13

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
10

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 uCLinux (short for microcontroller Linux) has some things stripped out and could theoretically run on the Gameboy Advance SP. But I do not know if 288 KB is enough memory for this ...

  • 2
    Microcontrollers usually have a lot less. – wizzwizz4 Jul 27 '16 at 16:48
  • 1
    Do any of those microcontrollers run uCLinux and do something useful? – Wilson Jul 27 '16 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 '16 at 17:08
  • I found an attempt to port uClinux to GBA from 2004, see my new answer. – JAL Nov 3 '16 at 16:19
  • You 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. – forest Sep 15 '18 at 2:15
4

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.