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
Correct the QEMU figures: run-ios.sh prints launchd's log twice
vcvkk1eb87ba92a0e
diff --git a/README.md b/README.mdindex 0592505..2ba3255 100644--- a/README.md+++ b/README.md@@ -179,10 +179,11 @@ codec DMA TX_CDC_DMA_TX_3 и звуковой процессор в поток,Настройки: в образе работает и wifid, служба Wi-Fi самой iOS, а ядро отвечает на её запросы(`bsd/dev/redwood_apple80211.c`). Раньше его добавлял только `WIFID=1`; теперь он в образе по умолчанию, потомучто там, где радио нет вовсе, он ничего не стоит: в QEMU wifid поднимается, сам с собой разговаривает о кодах- стран и сидит — 228 запущенных процессов против 238 без него, ни одной аварии, — а на вопросы, которые система- всё равно задаёт, отвечает: `com.apple.wifi.manager` (это имя wifid регистрирует сам, в задании его нет) упал с- 60 ненайденных обращений за сеанс до 6, `com.apple.private.corewifi*` — с 6 до нуля, а всего ненайденных- обращений в сеансе стало 605 вместо 659. Оставить его за бортом — `WIFID=0`.+ стран и сидит — 114 запущенных процессов против 119 без него, ни одной аварии, ни одного перезапуска, — а на+ вопросы, которые система всё равно задаёт, отвечает: `com.apple.wifi.manager` (это имя wifid регистрирует сам,+ в задании его нет) упал с 30 ненайденных обращений за сеанс до 3, `com.apple.private.corewifi-xpc` — с одного+ до нуля, а всего ненайденных обращений в сеансе стало 305 вместо 331. Оставить его за бортом — `WIFID=0`.+ (Считать по журналу запуска QEMU надо, убрав повторы: `qemu/run-ios.sh` выводит журнал launchd дважды.)С радио (`wifi=1`) при работающем wifid в строкесостояния есть значок Wi-Fi, в Настройках Wi-Fi включён, подключённая сеть названа, под ней список сетей,которые слышит радио. Ядро отвечает и на просьбу подключиться, которую wifid шлёт, когда в Настройках выбралиdiff --git a/userland/build.sh b/userland/build.shindex 5d8d4dc..f2b6c92 100755--- a/userland/build.sh+++ b/userland/build.sh@@ -79,10 +79,12 @@ IOS_JOBS=${JOBS-"# bsd/dev/redwood_apple80211.c. With the radio (wifi=1) Settings then shows Wi-Fi on, the network joined and the# networks the radio hears. NOT FINISHED: a network cannot be joined from Settings yet.# It is in by default now, because it costs nothing where there is no radio at all: in QEMU it comes up, talks-# to itself about country codes and sits there -- 228 processes started against 228 without it, no crash -- and-# it answers what the rest of the system keeps asking for anyway. com.apple.wifi.manager, which wifid registers-# itself rather than declaring in its plist, fell from 60 failed lookups a session to 6, com.apple.private.corewifi*-# from 6 to none, and the session's whole failed-lookup count from 659 to 605. WIFID=0 leaves it out.+# to itself about country codes and sits there -- 114 processes started against 119 without it, no crash, never+# restarted -- and it answers what the rest of the system keeps asking for anyway. com.apple.wifi.manager, which+# wifid registers itself rather than declaring in its plist, fell from 30 failed lookups a session to 3,+# com.apple.private.corewifi-xpc from 1 to none, and the session's whole failed-lookup count from 331 to 305.+# (Count a QEMU run log with its duplicate lines removed: run-ios.sh prints launchd's log twice.)+# WIFID=0 leaves it out.[ "${WIFID-1}" != 0 ] && IOS_JOBS="$IOS_JOBS com.apple.wifid"# The programs (file names) started with a library of ours inside them: "LIBRARY NAME..." per line# (src/inject.c is libredwood.dylib, src/inject_sb.c is libredwood-sb.dylib, src/inject_media.c isdiff --git a/userland/mkjobs.py b/userland/mkjobs.pyindex cef72a3..0e614ad 100755--- a/userland/mkjobs.py+++ b/userland/mkjobs.py@@ -47,15 +47,15 @@ import sys# CommCenter stays, and this is what it cost to find out. Shipping both of its plists is the stock# arrangement -- they carry the same label and launchd picks by the device tree, so with no "baseband" node# it takes com.apple.CommCenter-noncellular, the variant iOS has for a device with no modem -- and it does-# pick it. It then gets a long way: it answers com.apple.commcenter.xpc and .coretelephony.xpc (148 and 36+# pick it. It then gets a long way: it answers com.apple.commcenter.xpc and .coretelephony.xpc (85 and 18# failed lookups in a session become none), serves geod its policy, loads the network-extension# configurations. And then it dies, every time, on one of two IOKit drivers of the cellular path that this# kernel has not got: "Could not find AppleIPAppender service" (matched by name, user client# ApplePDPHelperInterface -- PDP contexts, traffic-class flows, dedicated bearers) and SIGSEGV 50 ms later,# or "Unable to communicate with AppleBaseband driver" (com.apple.driver.AppleBasebandPCI) and SIGABRT.-# It respawns and does it again: 36 crashes in a seven-minute session where the same image without it has-# none. The boot is not held up -- it reaches the same 236 processes against 240 -- so the trade is 184-# failed lookups a session against a process dying every twelve seconds for ever, which is a bad one.+# It respawns and does it again: 18 crashes in a seven-minute session where the same image without it has+# none. The boot is not held up -- it reaches the same 118 processes against 119 -- so the trade is 103+# failed lookups a session against a process dying every fifteen seconds for ever, which is a bad one.# Stubbing the first driver is the kind of work RedwoodBattery already is, but the second is an Apple# baseband on PCIe, and this phone's modem is on the SoC and speaks QMI to a Qualcomm subsystem -- so what# is behind the driver is missing too, not just the driver.