-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update documentation, trivial cleanup, change OpenCore prefs #139
Changes from all commits
c15804f
ed75a20
fedcbf0
03c9448
8f5ddab
cb8ad39
94e87ef
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,37 @@ | ||
#!/usr/bin/env bash | ||
|
||
# All credits for OpenCore support go to https://github.com/Leoyzen/KVM-Opencore and | ||
# https://github.com/thenickdude/KVM-Opencore/. Thanks! | ||
# | ||
# Special thanks to... | ||
# https://github.com/Leoyzen/KVM-Opencore | ||
# https://github.com/thenickdude/KVM-Opencore/ | ||
# https://github.com/qemu/qemu/blob/master/docs/usb2.txt | ||
|
||
# qemu-img create -f qcow2 mac_hdd_ng.img 128G | ||
# | ||
# echo 1 > /sys/module/kvm/parameters/ignore_msrs (this is required) | ||
|
||
############################################################################ | ||
# NOTE: Tweak the "MY_OPTIONS" line in case you are having booting problems! | ||
############################################################################ | ||
|
||
# This works for Catalina as well as Mojave. Tested with macOS 10.14.6 and macOS 10.15. | ||
|
||
MY_OPTIONS="+pcid,+ssse3,+sse4.2,+popcnt,+avx,+aes,+xsave,+xsaveopt,check" | ||
|
||
# OVMF=./firmware | ||
OVMF="./" | ||
|
||
# This causes high cpu usage on the *host* side | ||
# qemu-system-x86_64 -enable-kvm -m 3072 -cpu Penryn,vendor=GenuineIntel,+invtsc,vmware-cpuid-freq=on,hypervisor=off,vmx=on,kvm=off,$MY_OPTIONS\ | ||
|
||
|
||
qemu-system-x86_64 -enable-kvm -m 3072 -cpu Penryn,kvm=on,vendor=GenuineIntel,+invtsc,vmware-cpuid-freq=on,$MY_OPTIONS\ | ||
-machine q35 \ | ||
-smp 4,cores=2 \ | ||
-usb \ | ||
-device usb-ehci,id=ehci \ | ||
-device usb-kbd,bus=ehci.0 \ | ||
-device usb-mouse,bus=ehci.0 \ | ||
-device nec-usb-xhci,id=xhci \ | ||
-device isa-applesmc,osk="ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc" \ | ||
-drive if=pflash,format=raw,readonly,file=$OVMF/OVMF_CODE.fd \ | ||
-drive if=pflash,format=raw,file=$OVMF/OVMF_VARS-1024x768.fd \ | ||
-smbios type=2 \ | ||
-device ich9-intel-hda -device hda-duplex \ | ||
-device ich9-ahci,id=sata \ | ||
-drive id=OpenCoreBoot,if=none,snapshot=on,format=qcow2,file=./'OpenCore-BS/OpenCore.qcow2' \ | ||
-device ide-hd,bus=sata.2,drive=OpenCoreBoot \ | ||
-device ide-hd,bus=sata.3,drive=InstallMedia \ | ||
-drive id=InstallMedia,if=none,file=BaseSystem.img,format=raw \ | ||
-drive id=MacHDD,if=none,file=./mac_hdd_ng.img,format=qcow2 \ | ||
-device ide-hd,bus=sata.4,drive=MacHDD \ | ||
-netdev tap,id=net0,ifname=tap0,script=no,downscript=no -device vmxnet3,netdev=net0,id=net0,mac=52:54:00:c9:18:27 \ | ||
-monitor stdio \ | ||
-vga vmware | ||
ALLOCATED_RAM="3072" # MiB | ||
CPU_SOCKETS="1" | ||
CPU_CORES="2" | ||
CPU_THREADS="4" | ||
|
||
REPO_PATH="./" | ||
OVMF_DIR="." | ||
|
||
qemu-system-x86_64 -enable-kvm -m "$ALLOCATED_RAM" -cpu host,kvm=on,vendor=GenuineIntel,+invtsc,vmware-cpuid-freq=on \ | ||
-machine q35 -usb \ | ||
-smp "$CPU_THREADS",cores="$CPU_CORES",sockets="$CPU_SOCKETS" \ | ||
-drive if=pflash,format=raw,readonly,file="$REPO_PATH/$OVMF_DIR/OVMF_CODE.fd" \ | ||
-drive if=pflash,format=raw,file="$REPO_PATH/$OVMF_DIR/OVMF_VARS-1024x768.fd" \ | ||
-drive id=OpenCoreBoot,if=none,snapshot=on,format=qcow2,file=$REPO_PATH/'OpenCore-BS/OpenCore.qcow2' \ | ||
-drive id=InstallMedia,if=none,file=$REPO_PATH/BaseSystem.img,format=raw \ | ||
-drive id=MacHDD,if=none,file=$REPO_PATH/mac_hdd_ng.img,format=qcow2 \ | ||
-smbios type=2 \ | ||
-device isa-applesmc,osk="ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc" \ | ||
-device usb-ehci,id=ehci \ | ||
-device usb-kbd,bus=ehci.0 \ | ||
-device usb-mouse,bus=ehci.0 \ | ||
-device nec-usb-xhci,id=xhci \ | ||
-device ich9-ahci,id=sata \ | ||
-device ich9-intel-hda -device hda-duplex \ | ||
-device ide-hd,bus=sata.2,drive=OpenCoreBoot \ | ||
-device ide-hd,bus=sata.3,drive=InstallMedia \ | ||
-device ide-hd,bus=sata.4,drive=MacHDD \ | ||
-netdev tap,id=net0,ifname=tap0,script=no,downscript=no -device vmxnet3,netdev=net0,id=net0,mac=52:54:00:c9:18:27 \ | ||
-monitor stdio \ | ||
-vga vmware |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -340,16 +340,40 @@ | |
<key>Emulate</key> | ||
<dict> | ||
<key>Cpuid1Data</key> | ||
<data> | ||
VAYFAAAAAAAAAAAAAAAAAA== | ||
</data> | ||
<data>VwYFAAAAAAAAAAAAAAAAAA==</data> | ||
<key>Cpuid1Mask</key> | ||
<data> | ||
////AAAAAAAAAAAAAAAAAA== | ||
</data> | ||
<data>/////wAAAAAAAAAAAAAAAA==</data> | ||
</dict> | ||
<key>Patch</key> | ||
<array> | ||
<dict> | ||
<key>Base</key> | ||
<string></string> | ||
<key>Comment</key> | ||
<string>algrey - cpuid_set_generic_info - disable check to allow leaf7</string> | ||
<key>Count</key> | ||
<integer>1</integer> | ||
<key>Enabled</key> | ||
<false/> | ||
<key>Find</key> | ||
<data>ADoPgg==</data> | ||
<key>Identifier</key> | ||
<string>kernel</string> | ||
<key>Limit</key> | ||
<integer>0</integer> | ||
<key>Mask</key> | ||
<data></data> | ||
<key>MaxKernel</key> | ||
<string>19.99.99</string> | ||
<key>MinKernel</key> | ||
<string>17.0.0</string> | ||
<key>Replace</key> | ||
<data>AAAPgg==</data> | ||
<key>ReplaceMask</key> | ||
<data></data> | ||
<key>Skip</key> | ||
<integer>0</integer> | ||
</dict> | ||
<dict> | ||
<key>Base</key> | ||
<string>_cpu_topology_sort</string> | ||
|
@@ -360,28 +384,21 @@ | |
<key>Enabled</key> | ||
<false/> | ||
<key>Find</key> | ||
<data> | ||
6AAA//8= | ||
</data> | ||
<data>6AAA//8=</data> | ||
<key>Identifier</key> | ||
<string>kernel</string> | ||
<key>Limit</key> | ||
<integer>0</integer> | ||
<key>Mask</key> | ||
<data> | ||
/wAA//8= | ||
</data> | ||
<data>/wAA//8=</data> | ||
<key>MaxKernel</key> | ||
<string>19.99.99</string> | ||
<key>MinKernel</key> | ||
<string>17.0.0</string> | ||
<key>Replace</key> | ||
<data> | ||
Dx9EAAA= | ||
</data> | ||
<data>Dx9EAAA=</data> | ||
<key>ReplaceMask</key> | ||
<data> | ||
</data> | ||
<data></data> | ||
<key>Skip</key> | ||
<integer>0</integer> | ||
</dict> | ||
|
@@ -395,28 +412,77 @@ | |
<key>Enabled</key> | ||
<false/> | ||
<key>Find</key> | ||
<data> | ||
MduAPQAAAAAGdQA= | ||
</data> | ||
<data>MduAPQAAAAAGdQA=</data> | ||
<key>Identifier</key> | ||
<string>kernel</string> | ||
<key>Limit</key> | ||
<integer>0</integer> | ||
<key>Mask</key> | ||
<data> | ||
/////wAAAP///wA= | ||
</data> | ||
<data>/////wAAAP///wA=</data> | ||
<key>MaxKernel</key> | ||
<string>19.99.99</string> | ||
<key>MinKernel</key> | ||
<string>17.0.0</string> | ||
<key>Replace</key> | ||
<data> | ||
u7xP6njpXQAAAJA= | ||
</data> | ||
<data>u7xP6njpXQAAAJA=</data> | ||
<key>ReplaceMask</key> | ||
<data> | ||
</data> | ||
<data></data> | ||
<key>Skip</key> | ||
<integer>0</integer> | ||
</dict> | ||
<dict> | ||
<key>Base</key> | ||
<string></string> | ||
<key>Comment</key> | ||
<string>algrey - - skip cpuid_cores_per_package test -10.15</string> | ||
<key>Count</key> | ||
<integer>0</integer> | ||
<key>Enabled</key> | ||
<false/> | ||
<key>Find</key> | ||
<data>gz0AAAAAAA8AAAAAAItdvA==</data> | ||
<key>Identifier</key> | ||
<string>kernel</string> | ||
<key>Limit</key> | ||
<integer>0</integer> | ||
<key>Mask</key> | ||
<data>//8AAAD///8AAAAA/////w==</data> | ||
<key>MaxKernel</key> | ||
<string>19.99.99</string> | ||
<key>MinKernel</key> | ||
<string>19.0.0</string> | ||
<key>Replace</key> | ||
<data>AAAAAAAAAQAAAAAAAAAAAA==</data> | ||
<key>ReplaceMask</key> | ||
<data>AAAAAAAADwAAAAAAAAAAAA==</data> | ||
<key>Skip</key> | ||
<integer>0</integer> | ||
</dict> | ||
<dict> | ||
<key>Base</key> | ||
<string></string> | ||
<key>Comment</key> | ||
<string>algrey - - skip cpuid_cores_per_package test</string> | ||
<key>Count</key> | ||
<integer>0</integer> | ||
<key>Enabled</key> | ||
<false/> | ||
<key>Find</key> | ||
<data>gz0AAAAAAHQAi128</data> | ||
<key>Identifier</key> | ||
<string>kernel</string> | ||
<key>Limit</key> | ||
<integer>0</integer> | ||
<key>Mask</key> | ||
<data>//8AAAD///8A////</data> | ||
<key>MaxKernel</key> | ||
<string>18.99.99</string> | ||
<key>MinKernel</key> | ||
<string>17.0.0</string> | ||
<key>Replace</key> | ||
<data>AAAAAAAAAQAAAAAA</data> | ||
<key>ReplaceMask</key> | ||
<data>AAAAAAAADwAAAAAA</data> | ||
<key>Skip</key> | ||
<integer>0</integer> | ||
</dict> | ||
|
@@ -516,7 +582,8 @@ | |
<key>HaltLevel</key> | ||
<integer>2147483648</integer> | ||
<key>ScanPolicy</key> | ||
<integer>18809603</integer> | ||
<integer>0</integer> | ||
<!-- <integer>18809603</integer> --> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This (commented stuff) is not valid for OpenCore 0.6.0. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Are there any problems with the additional algrey patches? The leaf7 patch was really useful to get AVX working on my AMD system w/o manually specifying it. |
||
<key>Vault</key> | ||
<string>Optional</string> | ||
</dict> | ||
|
@@ -573,7 +640,7 @@ | |
<key>SystemAudioVolume</key> | ||
<data>Rg==</data> | ||
<key>boot-args</key> | ||
<string>keepsyms=1 -v</string> | ||
<string>-v keepsyms=1</string> | ||
<key>run-efi-updater</key> | ||
<string>No</string> | ||
<key>csr-active-config</key> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,37 @@ | ||
#!/usr/bin/env bash | ||
|
||
# All credits for OpenCore support go to https://github.com/Leoyzen/KVM-Opencore and | ||
# https://github.com/thenickdude/KVM-Opencore/. Thanks! | ||
# | ||
# Special thanks to... | ||
# https://github.com/Leoyzen/KVM-Opencore | ||
# https://github.com/thenickdude/KVM-Opencore/ | ||
# https://github.com/qemu/qemu/blob/master/docs/usb2.txt | ||
|
||
# qemu-img create -f qcow2 mac_hdd_ng.img 128G | ||
# | ||
# echo 1 > /sys/module/kvm/parameters/ignore_msrs (this is required) | ||
|
||
############################################################################ | ||
# NOTE: Tweak the "MY_OPTIONS" line in case you are having booting problems! | ||
############################################################################ | ||
|
||
# This works for Catalina as well as Mojave. Tested with macOS 10.14.6 and macOS 10.15. | ||
|
||
MY_OPTIONS="+pcid,+ssse3,+sse4.2,+popcnt,+avx,+aes,+xsave,+xsaveopt,check" | ||
|
||
# OVMF=./firmware | ||
OVMF="./" | ||
|
||
# This causes high cpu usage on the *host* side | ||
# qemu-system-x86_64 -enable-kvm -m 3072 -cpu Penryn,vendor=GenuineIntel,+invtsc,vmware-cpuid-freq=on,hypervisor=off,vmx=on,kvm=off,$MY_OPTIONS\ | ||
|
||
|
||
qemu-system-x86_64 -enable-kvm -m 3072 -cpu Penryn,kvm=on,vendor=GenuineIntel,+invtsc,vmware-cpuid-freq=on,$MY_OPTIONS\ | ||
-machine q35 \ | ||
-smp 4,cores=2 \ | ||
-usb \ | ||
-device usb-ehci,id=ehci \ | ||
-device usb-kbd,bus=ehci.0 \ | ||
-device usb-mouse,bus=ehci.0 \ | ||
-device nec-usb-xhci,id=xhci \ | ||
-device isa-applesmc,osk="ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc" \ | ||
-drive if=pflash,format=raw,readonly,file=$OVMF/OVMF_CODE.fd \ | ||
-drive if=pflash,format=raw,file=$OVMF/OVMF_VARS-1024x768.fd \ | ||
-smbios type=2 \ | ||
-device ich9-intel-hda -device hda-duplex \ | ||
-device ich9-ahci,id=sata \ | ||
-drive id=OpenCoreBoot,if=none,snapshot=on,format=qcow2,file=./'OpenCore-Catalina/OpenCore.qcow2' \ | ||
-device ide-hd,bus=sata.2,drive=OpenCoreBoot \ | ||
-device ide-hd,bus=sata.3,drive=InstallMedia \ | ||
-drive id=InstallMedia,if=none,file=BaseSystem.img,format=raw \ | ||
-drive id=MacHDD,if=none,file=./mac_hdd_ng.img,format=qcow2 \ | ||
-device ide-hd,bus=sata.4,drive=MacHDD \ | ||
-netdev tap,id=net0,ifname=tap0,script=no,downscript=no -device vmxnet3,netdev=net0,id=net0,mac=52:54:00:c9:18:27 \ | ||
-monitor stdio \ | ||
-vga vmware | ||
ALLOCATED_RAM="3072" # MiB | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Incorporated. Thanks. |
||
CPU_SOCKETS="1" | ||
CPU_CORES="2" | ||
CPU_THREADS="4" | ||
|
||
REPO_PATH="./" | ||
OVMF_DIR="." | ||
|
||
qemu-system-x86_64 -enable-kvm -m "$ALLOCATED_RAM" -cpu host,kvm=on,vendor=GenuineIntel,+invtsc,vmware-cpuid-freq=on \ | ||
-machine q35 -usb \ | ||
-smp "$CPU_THREADS",cores="$CPU_CORES",sockets="$CPU_SOCKETS" \ | ||
-drive if=pflash,format=raw,readonly,file="$REPO_PATH/$OVMF_DIR/OVMF_CODE.fd" \ | ||
-drive if=pflash,format=raw,file="$REPO_PATH/$OVMF_DIR/OVMF_VARS-1024x768.fd" \ | ||
-drive id=OpenCoreBoot,if=none,snapshot=on,format=qcow2,file=$REPO_PATH/'OpenCore-Catalina/OpenCore.qcow2' \ | ||
-drive id=InstallMedia,if=none,file=$REPO_PATH/BaseSystem.img,format=raw \ | ||
-drive id=MacHDD,if=none,file=$REPO_PATH/mac_hdd_ng.img,format=qcow2 \ | ||
-smbios type=2 \ | ||
-device isa-applesmc,osk="ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc" \ | ||
-device usb-ehci,id=ehci \ | ||
-device usb-kbd,bus=ehci.0 \ | ||
-device usb-mouse,bus=ehci.0 \ | ||
-device nec-usb-xhci,id=xhci \ | ||
-device ich9-ahci,id=sata \ | ||
-device ich9-intel-hda -device hda-duplex \ | ||
-device ide-hd,bus=sata.2,drive=OpenCoreBoot \ | ||
-device ide-hd,bus=sata.3,drive=InstallMedia \ | ||
-device ide-hd,bus=sata.4,drive=MacHDD \ | ||
-netdev tap,id=net0,ifname=tap0,script=no,downscript=no -device vmxnet3,netdev=net0,id=net0,mac=52:54:00:c9:18:27 \ | ||
-monitor stdio \ | ||
-vga vmware |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Were these changes tested with Big Sur?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: Every change needs to be tested end-to-end.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They weren't. I couldn't get Big Sur to work due to problems on my end, sorry about that. I figured changes from Catalina should translate over