How lythka/hao-patcher works
hao-patcher builds a layered macOS 27 image for unsupported Intel Macs, then guides the user through making a USB installer and installing it. The main path runs from hardware/profile selection through image assembly and compatibility patches to image deployment; distinct branches provide accelerated Metal support and image capture/push tools. The README documents the image layers and capabilities, while sampled source confirms builder dependencies and selected tool internals; unsampled subsystem links are omitted where their callers are not shown.
Main entry points: builder.py Build orchestration · golden-image.py Golden image · cli.py SSD image workflow · installer.py USB installer
Components 23
Installer workflow
- USB installer
tools/hao/src/installer.py - Build orchestration
tools/hao/src/builder.py - Hardware detection
tools/hao/src/detect.py - Install safety
tools/hao/src/safety.py - USB writing
tools/hao/src/stick.py
Image assembly
- Assembly recipes
pipeline/patches.py - Golden image
pipeline/stages/golden-image.py
Compatibility fixes
- Binary edit engine
tools/edit-engine/src/engine.py - Edit specifications
tools/edit-engine/src/spec.py - Cache dylib extraction
tools/cache-dylib/cache_dylib.py - System compatibility
patches/golden-gate-userspace/src - Kernel compatibility
patches/darwin27-kernel/src
Metal graphics
- Shader library fixes
cache/metallib/lib - Argument buffers
tools/metal-argbuf/src/compiler - GPU sampler client
cache/metallib/lib/runtime/gpu_client.c - Sampler query interpose
cache/metallib/lib/runtime/sampler_query.c
Image tools
- SSD image workflow
tools/ssdimg/cli.py - Image object store
tools/ssdimg/store.py - Disk image transfer
tools/ssdimg/push.py - Target disk agent
tools/ssdpush/agent.c - Swift cache graph
tools/shared-cache/src/dyld_rebuild/swift_graph.py - Swift metadata
tools/shared-cache/src/dyld_rebuild/swift_metadata.py
Other components
- Mac owner
Connections 18
- Mac owner → USB installer: creates USB
README.md - USB installer → Build orchestration: uses plan
tools/hao/src/installer.py - Build orchestration → Hardware detection: resolves profile
tools/hao/src/builder.py - Build orchestration → Install safety: checks safety
tools/hao/src/builder.py - Build orchestration → USB writing: delegates USB
tools/hao/src/builder.py - Build orchestration → Assembly recipes: plans recipes
tools/hao/src/builder.py - Build orchestration → Golden image: assembles image
- Assembly recipes → System compatibility: selects fixes
- Golden image → Kernel compatibility: includes kernel layer
README.md - Golden image → System compatibility: includes compatibility layer
README.md - Golden image → Shader library fixes: includes shader repairs
README.md - Shader library fixes → Argument buffers: pairs with compiler support
README.md - GPU sampler client → Sampler query interpose: avoids loading
cache/metallib/lib/runtime/gpu_client.c - Binary edit engine → Edit specifications: applies spec
tools/edit-engine/src/engine.py - SSD image workflow → Image object store: stores chunks
tools/ssdimg/cli.py - SSD image workflow → Disk image transfer: pushes image
tools/ssdimg/cli.py - Disk image transfer → Target disk agent: streams chunks
tools/ssdpush/agent.c - Swift cache graph → Swift metadata: coverage reads
tools/shared-cache/src/dyld_rebuild/swift_coverage.py