[Konrad Dybcio] tells about his journey booting Linux on A7/8/8X processors, playing around with an old iPhone 5 he’s got in a drawer. It’s been a two-year “revisit every now and then” journey, motivationally fueled by the things like Linux on M1 Macs announcement. In the end, what we have here is a way to boot mainline Linux on a few less-than-modern but still very usable iPhones, and a fun story about getting there.
[Konrad]’s work is based on the Sandcastle project research, but he couldn’t quite figure out how to make their code work, and had to make sense of it as he went. At some point, he got stuck on enabling the MMU, which was the main roadblock for a while. Joined by another developer intrigued by Apple hardware, they were hacking away at it, developing tools and neat tricks on their way, but to no avail. With the framebuffer accessible and no other decent debugging methods in sight, he tells about a code snippet they wrote that printed register values as valid barcodes
Then, looking deeper into the known-working code, he realized that there was a single line difference in how they loaded the Linux image. Fixing that, they got the MMU to enable! From here, the Linux hacking part ensued, and still continues, with other people pulling their old iDevices out of their respective drawers and joining in on the fun. Integration work is ongoing, with basic peripherals being brought up. Some of the peripherals, we might not see working anytime soon, but from here, it should be way easier to develop drivers and conquer these devices one-by-one.
This development should work for iPhone 5S, 6 and 6 Plus, iPod touch 6th gen, as well as iPad Air 1/2 and iPad Mini 2/3/4. Would you like to boot Linux on one of these devices in your possession? [Konrad] shares instructions on how to get your device from zero to a Linux bootlog on the screen; assistance is available but Linux experience is desired! If you do decide to play around with your own old iDevice, you should spend a minute or two helping him along the way – he is collecting ADT files from different iDevices, and instructions for providing one are super simple!
We haven’t seen Linux on an iPhone in a while – most such hacks come from 2008 or so, dying down a bit afterwards with only a few cool things like PostmarketOS on the iPhone 7 appearing here and there. However, we hope that this brings our smartphones a bit closer to our personal computers when it comes to usefulness.
Took us >1 year (way too long) but, @quaack723 and I got it working after I realized we were missing a oneliner 😎
A7-A8X.
Writeup son.#Linux #AsahiLinux #checkm8 pic.twitter.com/H5A9ZA8xyf
— Konrad Dybcio ✝️ (@konradybcio) June 1, 2022
We thank [Matthew Carlson] for sharing this with us!
Android or LineageOS port on the way?
I’m perhaps not well-versed when it comes to the benefits, yet
With how promising and abundant mobile Linux OSes are nowadays, what would be the point? You can already get a wide variety of Android phones as-is.
Having mainline Linux running could allow for a PostmarketOS port.
That could be neat and give a starting point for making it more of a phone.
Personal opinion? Apple hardware is usually pretty good, but iOS in my opinion, is not. This *could* (not likely) open up the door to more quality hardware to use? Just thinking aloud.
that’s my hope, too!
Way back in the iphone 3g days there was a way to dual boot it into Android. Barely anything worked, but it was a great party trick.
why not haiku? ;-)
ok, i need mainline linux on device TODAY i can buy in shop
feels a bit like goalpost shifting ;-P
Depending on how useful this is, something more than command line would be a great thing for the tech that Apple consider fit for the bin but is totally capable still if your remove Apples Bork mode
I did something like that a few years ago on Canon EOS DSLRs
This was posted on april 1st as Magic Lantern’s tradition.
https://www.youtube.com/watch?v=IcBEG-g5cJg
and later then revealed that this was no april’s fool:
https://www.magiclantern.fm/forum/index.php?topic=14847
However there was still the issue with not having a MMU, leaving all that in the “interesting”-niche only.