How thenickdude/kvm-opencore works
Main Components
• Build System & Automation: Represented by the Makefile which coordinates building modules from source.
• Source Modules: Found in the “src” directory with subdirectories including AppleALC, BrcmPatchRAM, CryptexFixup, Lilu, MacKernelSDK, OcBinaryData, OpenCorePkg, VirtualSMC, and WhateverGreen. These are the building blocks of the bootloader, drivers, and other essential modules.
• EFI Boot Environment: The EFI directory under which “OC” contains subfolders like ACPI (with SSDT files), Kexts (with various device drivers), and the “config.plist”. These components form the final bootable EFI image.
• Virtualization Configuration: Indicated by the libvirt.xml file, which defines how the disk image is integrated with QEMU/KVM (and by extension with Proxmox).
• External Dependencies & Integration: Although not explicitly shown as additional folders, the README points to external guides (e.g., Proxmox Hackintosh) and upstream changes in OpenCore, meaning there is an integration with external sources and environments.
Relationships & Data Flow
• The Build Process: Use the Makefile to orchestrate the compilation of source modules (from the “src” folder). Each module (e.g., OpenCorePkg, VirtualSMC, etc.) produces artifacts that are compiled/assembled.
• Configuration Management: The config.plist under EFI/OC serves as a central configuration point for booting via OpenCore.
• Virtualization Integration: The final disk image (packaged as a raw image despite the .iso extension) is deployed according to the settings in libvirt.xml. This image is then used by QEMU/KVM (or Proxmox) to boot the macOS environment.
Architectural Patterns & Design Principles
• Modular Architecture: The system is clearly divided into source modules, each responsible for a specific function (e.g., kernel extensions, patches, bootloader components). This separation ensures maintainability and scalability.
• Automated Build & Integration: The build system (via the Makefile) automates the process of pulling in updates and building the EFI image using modules sourced from the “src” directory.
• Virtualization-Centric: With libvirt.xml and a focus on QEMU/KVM, the project is tailored to virtualized environments, ensuring clean abstraction layers between bootloader functionality and the hypervisor.