Boot Mainline Linux on Apple A7, A8 and A8X devices


[Konrad Dybcio] recounts his journey booting Linux on A7/8/8X processors, playing with an old iPhone 5 he has in a drawer. It’s been a two-year “revisit from time to time” journey, motivatingly fueled by things like the announcement of Linux on the M1 Macs. Ultimately, 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 how to get there.

[Konrad]The work of is based on research from the Sandcastle Project, but he couldn’t figure out how to make their code work, and had to make sense of it as he went. At one point, he got stuck on activating the MMU, which was the main stumbling block for a while. Joined by another developer intrigued by Apple hardware, they hacked it, developing some cool tools and tricks along the way, but to no avail. With the framebuffer accessible and no other decent debugging method in sight, he talks about a code snippet they wrote that prints register values ​​as valid barcodes

Then, looking deeper into the code that was working, he realized there was a one-line difference in how they loaded the Linux image. Fixing this, they enabled the MMU! From there, the Linux hacking party ensued, and still continues, with other people pulling their old iDevices out of their respective drawers and participate in the fun. Integration work is underway, with basic peripherals being put in place. Some of the devices we might not work soon, but from there it should be much easier to develop pilots and conquer these devices one by one.

This development should work for iPhone 5S, 6 and 6 Plus, iPod touch 6th generation, 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 take your device from scratch to an on-screen Linux boot log; help is available but Linux experience is desired! If you decide to play with your own old iDevice, you should spend a minute or two helping it along the way – it collects ADT files from different iDevices, and the instructions for providing one are very simple!

We haven’t seen Linux on an iPhone in a while – most of these hacks are from around 2008, dying out a little later with only a few cool stuff like PostmarketOS on the iPhone 7 popping up here and there. However, we hope it will bring our smartphones a little closer to our personal computers in terms of usefulness.

We thank [Matthew Carlson] to share this with us!


Comments are closed.