$ show ChefKissInc/NootedRed
NootedRed is a macOS kernel extension (Lilu plugin) that enables AMD integrated GPUs (Raven, Picasso, Renoir, Green Sardine) on macOS by patching Apple's proprietary AMD GPU drivers. It operates through binary patching, runtime vtable manipulation, and firmware injection to spoof GPU identity, fix display/audio/backlight issues, and provide hardware acceleration. The codebase is a intricate reverse-engineering effort, with hardcoded version-specific offsets and byte patterns, but it is structured into modular components such as display controllers, hardware library patches, and a reusable patching toolkit (PenguinWizardry). While the project is highly specialized and fragile due to its reliance on exact binary layouts, it demonstrates advanced kernel programming and reverse engineering skills. The repository is actively maintained for current macOS versions and includes a CI pipeline with static analysis.
The LLM identified 3 files worth highlighting for reuse:
Provides PatternSolveRequest, PatternRouteRequest, MaskedLookupPatch, and JumpPatternRouteRequest – a set of primitives that combine symbol solving, byte-pattern fallback, and masked patching. This is a reusable toolkit for any Lilu plugin that needs to patch macOS kernel extensions with version-dependent binary patterns. It abstracts the complexity of searching for signature bytes and applying patches, making it safer and more maintainable than raw MachO patching.
Implements a template class ObjectField<T> that holds per-OS-version offsets for fields within kernel objects. It allows looking up the correct offset at runtime based on the current macOS version. This pattern is essential for any kernel extension that needs to access struct members that change between OS versions, and it can be extracted and reused in other Lilu plugins or kexts that require version-dependent field access.
Implements a generic mechanism to inject IOKit driver personalities into the kernel's IORegistry. It reads embedded XML plists (via #embed) and registers them as IOKit personalities, enabling the kernel to match drivers against unsupported hardware. This is a standalone pattern that can be reused in any Hackintosh kext to add missing device driver support without modifying the original kexts.