Jump to content

m1n1

From postmarketOS Wiki
m1n1
Name m1n1
1st stage
Unavailable
2nd stage
Works
Resources source

A simple bootloader created by the Asahi Linux project for Apple Silicon based devices. It is used for booting both M-Series Macs and various aarch64 A and T-Series Apple devices (e.g. iPhones, iPads, Apple TVs).

M-Series Devices

TODO TODO: Explain how m1n1 is used in pmOS for M-Series devices

iDevices (Non-M-Series)

To use m1n1 on iDevices, a payload must be concatenated into m1n1 for execution after it is loaded by iBoot. Make sure you have a compiled kernel, dtbs, and initramfs at the ready. To add them to m1n1, run the following:

$ cat /path/to/m1n1.macho \
    /path/to/linux/boot/dtbs/apple/*.dtb \
    /tmp/postmarketOS-export/vmlinuz  \
    /tmp/postmarketOS-export/initramfs \
    > m1n1-linux.macho

This adds your kernel as a payload for m1n1, which it executes on boot.

Chainloading

Sometimes you want to chainload m1n1 instead of booting it directly from iBoot (e.g. booting from PongoOS). For that, you would use m1n1.bin instead of m1n1.macho. This is because PongoOS executes the .bin version of m1n1 with its bootm command.

See Also

https://asahilinux.org/docs/sw/m1n1-user-guide