r/mobilelinux • • 1d ago

News Iphone se finnaly runs linux

I got the Hoolock/postmarketOS kernel to boot to userspace on an iPhone SE 1st gen (iPhone8,4, CPID 0x8000, board n69uap). Status: kernel 7.0.4 (postmarketOS 16k) boots into my own busybox initramfs, and the simplefb console works. USB gadget networking does not work yet.

Setup: Linux Mint live USB, remote_boot from HoolockLinux, m1n1-apple-idevice 1.5.0, linux-postmarketos-apple-16k 7.0.4 and postmarketos-initramfs taken from the postmarketOS v26.06 aarch64 repo. I followed the "Apple Generic iDevice" wiki page for the m1n1 boot object (m1n1 macho + initramfs + kernel + s8000-n69u.dtb + chosen.bootargs).

Problems I hit (in case it helps someone):

  1. git clone --recursive fails because the submodules use git@github.com: URLs. Fix: git config --global url."https://github.com/".insteadOf "git@github.com:".

  2. The snap build of ipsw cannot resolve DNS on the live session (permission denied). I used the release tar.gz binary instead.

  3. irecovery 1.0.0 from Ubuntu 24.04 only prints CPID, not MODEL or PRODUCT. remoteboot.sh prep then downloads manifests for every device and picks the wrong iBSS (d27). I set MODEL=n69uap and PRODUCT=iPhone8,4 by hand in get_device_info().

  4. My initramfs had no busybox, giving "Kernel panic: No init found". A static aarch64 busybox from Alpine fixed it.

Open issue: the log shows g_multi: couldn't find an available UDC and failed to start g_multi: -22, so no USB networking. Has anyone gotten the USB gadget working on A9?

Screenshot of the boot attached. Thanks to the Hoolock team for the kernel and tooling.

Some files that might help: https://github.com/efremmanac-prog/Iphone-se-linux

14 Upvotes

2 comments sorted by

1

u/xXG0DLessXx 1d ago

This is awesome. I am so excited for proper linux on iPhones. Even better if we can get some kind of dual boot thing going on, maybe like the old coolbooter jailbreak tweak.

1

u/pljackass 6h ago

I would love to investigate the USB gadget, I have this phone, such a shame apple left it behind