Apple's open-source XNU kernel on Android phones: its own loader and drivers, Metal on the Adreno. Runs from RAM; a reboot gives the phone back to Android.
C
The repositories live in the oosexgang organization; the thermal stop's default is 105 degrees, as the phone's log says
shimoku749e51557ae556
diff --git a/.gitignore b/.gitignoreindex b51646e..9f5664a 100644--- a/.gitignore+++ b/.gitignore@@ -115,3 +115,6 @@ __pycache__/!/devices/manifest.conf!/devices/README.md!/devices/qemu/++# Android platform-tools for xl on a Mac (tools/macos-bin/README.md): not part of the repository+/tools/macos-bin/platform-toolsdiff --git a/README.md b/README.mdindex 74e1263..77c8a1c 100644--- a/README.md+++ b/README.md@@ -42,7 +42,7 @@ back to its own Android. The one thing written by default is the loader's own lo## Quick start```sh-git clone https://github.com/shimoku74/hakios.git hakios+git clone https://github.com/oosexgang/hakios.git hakioscd hakiosmake doctor # what this machine lacks, and what to domake qemu-open # the open kernel in QEMU: nothing of Apple's, nothing of a phone's@@ -61,17 +61,17 @@ make phone SECS=600 # a 10-minute session on the phone, in RAM| Repository | What ||---|---|-| [hakios](https://github.com/shimoku74/hakios) | **common**: the kernel port, every common driver, the loader, user space, the tools, this documentation, and `devices/qemu` |-| [hakios-sc7280-common](https://github.com/shimoku74/hakios-sc7280-common) | the Qualcomm SC7280 family (Snapdragon 778G): its configuration fragment and the drivers it builds |-| [hakios-redwood](https://github.com/shimoku74/hakios-redwood) | POCO X5 Pro 5G: its defconfig, status, UEFI platform, firmware script |-| [hakios-uefi](https://github.com/shimoku74/hakios-uefi) | HakiOS's UEFI: Mu-Silicium with HakiOS's boot path, banner and name |-| [hakios-web](https://github.com/shimoku74/hakios-web) | the website, with this documentation and the FAQ |+| [hakios](https://github.com/oosexgang/hakios) | **common**: the kernel port, every common driver, the loader, user space, the tools, this documentation, and `devices/qemu` |+| [hakios-sc7280-common](https://github.com/oosexgang/hakios-sc7280-common) | the Qualcomm SC7280 family (Snapdragon 778G): its configuration fragment and the drivers it builds |+| [hakios-redwood](https://github.com/oosexgang/hakios-redwood) | POCO X5 Pro 5G: its defconfig, status, UEFI platform, firmware script |+| [hakios-uefi](https://github.com/oosexgang/hakios-uefi) | HakiOS's UEFI: Mu-Silicium with HakiOS's boot path, banner and name |+| [hakios-web](https://github.com/oosexgang/hakios-web) | the website, with this documentation and the FAQ |`devices/manifest.conf` in the common repository names each one and the revision it is at; `tools/hakios-device.py sync` clones theminto `socs/`, `devices/` and `uefi/`. [How the repositories fit](docs/porting/repositories.md).```sh-git clone https://github.com/shimoku74/hakios.git && cd hakios+git clone https://github.com/oosexgang/hakios.git && cd hakiostools/hakios-device.py sync # the SoC, device and UEFI repositories, at the revisions the manifest names```diff --git a/README.uk.md b/README.uk.mdindex b624192..8e27e68 100644--- a/README.uk.md+++ b/README.uk.md@@ -76,7 +76,7 @@ HakiOS — це адаптація ядра Darwin (відкритий XNU віLinux x86-64, близько 12 ГБ на диску, 7-Zip 23 або новіший, `lz4`, `qemu-system-aarch64`, `edk2-aarch64`.```sh-git clone https://github.com/shimoku74/hakios.git hakios+git clone https://github.com/oosexgang/hakios.git hakioscd hakiosmake doctor # чого бракує цьому комп'ютеру (дисплей QEMU, UEFI, пам'ять) і що робитиmake fetch # IPSW iOS 16.5 із серверів Apple, потрібне розпаковується (7,4 ГБ)diff --git a/README.zh.md b/README.zh.mdindex 6f6dbd0..57560cb 100644--- a/README.zh.md+++ b/README.zh.md@@ -68,7 +68,7 @@ Linux 电脑上的 QEMU(`virt`,aarch64)里运行,不需要任何 AppleLinux x86-64,约 12 GB 磁盘,7-Zip 23 或更新,`lz4`,`qemu-system-aarch64`,`edk2-aarch64`。```sh-git clone https://github.com/shimoku74/hakios.git hakios+git clone https://github.com/oosexgang/hakios.git hakioscd hakiosmake doctor # 检查本机缺什么(QEMU 显示设备、UEFI 固件、内存)以及怎么办make fetch # 从 Apple 服务器取 iOS 16.5 IPSW,解包所需部分(7.4 GB)diff --git a/devices/manifest.conf b/devices/manifest.confindex afcad83..ae575bd 100644--- a/devices/manifest.conf+++ b/devices/manifest.conf@@ -9,16 +9,16 @@# is the guide. A device of yours: open a pull request that adds its block here, with its repository and revision.soc sc7280- repository https://github.com/shimoku74/hakios-sc7280-common.git- revision 977fc7181fc1eb984c4ebd4bb64c65a4d65f549a+ repository https://github.com/oosexgang/hakios-sc7280-common.git+ revision 1ef455525b734ba2066ff294aa11f7e5be3c20fcdevice redwood- repository https://github.com/shimoku74/hakios-redwood.git- revision f0050c4fd1e0d23b09bb02a9f34d96f26a08cead+ repository https://github.com/oosexgang/hakios-redwood.git+ revision da8a0b307f17f43a79929c1b2d49d1fed4ec1a75device qemupath devices/qemuuefi hakios-uefi- repository https://github.com/shimoku74/hakios-uefi.git+ repository https://github.com/oosexgang/hakios-uefi.gitrevision 398393659c90c45b07e30fbd34cff5efa5f794b2diff --git a/docs/concepts/architecture.md b/docs/concepts/architecture.mdindex 3f4c824..21a111e 100644--- a/docs/concepts/architecture.md+++ b/docs/concepts/architecture.md@@ -48,7 +48,7 @@ device's. A device's defconfig is three lines: the common kernel, its SoC's frag| common | the kernel port, every driver, the loader, user space, the tools, the documentation | this repository || SoC | the SoC's facts (cores, addresses that are the family's), its drivers | `socs/sc7280` || device | its defconfig, its status, its UEFI platform, its firmware script, drivers of its own | `devices/redwood` |-| UEFI | Mu-Silicium with HakiOS's boot path, banner and name | `uefi` ([its README](https://github.com/shimoku74/hakios/blob/main/uefi/README.md)) |+| UEFI | Mu-Silicium with HakiOS's boot path, banner and name | `uefi` ([its README](https://github.com/oosexgang/hakios/blob/main/uefi/README.md)) |## What is written to the phone@@ -58,7 +58,7 @@ device's. A device's defconfig is three lines: the common kernel, its SoC's frag| `/private/var` | only with `ufs_write=1 var_store=1` | the partition `darwin`, which you create yourself (`tools/userdata-carve.py` prints the commands; it changes nothing) || anything else | never | the loader refuses every other write; `tools/provenance.allow` lists each piece of code that can write, and why |-[LEGAL.md](https://github.com/shimoku74/hakios/blob/main/LEGAL.md) has the same, with what is and is not distributed.+[LEGAL.md](https://github.com/oosexgang/hakios/blob/main/LEGAL.md) has the same, with what is and is not distributed.## Where the code isdiff --git a/docs/devices/index.md b/docs/devices/index.mdindex aba898a..be70fb1 100644--- a/docs/devices/index.md+++ b/docs/devices/index.md@@ -16,4 +16,4 @@ An empty cell is a part nobody has looked at on that device yet.| SoC | What | ||---|---|---|-| `sc7280` | Qualcomm SC7280 family (SM7325 "Snapdragon 778G", QCM6490; "yupik", "kodiak") | [`socs/sc7280/`](https://github.com/shimoku74/hakios/tree/main/socs/sc7280) |+| `sc7280` | Qualcomm SC7280 family (SM7325 "Snapdragon 778G", QCM6490; "yupik", "kodiak") | [`socs/sc7280/`](https://github.com/oosexgang/hakios/tree/main/socs/sc7280) |diff --git a/docs/devices/qemu.md b/docs/devices/qemu.mdindex df26c0b..de681a6 100644--- a/docs/devices/qemu.md+++ b/docs/devices/qemu.md@@ -9,7 +9,7 @@| SoC | `none` || Configuration | `make qemu_defconfig` || Maintainer | the HakiOS developers (README.md) |-| Repository | [`devices/qemu/`](https://github.com/shimoku74/hakios/tree/main/devices/qemu) |+| Repository | [`devices/qemu/`](https://github.com/oosexgang/hakios/tree/main/devices/qemu) |## What worksdiff --git a/docs/devices/redwood.md b/docs/devices/redwood.mdindex 0a148b1..91b151b 100644--- a/docs/devices/redwood.md+++ b/docs/devices/redwood.md@@ -9,7 +9,7 @@| SoC | `sc7280` || Configuration | `make redwood_defconfig` || Maintainer | the HakiOS developers (README.md) |-| Repository | [`devices/redwood/`](https://github.com/shimoku74/hakios/tree/main/devices/redwood) |+| Repository | [`devices/redwood/`](https://github.com/oosexgang/hakios/tree/main/devices/redwood) || Firmware | `devices/redwood/pull-firmware.sh` pulls it from your own phone |## What worksdiff --git a/docs/getting-started/phone.md b/docs/getting-started/phone.mdindex 2b7b2dd..fd1291f 100644--- a/docs/getting-started/phone.md+++ b/docs/getting-started/phone.md@@ -55,7 +55,7 @@ A configuration sets them for you (`CONFIG_GPU=y` is `gpu=1`); [every argument](| `cam=5` | the cameras || `modem=1` | the modem: its firmware, file systems, data path, SIM ([cellular](../cellular.md)) || `var_store=1 ufs_write=1` | keep `/private/var` across reboots (**writes** to the partition `darwin`) |-| `thermal=1 thermal_stop=105` | read the temperatures (the SC7280's fragment sets `thermal=1`); hand back to the loader at 105 °C (not set by default) |+| `thermal=1` | read the temperatures (the SC7280's fragment sets it), and hand back to the loader at 105 °C: the driver's own default, `thermal_stop=N` for another limit, `thermal_stop=0` for none || `battery_stop=15` | hand back to the loader before the battery is flat |## When something goes wrong@@ -63,7 +63,7 @@ A configuration sets them for you (`CONFIG_GPU=y` is `gpu=1`); [every argument](| You see | Do ||---|---|| a session that does not end | `./xl` leaves its log in `logs/` and brings the phone back from the boot loader, or tells you which keys to press |-| the phone getting hot | `thermal_stop=105` (`CONFIG_THERMAL_STOP=105`) hands control back to the loader at that temperature; it is **not** set by default |+| the phone getting hot | with `thermal=1` (the SC7280's fragment sets it) the run is handed back to the loader at 105 °C; `thermal_stop=N` changes the limit. Seen on the phone, 27 October 2026: `thermal: ... stop at 105 C` || a run left alone on battery | `battery_stop=<percent>` ends it before the battery is flat || a problem in `make config` | it names the symbol and why: a driver left out that an argument needs, firmware the open profile does not load || anything else | the log in `logs/`, and `make doctor` with the phone on `adb` |diff --git a/docs/getting-started/qemu.md b/docs/getting-started/qemu.mdindex ead5cf5..f73a13c 100644--- a/docs/getting-started/qemu.md+++ b/docs/getting-started/qemu.md@@ -5,7 +5,7 @@The kernel, a placeholder loader and a tiny raw-syscall user space: **nothing of Apple's and nothing of any phone's**.```sh-git clone https://github.com/shimoku74/hakios.git hakios+git clone https://github.com/oosexgang/hakios.git hakioscd hakiostools/hakios-device.py sync # the SoC, device and UEFI repositories (the open kernel needs none of them; the rest does)make doctor # what this machine lacks, and what to dodiff --git a/docs/index.md b/docs/index.mdindex 486bb19..bb47780 100644--- a/docs/index.md+++ b/docs/index.md@@ -44,11 +44,11 @@ Android. What is and is not written to a phone: [Architecture](concepts/architec| Repository | What ||---|---|-| [hakios](https://github.com/shimoku74/hakios) | **common**: the kernel port, every common driver, the loader, user space, the tools, this documentation, and `devices/qemu` |-| [hakios-sc7280-common](https://github.com/shimoku74/hakios-sc7280-common) | the Qualcomm SC7280 family (Snapdragon 778G): its configuration fragment and the drivers it builds |-| [hakios-redwood](https://github.com/shimoku74/hakios-redwood) | POCO X5 Pro 5G: its defconfig, status, UEFI platform, firmware script |-| [hakios-uefi](https://github.com/shimoku74/hakios-uefi) | HakiOS's UEFI: Mu-Silicium with HakiOS's boot path, banner and name |-| [hakios-web](https://github.com/shimoku74/hakios-web) | the website, with this documentation and the FAQ |+| [hakios](https://github.com/oosexgang/hakios) | **common**: the kernel port, every common driver, the loader, user space, the tools, this documentation, and `devices/qemu` |+| [hakios-sc7280-common](https://github.com/oosexgang/hakios-sc7280-common) | the Qualcomm SC7280 family (Snapdragon 778G): its configuration fragment and the drivers it builds |+| [hakios-redwood](https://github.com/oosexgang/hakios-redwood) | POCO X5 Pro 5G: its defconfig, status, UEFI platform, firmware script |+| [hakios-uefi](https://github.com/oosexgang/hakios-uefi) | HakiOS's UEFI: Mu-Silicium with HakiOS's boot path, banner and name |+| [hakios-web](https://github.com/oosexgang/hakios-web) | the website, with this documentation and the FAQ |`devices/manifest.conf` in the common repository names each one and the revision it is at; `tools/hakios-device.py sync` clones theminto `socs/`, `devices/` and `uefi/`. [How the repositories fit](porting/repositories.md).diff --git a/docs/porting/drivers.md b/docs/porting/drivers.mdindex 4f3aef7..6265e4d 100644--- a/docs/porting/drivers.md+++ b/docs/porting/drivers.md@@ -91,5 +91,5 @@ The boot log says `hakios-kernel: N drivers built in (... nt36672 ...)`, and `sy## 5. Write down what it doesThe driver's head says what has been seen (on the phone, in QEMU, compiled only). The device's `device.conf` has a `status` line-for the part it makes work. [docs/driver-review](https://github.com/shimoku74/hakios/tree/main/docs/driver-review)+for the part it makes work. [docs/driver-review](https://github.com/oosexgang/hakios/tree/main/docs/driver-review)holds the audits of the common drivers: a new common driver gets one before it is relied on.diff --git a/docs/porting/index.md b/docs/porting/index.mdindex a65a4ec..a403d30 100644--- a/docs/porting/index.md+++ b/docs/porting/index.md@@ -32,7 +32,7 @@ That makes `devices/mydevice/` with:is the last thing you want. The drivers of your SoC (from its fragment) and QEMU's stay in.A SoC without a repository yet: make `socs/<soc>/` the same way by hand (`soc.conf`, `configs/<soc>.config`), from-[socs/sc7280](https://github.com/shimoku74/hakios/tree/main/socs/sc7280).+[socs/sc7280](https://github.com/oosexgang/hakios/tree/main/socs/sc7280).**Done when** `tools/hakios-device.py check mydevice` says it holds together, and the README says which SoC values differ and youknow why.diff --git a/docs/porting/repositories.md b/docs/porting/repositories.mdindex 1f19cd5..4410f4b 100644--- a/docs/porting/repositories.md+++ b/docs/porting/repositories.md@@ -74,8 +74,8 @@ its own.```soc sc7280- repository https://github.com/shimoku74/hakios-sc7280-common.git- revision 977fc7181fc1eb984c4ebd4bb64c65a4d65f549a+ repository https://github.com/oosexgang/hakios-sc7280-common.git+ revisiondevice qemupath devices/qemu kept in the common treediff --git a/tools/docs-gen.py b/tools/docs-gen.pyindex e97eef7..5463fcf 100755--- a/tools/docs-gen.py+++ b/tools/docs-gen.py@@ -15,7 +15,7 @@ import sysHERE = os.path.dirname(os.path.abspath(__file__))ROOT = os.path.dirname(HERE)-REPO = "https://github.com/shimoku74/hakios/blob/main/"+REPO = "https://github.com/oosexgang/hakios/blob/main/"MARK = {"works": "works", "partial": "partly", "missing": "no"}HEADER = "<!-- Made by tools/docs-gen.py from %s. Do not edit: change that, then run tools/docs-gen.py. -->\n\n"diff --git a/tools/hakios-device.py b/tools/hakios-device.pyindex b49cee6..d8c609b 100755--- a/tools/hakios-device.py+++ b/tools/hakios-device.py@@ -237,7 +237,7 @@ NEW_README = """# {title} ({name})A HakiOS device repository: what is true of this device and of no other. The kernel, the loader, the drivers and the tools arethe common repository's; the {soc} family's facts are `socs/{soc}/`'s. How the three are put together:-[docs/porting/repositories.md](https://github.com/shimoku74/hakios/blob/main/docs/porting/repositories.md).+[docs/porting/repositories.md](https://github.com/oosexgang/hakios/blob/main/docs/porting/repositories.md).| File | What ||---|---|diff --git a/tools/publish-repos.sh b/tools/publish-repos.shindex 5a5a393..eb3a43b 100755--- a/tools/publish-repos.sh+++ b/tools/publish-repos.sh@@ -1,14 +1,14 @@#!/bin/bash-# Push the repositories tools/split-repos.sh made (and the website's) to GitHub, each as a PRIVATE repository of OWNER.+# Push the repositories tools/split-repos.sh made (and the website's) to GitHub, each as a PRIVATE repository of OWNER (the organization oosexgang by default).#-# tools/publish-repos.sh DIR [OWNER] DIR: where split-repos.sh put them; OWNER: default shimoku74+# tools/publish-repos.sh DIR [OWNER] DIR: where split-repos.sh put them; OWNER: default oosexgang (the organization)## It signs in as nobody: it uses YOUR login. With the GitHub CLI (`gh auth login` once), it makes each repository and pushes it;# without it, make each one empty and private on github.com first (New repository, the same name, nothing in it), and git asks# your credential manager when it pushes. Never put a token in this file, in a command line or in a chat.set -eDIR=${1:?usage: tools/publish-repos.sh DIR [OWNER]}-OWNER=${2:-shimoku74}+OWNER=${2:-oosexgang}REPOS="hakios hakios-sc7280-common hakios-redwood hakios-uefi hakios-web"for r in $REPOS; do[ -d "$DIR/$r/.git" ] || { echo "publish-repos: no $DIR/$r (tools/split-repos.sh makes the first four; the website is hakios-web)"; continue; }diff --git a/tools/split-repos.sh b/tools/split-repos.shindex d63d8ec..9c725d4 100755--- a/tools/split-repos.sh+++ b/tools/split-repos.sh@@ -3,7 +3,7 @@# the UEFI. Each one keeps the history of its own files (a clone with git filter-branch --subdirectory-filter: git subtree, as# Xcode ships it, dies on a history this long). This repository is not changed: the results are new clones in OUT, ready to push.#-# tools/split-repos.sh OUT [OWNER] OWNER: where they will live on GitHub (default shimoku74)+# tools/split-repos.sh OUT [OWNER] OWNER: where they will live on GitHub (default oosexgang, the organization)## OUT/hakios common: everything but the parts below; devices/manifest.conf names those by repository# OUT/hakios-sc7280-common socs/sc7280@@ -15,7 +15,7 @@set -eSRC=$(cd "$(dirname "$(readlink -f "$0")")/.." && pwd)OUT=${1:?usage: tools/split-repos.sh OUT [OWNER]}-OWNER=${2:-shimoku74}+OWNER=${2:-oosexgang}mkdir -p "$OUT"OUT=$(cd "$OUT" && pwd)[ -z "$(git -C "$SRC" status --porcelain)" ] || { echo "split-repos: commit first: the parts are made from what is committed" >&2; exit 1; }