Boot Mainline Linux On Apple A7, A8 And A8X Devices

iPhone 6 with Linux boot log on its screen

[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.

We thank [Matthew Carlson] for sharing this with us!

10 thoughts on “Boot Mainline Linux On Apple A7, A8 And A8X Devices

    1. 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.

      1. 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.

  1. 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

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.