1
0
Fork 0
mirror of https://github.com/HoolockLinux/m1n1.git synced 2026-05-13 22:32:03 -04:00
A bootloader and experimentation playground for Apple Silicon
  • Python 49.8%
  • C 44.6%
  • Rust 4.5%
  • Assembly 0.7%
  • Makefile 0.3%
  • Other 0.1%
Find a file
Nick Chan 338d480a62 proxyclient: Add support for A11 and T2 IOPs
A lot of address hardcoding but this is required when only the base
address is known.

Signed-off-by: Nick Chan <towinchenmi@gmail.com>
2026-05-01 14:51:58 +08:00
.github [DOWNSTREAM] setup github actions 2026-04-23 11:49:12 +08:00
3rdparty_licenses usb: add drivers/usb/dwc3/core.h from linux 2021-04-15 18:39:33 +09:00
artwork@80d14f8b6f Use 48px logo from the artwork submodule 2025-08-09 10:28:51 +02:00
data Use 48px logo from the artwork submodule 2025-08-09 10:28:51 +02:00
font fb console: add Source Code Pro font 2021-04-14 18:11:37 +09:00
proxyclient proxyclient: Add support for A11 and T2 IOPs 2026-05-01 14:51:58 +08:00
rust rust: Add chainload cargo feature 2026-04-02 22:04:19 +02:00
src kboot: Add support for handling poweroff on PRC devices with SMC. 2026-04-23 11:49:12 +08:00
sysinc utils: Add more functions to detect CPU features 2024-10-31 01:32:39 +09:00
tests/python m1n1: toolchain: llvm: Link with --pie 2025-09-13 22:50:18 +02:00
tools tools/: move JSON register definition files 2026-03-12 22:07:00 +01:00
udev udev/80-m1n1.rules: Add udev rules 2022-07-30 13:41:38 +09:00
.clang-format rust: Initial Rust-based EFI FAT32 chainloader 2022-03-09 22:01:42 +09:00
.editorconfig .editorconfig: trim trailing whitespace 2021-01-15 04:04:12 +09:00
.gitignore Move creating gpu blobs to m1n1. 2026-01-03 18:18:12 +01:00
.gitmodules rust: drop all vendored deps except fatfs 2025-08-09 08:37:30 +02:00
CODEOWNERS CODEOWNERS: Add janne and chaos_princess for rust 2025-08-10 15:55:17 +02:00
config.h soc: Added UART bases for A7-A11, T2 SoCs. 2024-10-31 01:32:39 +09:00
docker-compose.yml tooling: Add container setup for build environment 2021-02-18 16:14:15 +09:00
Dockerfile upd: buster to bookworm 2025-08-10 08:35:01 +02:00
LICENSE LICENSE: Fix copyright line 2022-03-07 23:59:25 +09:00
m1n1-idevice.ld m1n1-idevice.ld: Add __PRELINK_TEXT section 2026-04-23 11:49:12 +08:00
m1n1-raw.ld Add support for handling EL3. 2024-10-31 01:32:39 +09:00
m1n1.conf.example mitigations: Add a module to toggle chicken bits for vuln mitigations 2025-01-30 09:57:39 +09:00
m1n1.ld Add support for handling EL3. 2024-10-31 01:32:39 +09:00
Makefile Add monitor stub macho for EL3 devices 2026-04-23 11:47:42 +08:00
monitor-stub.ld Add monitor stub macho for EL3 devices 2026-04-23 11:47:42 +08:00
pytest.ini tests:prepare for pytest 2025-05-10 10:07:08 +02:00
README.md build: support building using MacPorts LLVM on Darwin 2026-02-06 22:30:38 +01:00
requirements.ini tests:prepare for pytest 2025-05-10 10:07:08 +02:00
requirements.txt tests:prepare for pytest 2025-05-10 10:07:08 +02:00
version.sh Replace bashisms with posix shell alternatives. 2023-01-13 17:29:15 +09:00

m1n1: A bootloader and experimentation playground for Apple Silicon

Building

You need an aarch64-linux-gnu-gcc cross-compiler toolchain (or a native one, if running on ARM64).

$ git clone --recursive https://github.com/AsahiLinux/m1n1.git
$ cd m1n1
$ make

To build on a native ARM64 machine:

  • On Linux, use make ARCH=.
  • On macOS using Homebrew:
$ brew install llvm lld
$ make
  • On macOS using MacPorts:
$ sudo port install llvm clang
$ sudo port select llvm llvm-mp-<version>
$ make

The output will be in build/m1n1.macho.

To build verbosely, use make V=1.

Building using the container setup

If you have a container runtime installed, like Podman or Docker, you can make use of the compose setup, which contains all build dependencies.

$ git clone --recursive https://github.com/AsahiLinux/m1n1.git
$ cd m1n1
$ podman-compose run m1n1 make
$ # or
$ docker-compose run m1n1 make

Usage

Our wiki has more information on how to use m1n1.

To install on an OS container based on macOS <12.1, use m1n1.macho:

kmutil configure-boot -c m1n1.macho -v <path to your OS volume>

To install on an OS container based on macOS >=12.1, use m1n1.bin:

kmutil configure-boot -c m1n1.bin --raw --entry-point 2048 --lowest-virtual-address 0 -v <path to your OS volume>

Payloads

m1n1 supports running payloads by simple concatenation:

$ cat build/m1n1.macho Image.gz build/dtb/apple-j274.dtb initramfs.cpio.gz > m1n1-payload.macho
$ cat build/m1n1.bin Image.gz build/dtb/apple-j274.dtb initramfs.cpio.gz > m1n1-payload.bin

Supported payload file formats:

  • Kernel images (or compatible). Must be compressed or last payload.
  • Devicetree blobs (FDT). May be uncompressed or compressed.
  • Initramfs cpio images. Must be compressed.

Supported compression formats:

  • gzip
  • xz

License

m1n1 is licensed under the MIT license, as included in the LICENSE file.

  • Copyright The Asahi Linux Contributors

Please see the Git history for authorship information.

Portions of m1n1 are based on mini:

m1n1 embeds libfdt, which is dual BSD and GPL-2 licensed and copyright:

  • Copyright (C) 2014 David Gibson david@gibson.dropbear.id.au
  • Copyright (C) 2018 embedded brains GmbH
  • Copyright (C) 2006-2012 David Gibson, IBM Corporation.
  • Copyright (C) 2012 David Gibson, IBM Corporation.
  • Copyright 2012 Kim Phillips, Freescale Semiconductor.
  • Copyright (C) 2016 Free Electrons
  • Copyright (C) 2016 NextThing Co.

The ADT code in mini is also based on libfdt and subject to the same license.

m1n1 embeds minlzma, which is MIT licensed and copyright:

  • Copyright (c) 2020 Alex Ionescu

m1n1 embeds a slightly modified version of tinf, which is ZLIB licensed and copyright:

  • Copyright (c) 2003-2019 Joergen Ibsen

m1n1 embeds portions taken from arm-trusted-firmware, which is BSD licensed and copyright:

  • Copyright (c) 2013-2020, ARM Limited and Contributors. All rights reserved.

m1n1 embeds Doug Lea's malloc (dlmalloc), which is in the public domain (CC0).

m1n1 embeds portions of PDCLib, which is in the public domain (CC0).

m1n1 embeds the Source Code Pro font, which is licensed under the OFL-1.1 license and copyright:

  • Copyright 2010-2019 Adobe (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe in the United States and/or other countries.
  • This Font Software is licensed under the SIL Open Font License, Version 1.1.

m1n1 embeds portions of the dwc3 usb linux driver, which was BSD-or-GPLv2 dual-licensed and copyright

m1n1 embeds portions of musl-libc's floating point library, which are MIT licensed and copyright

  • Copyright (c) 2017-2018, Arm Limited.

m1n1 embeds some rust crates. Licenses can be found in the vendor directory for every crate.