Skip to content

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

new-workspace.sh: the firmware by the other sessions' hand, which covers more than mine did

vcvkkd225de7ce7a8
diff --git a/tools/new-workspace.sh b/tools/new-workspace.sh
index b5453f5..861a161 100755
--- a/tools/new-workspace.sh
+++ b/tools/new-workspace.sh
@@ -54,12 +54,13 @@ done
for f in obj system.apfs root.apfs hello; do
if [ -e "$ROOT/userland/$f" ]; then cp -a --reflink=auto "$ROOT/userland/$f" userland/; fi
done
-# The firmware somebody has pulled out of the phone's Android, which is not in git and which
-# userland/build.sh takes from beside the working copy, not from inside it: a workspace without it
-# builds images that look right and have no firmware in them -- without fw-gpu the boot volume comes
-# out 4 MB instead of 21 and gpu=1 has nothing to load. Hard links, as the files of iOS are.
-for d in fw fw-gpu fw-wifi fw-audio fw-haptic fw-camera; do
- if [ -e "$ROOT/$d" ] && [ ! -e "$d" ]; then cp -al "$ROOT/$d" .; fi
+# The firmware the build puts into the images -- the radio's, the audio DSP's, the GPU's. It is not
+# in git and userland/build.sh takes it from beside the working copy rather than from inside it, so
+# a copy without it builds an image with no /fw and says nothing about it: the boot volume comes out
+# 4 MB instead of 21 and gpu=1 has nothing to load. Links, not copies: there is one set of these on
+# this computer and they are not small.
+for d in "$ROOT"/fw-*; do
+ if [ -d "$d" ]; then ln -s "$d" ./; fi
done
[ -f "$ROOT/xnuloader/loader.efi" ] && cp -a "$ROOT/xnuloader/loader.efi" xnuloader/
[ -f "$ROOT/qemu/kernel.syms" ] && cp -a "$ROOT/qemu/kernel.syms" qemu/