### Start QEMU with OpenCore Source: https://github.com/btwise/opencore_no_acpi/blob/master/Debug/README.md Starts QEMU using the OVMF build script, mounting the ESP directory. Options after 'qemu' are passed directly to QEMU. ```shell ./build.sh -a X64 qemu -drive format=raw,file=fat:rw:ESP ``` -------------------------------- ### Install LogoutHook Daemon Source: https://github.com/btwise/opencore_no_acpi/blob/master/Utilities/LogoutHook/README.md Install the LogoutHook daemon using the provided command. ```shell ./Launchd.command install ``` -------------------------------- ### Start dnsmasq for Testing Source: https://github.com/btwise/opencore_no_acpi/blob/master/Platform/OpenNetworkBoot/README.md Command to quickly start dnsmasq for testing purposes without running it as a daemon. Requires a dnsmasq.conf file. ```bash sudo dnsmasq --no-daemon -C dnsmasq.conf --log-dhcp --log-debug ``` -------------------------------- ### QEMU Run Directory Structure Source: https://github.com/btwise/opencore_no_acpi/blob/master/Debug/README.md Example directory structure for preparing a QEMU launch directory with OpenCore components. ```shell . └── ESP └── EFI ├── BOOT │   └── BOOTx64.efi └── OC ├── OpenCore.efi └── config.plist ``` -------------------------------- ### OpenCore Configuration Selector UI Example Source: https://github.com/btwise/opencore_no_acpi/blob/master/PROJECT_SUMMARY.md This is an example of the user interface for the OpenCore Configuration Selector. It displays detected configuration files with descriptions and provides navigation and selection options. ```text ╔══════════════════════════════════════════════════════════════╗ ║ ║ ║ OpenCore Configuration Selector ║ ║ MOD by Prairie Penguin (WeChat: 15242609) ║ ║ ║ ╚══════════════════════════════════════════════════════════════╝ Multiple configuration files detected. Please select one to continue: ► [1] config.plist Default Configuration [2] config-debug.plist Enables verbose logging and debug options [3] config-safe.plist Safe Mode (Minimal Settings) ──────────────────────────────────────────────────────────────── [UP/DOWN]: Navigate [ENTER]: Confirm [1-9]: Quick Select Auto-select first entry in 10 seconds... ``` -------------------------------- ### Audio Output Bitmask Examples Source: https://github.com/btwise/opencore_no_acpi/blob/master/Docs/Differences/Differences.tex These examples show how output channel bitmasks are logged by AudioDxe. Combine bitmask values to set the AudioOutMask for desired outputs. ```text HDA: | Port widget @ 0x9 is an output (pin defaults 0x2B4020) (***bitmask 1***) ``` ```text HDA: | Port widget @ 0xA is an output (pin defaults 0x90100112) (***bitmask 2***) ``` ```text HDA: | Port widget @ 0xB is an output (pin defaults 0x90100110) (***bitmask 4***) ``` ```text HDA: | Port widget @ 0x10 is an output (pin defaults 0x4BE030) (***bitmask 8***) ``` -------------------------------- ### Allocate RAM Disk for macOS Personalization Source: https://github.com/btwise/opencore_no_acpi/blob/master/Docs/Differences/Differences.tex Allocate a dedicated RAM disk for macOS personalization to workaround memory issues during OS installation with personalized Apple Secure Boot. Execute these commands in the macOS recovery terminal before starting the installation. ```bash disk=$(hdiutil attach -nomount ram://4096) diskutil erasevolume HFS+ SecureBoot $disk diskutil unmount $disk mkdir /var/tmp/OSPersonalizationTemp diskutil mount -mountpoint /var/tmp/OSPersonalizationTemp $disk ``` -------------------------------- ### Install Boot Camp MSI Package Source: https://github.com/btwise/opencore_no_acpi/blob/master/Docs/Differences/PreviousConfiguration.tex Install the Boot Camp support software using msiexec. This command is useful for installing on unsupported Mac models or after a clean install. ```powershell msiexec /i BootCamp.msi ``` -------------------------------- ### Run QEMU with Realistic Architecture and Debugging Source: https://github.com/btwise/opencore_no_acpi/blob/master/Debug/README.md Starts QEMU with a Q35 machine architecture, 2048MB memory, Penryn CPU, and enables GDB debugging on TCP port 8864. The -L . flag sets the current directory as the library path. ```shell qemu-system-x86_64 -L . -bios "$OVMF_BUILD/OVMF.fd" -drive format=raw,file=fat:rw:ESP \ -machine q35 -m 2048 -cpu Penryn -smp 4,cores=2 -usb -device usb-mouse -gdb tcp::8864 ``` -------------------------------- ### Install PyYAML on macOS Source: https://github.com/btwise/opencore_no_acpi/blob/master/AppleModels/README.md Use this command to install the PyYAML package on macOS, which is required for updating the hardware database. ```bash sudo -H python3 -m pip install pyyaml ``` -------------------------------- ### Test Scenario 1: Single Configuration File Source: https://github.com/btwise/opencore_no_acpi/blob/master/CONFIG_SELECTOR_IMPLEMENTATION.md Prepares the test environment by copying a single configuration file to be directly loaded, expecting no menu to be displayed. ```bash # 准备测试环境 mkdir -p /tmp/test_oc/EFI/OC cp Docs/Sample.plist /tmp/test_oc/EFI/OC/config.plist # 预期行为:直接加载 config.plist,不显示菜单 ``` -------------------------------- ### OpenCore Directory Structure Example Source: https://github.com/btwise/opencore_no_acpi/blob/master/Docs/Differences/Differences.tex Illustrates the standard directory layout for OpenCore, showing the placement of essential files and folders within the EFI partition, including bootloaders, configuration files, ACPI tables, drivers, and kexts. ```latex \node {ESP} child { node {EFI} child { node {BOOT} child { node [selected] {BOOTx64.efi}} } child [missing] {} child { node {OC} child { node {ACPI} child { node [optional] {DSDT.aml}} child { node [optional] {SSDT-1.aml}} child { node [optional] {MYTABLE.aml}} } child [missing] {} child [missing] {} child [missing] {} child { node {Drivers} child { node [optional] {MyDriver.efi}} child { node [optional] {OtherDriver.efi}} } child [missing] {} child [missing] {} child { node {Kexts} child { node [optional] {MyKext.kext}} child { node [optional] {OtherKext.kext}} } child [missing] {} child [missing] {} child { node [optional] {Resources} child { node [optional] {Audio}} child { node [optional] {Font}} child { node [optional] {Image}} child { node [optional] {Label}} } child [missing] {} child [missing] {} child [missing] {} child [missing] {} child { node {Tools} child { node [optional] {Tool.efi}} } child [missing] {} child { node [selected] {OpenCore.efi}} child { node {config.plist}} child { node [optional] {vault.plist}} child { node [optional] {vault.sig}} } } child [missing] {} child [missing] {} child [missing] {} child [missing] {} child [missing] {} child [missing] {} child [missing] {} child [missing] {} child [missing] {} child [missing] {} child [missing] {} child [missing] {} child [missing] {} child [missing] {} child [missing] {} child [missing] {} child [missing] {} child [missing] {} child [missing] {} child [missing] {} child [missing] {} child [missing] {} child [missing] {} child [missing] {} child { node [optional] {Kernels} child { node [optional] {kernel}} child { node [optional] {kernelcache}} child { node [optional] {prelinkedkernel}} } child [missing] {} child [missing] {} child [missing] {} child { node [optional] {boot}} child { node [optional] {opencore-YYYY-MM-DD-HHMMSS.txt}} child { node [optional] {panic-YYYY-MM-DD-HHMMSS.txt}} child { node [optional] {SysReport}} child { node [optional] {NVRAM} child { node [optional] {nvram.plist}} child { node [optional] {nvram.fallback}} child { node [optional] {nvram.used}} } ; ``` -------------------------------- ### Test Scenario 2: Multiple Configuration Files Source: https://github.com/btwise/opencore_no_acpi/blob/master/CONFIG_SELECTOR_IMPLEMENTATION.md Prepares multiple configuration files to test the menu display functionality, expecting a selection menu with all listed configurations. ```bash # 准备多个配置 cp Docs/Sample.plist /tmp/test_oc/EFI/OC/config.plist cp Docs/config-debug-example.plist /tmp/test_oc/EFI/OC/config-debug.plist cp Docs/Sample.plist /tmp/test_oc/EFI/OC/config-safe.plist # 预期行为:显示选择菜单,列出 3 个配置 ``` -------------------------------- ### Create and Attach Disk Image for Mac OS X 10.4 Installer Source: https://github.com/btwise/opencore_no_acpi/blob/master/Docs/Configuration.tex These commands are used to prepare a disk image for the Mac OS X 10.4 installer. It involves creating a new DMG file, attaching it, and then copying the contents of the original installer DMG to a partition on the new image. ```bash hdiutil create -o converted.dmg -size 14g -layout GPTSPUD -fs HFS+ hdiutil attach -nomount converted.dmg hdiutil attach -nomount /path/to/original/installer.dmg dd if=/dev/disk{Y} of=/dev/disk{X}s2 bs=16m ``` -------------------------------- ### Convert DMG Installer for Mac OS X 10.4 Source: https://github.com/btwise/opencore_no_acpi/blob/master/Docs/Differences/PreviousConfiguration.tex Commands to convert a Mac OS X 10.4 DMG installer into a usable format for installation media. This involves creating a new disk image, attaching it, copying data from the original DMG, and optionally converting to qcow2 format. ```bash hdiutil create -o converted.dmg -size 14g -layout GPTSPUD -fs HFS+ ``` ```bash hdiutil attach -nomount converted.dmg ``` ```bash hdiutil attach -nomount /path/to/original/installer.dmg ``` ```bash dd if=/dev/disk{Y} of=/dev/disk{X}s2 bs=16m ``` ```bash # Optionally convert to preferrable disk image: qemu-img convert -p -O qcow2 /dev/disk{X} installer.qcow2 ``` ```bash hdiutil detach disk{X} && hdiutil detach disk{Y} ``` -------------------------------- ### Check LogoutHook Daemon Status Source: https://github.com/btwise/opencore_no_acpi/blob/master/Utilities/LogoutHook/README.md Check the status of the installed LogoutHook daemon. This command shows the non-empty daemon PID if installed with default settings. ```shell ./Launchd.command status ```