Various fixes and updates

mine
Dhiru Kholia 7 years ago
parent 4908cac249
commit 3fb17d0e99

@ -0,0 +1,23 @@
### Credits
* RehabMan, th3joker and others - FakeSMC.kext, https://bitbucket.org/RehabMan
* Chuck Remes (chuckremes) - better documentation
* Meissa - better networking documentation
* PJ Meyer (pjmeyer) - compatibility with modern versions of GNU mktemp
* Robert DeRose (RobertDeRose) and Dirk Bajohr (isolution-de) - macOS support
* Fritz Elfert (felfert) - cleanups, better documentation, and nicer ISO creation script
* Ian McDowell (IMcD23) - more documentation, and better ISO creation script
* voobscout - libvirt XML file
* Evgeny Grin (Karlson2k) - for the original ISO creation script
* Gabriel L. Somlo - for getting things started
* http://www.insanelymac.com/ - Enoch bootloader

@ -128,8 +128,7 @@ for a more solid alternate to the following `virsh` method. Use either the
* For better mouse behavior, install https://github.com/pmj/QemuUSBTablet-OSX and
configure QEMU to use the "usb-tablet" absolute pointing device.
* To get sound on your virtual Mac, install the VoodooHDA driver from
[here](https://sourceforge.net/projects/voodoohda/files/).
* To get sound on your virtual Mac, see the "Virtual Sound Device" in [notes](notes.md).
### Debugging
@ -186,27 +185,7 @@ for a more solid alternate to the following `virsh` method. Use either the
* If the App Store doesn't work, check the [notes file](notes.md) for instructions on how to solve this.
### Credits
* Chuck Remes (chuckremes) - better documentation
* Meissa - better networking documentation
* PJ Meyer (pjmeyer) - compatibility with modern versions of GNU mktemp
* Robert DeRose (RobertDeRose) and Dirk Bajohr (isolution-de) - macOS support
* Fritz Elfert (felfert) - cleanups, better documentation, and nicer ISO creation script
* Ian McDowell (IMcD23) - more documentation, and better ISO creation script
* voobscout - libvirt XML file
* Evgeny Grin (Karlson2k) - for the original ISO creation script
* Gabriel L. Somlo - for getting things started
* http://www.insanelymac.com/ - Enoch bootloader
* If you are getting "Dont_Steal_MacOS" related errors, see `FakeSMC installation` section in [notes file](notes.md).
### References

@ -17,13 +17,14 @@
# Network device "-device e1000-82545em" can be replaced with "-device vmxnet3"
# for possibly better performance.
qemu-system-x86_64 -enable-kvm -m 8192 -cpu Penryn,kvm=off,vendor=GenuineIntel \
qemu-system-x86_64 -enable-kvm -m 3072 -cpu Penryn,kvm=off,vendor=GenuineIntel \
-machine pc-q35-2.4 \
-smp 4,cores=2 \
-usb -device usb-kbd -device usb-mouse \
-device isa-applesmc,osk="ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc" \
-kernel ./enoch_rev2848_boot \
-kernel ./enoch_rev2877_boot \
-smbios type=2 \
-device ich9-intel-hda -device hda-duplex \
-device ide-drive,bus=ide.2,drive=MacHDD \
-drive id=MacHDD,if=none,file=./mac_hdd.img \
-netdev tap,id=net0,ifname=tap0,script=no,downscript=no -device e1000-82545em,netdev=net0,id=net0,mac=52:54:00:c9:18:27 \

@ -503,6 +503,10 @@ else
stage_end_ok "$OSX_inst_ver"
fi
if [[ "$OSX_inst_ver" =~ 10.12.[4-9] ]]; then
exit_with_error "This script might not generate bootable images for versions >= macOS Sierra 10.12.4. Edit this script manually to proceed at your own risk!"
fi
[[ "$OSX_inst_ver" == "10.11" ]] || [[ "$OSX_inst_ver" =~ 10.11.[1-6] ]] || \
echo_warning "Warning! This script is tested only with images of OS X versions 10.11 and 10.11.1-10.11.6. Use at your own risk!"

Binary file not shown.

@ -0,0 +1,284 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>16C67</string>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>FakeSMC</string>
<key>CFBundleIdentifier</key>
<string>org.netkas.driver.FakeSMC</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>FakeSMC</string>
<key>CFBundlePackageType</key>
<string>KEXT</string>
<key>CFBundleShortVersionString</key>
<string>6.24-316-g197d663.1737</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
</array>
<key>CFBundleVersion</key>
<string>1737</string>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>8C1002</string>
<key>DTPlatformVersion</key>
<string>GM</string>
<key>DTSDKBuild</key>
<string>12D75</string>
<key>DTSDKName</key>
<string>macosx10.8</string>
<key>DTXcode</key>
<string>0821</string>
<key>DTXcodeBuild</key>
<string>8C1002</string>
<key>IOKitPersonalities</key>
<dict>
<key>FakeSMC</key>
<dict>
<key>CFBundleIdentifier</key>
<string>org.netkas.driver.FakeSMC</string>
<key>Configuration</key>
<dict>
<key>Clover</key>
<dict>
<key>BEMB</key>
<array>
<string>BEMB</string>
<string>flag</string>
</array>
<key>EPCI</key>
<array>
<string>EPCI</string>
<string>ui32</string>
</array>
<key>RBr</key>
<array>
<string>RBr</string>
<string>ch8*</string>
</array>
<key>REV</key>
<array>
<string>REV</string>
<string>{rev</string>
</array>
<key>RPlt</key>
<array>
<string>RPlt</string>
<string>ch8*</string>
</array>
</dict>
<key>ExceptionKeys</key>
<dict>
<key>CLKH</key>
<integer>1</integer>
<key>CLKT</key>
<integer>1</integer>
<key>MSDW</key>
<integer>1</integer>
<key>NATJ</key>
<integer>1</integer>
<key>NATi</key>
<integer>1</integer>
<key>NTOK</key>
<integer>1</integer>
<key>WKTP</key>
<integer>0</integer>
</dict>
<key>Keys</key>
<dict>
<key>$Adr</key>
<array>
<string>ui32</string>
<data>
AAADAA==
</data>
</array>
<key>$Num</key>
<array>
<string>ui8</string>
<data>
AQ==
</data>
</array>
<key>ACID</key>
<array>
<string>ch8*</string>
<data>
hfwETdgSevQ=
</data>
</array>
<key>FNum</key>
<array>
<string>ui8</string>
<data>
AA==
</data>
</array>
<key>LsNM</key>
<array>
<string>ui8</string>
<data>
AQ==
</data>
</array>
<key>LsbV</key>
<array>
<string>{rev</string>
<data>
AQQKAAY=
</data>
</array>
<key>MSSD</key>
<array>
<string>si8</string>
<data>
BQ==
</data>
</array>
<key>MSSP</key>
<array>
<string>si8</string>
<data>
BQ==
</data>
</array>
<key>NATJ</key>
<array>
<string>ui8</string>
<data>
AA==
</data>
</array>
<key>OSK0</key>
<array>
<string>ch8*</string>
<data>
b3VyaGFyZHdvcmtieXRoZXNld29y
ZHNndWFyZGVkcGw=
</data>
</array>
<key>OSK1</key>
<array>
<string>ch8*</string>
<data>
ZWFzZWRvbnRzdGVhbChjKUFwcGxl
Q29tcHV0ZXJJbmM=
</data>
</array>
<key>REV </key>
<array>
<string>{rev</string>
<data>
ATAPAAAD
</data>
</array>
<key>RVBF</key>
<array>
<string>{rev</string>
<data>
ATAPAAAD
</data>
</array>
<key>RVUF</key>
<array>
<string>{rev</string>
<data>
ATAPAAAD
</data>
</array>
</dict>
<key>Types</key>
<dict>
<key>BEMB</key>
<string>flag</string>
<key>CLKC</key>
<string>{clc</string>
<key>CLKH</key>
<string>{clh</string>
<key>CLKT</key>
<string>ui32</string>
<key>CLWK</key>
<string>ui32</string>
<key>EPCI</key>
<string>flag</string>
<key>LSSS</key>
<string>{lso</string>
<key>MSDS</key>
<string>ui8</string>
<key>MSDW</key>
<string>flag</string>
<key>MSPS</key>
<string>{msp</string>
<key>RPlt</key>
<string>ch8*</string>
</dict>
<key>debug</key>
<false/>
<key>smc-compatible</key>
<string>smc-napa</string>
<key>trace</key>
<false/>
</dict>
<key>IOClass</key>
<string>FakeSMC</string>
<key>IOMatchCategory</key>
<string>FakeSMC</string>
<key>IOProviderClass</key>
<string>AppleACPIPlatformExpert</string>
<key>IOResourceMatch</key>
<string>FakeSMCKeyStore</string>
<key>RM,Build</key>
<string>Release-rehabman</string>
<key>RM,Version</key>
<string>FakeSMC 1737</string>
</dict>
<key>FakeSMCKeyStore</key>
<dict>
<key>CFBundleIdentifier</key>
<string>org.netkas.driver.FakeSMC</string>
<key>IOClass</key>
<string>FakeSMCKeyStore</string>
<key>IOMatchCategory</key>
<string>FakeSMCKeyStore</string>
<key>IOProviderClass</key>
<string>IOResources</string>
<key>IOResourceMatch</key>
<string>IOKit</string>
<key>IOUserClientClass</key>
<string>FakeSMCKeyStoreUserClient</string>
</dict>
</dict>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2015 netkas. All rights reserved.</string>
<key>OSBundleCompatibleVersion</key>
<string>1212</string>
<key>OSBundleLibraries</key>
<dict>
<key>com.apple.iokit.IOACPIFamily</key>
<string>1.0.0d1</string>
<key>com.apple.kpi.bsd</key>
<string>10.6</string>
<key>com.apple.kpi.iokit</key>
<string>10.6</string>
<key>com.apple.kpi.libkern</key>
<string>10.6</string>
<key>com.apple.kpi.mach</key>
<string>10.6</string>
<key>com.apple.kpi.unsupported</key>
<string>10.6</string>
</dict>
<key>OSBundleRequired</key>
<string>Root</string>
<key>Source Code</key>
<string>"https://github.com/RehabMan/OS-X-FakeSMC-kozlek.git"</string>
</dict>
</plist>

Binary file not shown.

@ -0,0 +1,145 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>11G63</string>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>VoodooHDA</string>
<key>CFBundleIdentifier</key>
<string>org.voodoo.driver.VoodooHDA</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>VoodooHDA</string>
<key>CFBundlePackageType</key>
<string>KEXT</string>
<key>CFBundleShortVersionString</key>
<string>2.8.9</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>2.8.9</string>
<key>DTCompiler</key>
<string></string>
<key>DTPlatformBuild</key>
<string>4F1003</string>
<key>DTPlatformVersion</key>
<string>GM</string>
<key>DTSDKBuild</key>
<string>11E52</string>
<key>DTSDKName</key>
<string>macosx10.7</string>
<key>DTXcode</key>
<string>0441</string>
<key>DTXcodeBuild</key>
<string>4F1003</string>
<key>IOKitPersonalities</key>
<dict>
<key>VoodooHDA</key>
<dict>
<key>AllowMSI</key>
<true/>
<key>Boost</key>
<integer>1</integer>
<key>CFBundleIdentifier</key>
<string>org.voodoo.driver.VoodooHDA</string>
<key>DisableInputMonitor</key>
<true/>
<key>IOClass</key>
<string>VoodooHDADevice</string>
<key>IOMatchCategory</key>
<string>VoodooHDADevice</string>
<key>IOPCIClassMatch</key>
<string>0x04020000&amp;0xfffe0000</string>
<key>IOProviderClass</key>
<string>IOPCIDevice</string>
<key>IOUserClientClass</key>
<string>VoodooHDAUserClient</string>
<key>InhibitCache</key>
<false/>
<key>MixerValues</key>
<dict>
<key>PCM</key>
<integer>90</integer>
<key>Rec</key>
<integer>90</integer>
<key>iGain</key>
<integer>90</integer>
<key>iMix</key>
<integer>90</integer>
</dict>
<key>NodesToPatch</key>
<array>
<dict>
<key>Caps</key>
<string>0x373e</string>
<key>Codec</key>
<integer>4</integer>
<key>Comment</key>
<string>Example of possible values</string>
<key>Config</key>
<string>0x90a70120</string>
<key>Conns</key>
<string>12,13,24</string>
<key>Control</key>
<string>20</string>
<key>DAC</key>
<string>2</string>
<key>Enable</key>
<string>1</string>
<key>Node</key>
<integer>12</integer>
<key>Select</key>
<string>13</string>
<key>SwitchCh</key>
<string>0</string>
<key>Type</key>
<string>4</string>
</dict>
<dict>
<key>Codec</key>
<integer>2</integer>
<key>Comment</key>
<string>To disable back sound on ALC codec set enable=0</string>
<key>Enable</key>
<string>1</string>
<key>Node</key>
<integer>11</integer>
</dict>
</array>
<key>Noise</key>
<integer>0</integer>
<key>Vectorize</key>
<true/>
<key>VoodooHDAEnableHalfMicVolumeFix</key>
<false/>
<key>VoodooHDAEnableHalfVolumeFix</key>
<false/>
<key>VoodooHDAEnableMuteFix</key>
<false/>
<key>VoodooHDAEnableVolumeChangeFix</key>
<false/>
<key>VoodooHDAVerboseLevel</key>
<integer>0</integer>
</dict>
</dict>
<key>OSBundleLibraries</key>
<dict>
<key>com.apple.iokit.IOAudioFamily</key>
<string>1.1fc9</string>
<key>com.apple.iokit.IOPCIFamily</key>
<string>2.1</string>
<key>com.apple.kpi.iokit</key>
<string>9.0.0</string>
<key>com.apple.kpi.libkern</key>
<string>9.0.0</string>
<key>com.apple.kpi.mach</key>
<string>9.0.0</string>
<key>com.apple.kpi.unsupported</key>
<string>9.0.0</string>
</dict>
</dict>
</plist>

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildVersion</key>
<string>1</string>
<key>CFBundleShortVersionString</key>
<string>2.8.9</string>
<key>CFBundleVersion</key>
<string>2.8.9</string>
<key>ProjectName</key>
<string>VoodooHDA</string>
<key>SourceVersion</key>
<string>0280900</string>
</dict>
</plist>

@ -0,0 +1,3 @@
VoodooHDA.kext-289.zip
RehabMan-FakeSMC-2017-0117.zip

@ -44,6 +44,11 @@
<memballoon model='none'/>
</devices>
<qemu:commandline>
<qemu:arg value='-usb'/>
<qemu:arg value='-device'/>
<qemu:arg value='usb-mouse,bus=usb-bus.0'/>
<qemu:arg value='-device'/>
<qemu:arg value='usb-kbd,bus=usb-bus.0'/>
<qemu:arg value='-device'/>
<qemu:arg value='isa-applesmc,osk=ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc'/>
<qemu:arg value='-smbios'/>

@ -13,6 +13,9 @@ Finally reboot, and then use the App Store without problems.
This fix was found by Glnk2012 of https://www.tonymacx86.com/ site.
Also tweaking the `SMBios.plist` file using `Chameleon Wizard` can help with
App Store problems.
### Enoch Bootloader
* Download Enoch bootloader from http://www.insanelymac.com/forum/ (requires
@ -24,6 +27,68 @@ This fix was found by Glnk2012 of https://www.tonymacx86.com/ site.
* Rename boot to enoch_rev####_boot.
### FakeSMC installation
* Do the following steps as `root` user on the Virtual Machine (VM).
```
cp -a FakeSMC.kext /System/Library/Extensions/
cd /System/Library/Extensions/
chmod -R 755 FakeSMC.kext
chown -R root:wheel FakeSMC.kext
rm -R /System/Library/Caches/com.apple.kext.caches
touch /System/Library/Extensions && kextcache -u / # optional step
```
* Remove the `-device isa-applesmc,osk=... \` line completely from `boot*.sh` file(s).
* If you are using the `virsh` boot method, then remove the following lines from your `virsh` XML file,
```
<qemu:arg value='-device'/>
<qemu:arg value='isa-applesmc,osk=XXX'/>
```
* Reboot the VM for changes to take effect. Use `kextstat` to verify that `FakeSMC.kext` is loaded.
* Latest `FakeSMC.kext` version can be downloaded from [this location](https://bitbucket.org/RehabMan/os-x-fakesmc-kozlek).
* If your updated VM is failing to boot and it doesn't have `FakeSMC.kext` installed, the following steps can used to inject `FakeSMC.kext` into the VM disk image,
```
$ sudo modprobe nbd # all steps to be executed on the QEMU/KVM host
$ sudo qemu-nbd -c /dev/nbd0 -n mac_hdd.img
$ sudo fdisk -l /dev/nbd0
...
Device Start End Sectors Size Type
/dev/nbd0p1 40 409639 409600 200M EFI System
/dev/nbd0p2 409640 132948151 132538512 63.2G Apple HFS/HFS+
/dev/nbd0p3 132948152 134217687 1269536 619.9M Apple boot
$ sudo kpartx -a /dev/nbd0
$ mkdir mnt
$ sudo mount -t hfsplus -o force,rw /dev/mapper/nbd0p2 mnt
$ cd mnt
$ ls
Applications bin Chameleon.Backups cores dev etc...
# Install FakeSMC.kext using the above mentioned steps
$ cd ..
$ sudo umount mnt
$ sudo kpartx -d /dev/nbd0
$ sudo qemu-nbd -d /dev/nbd0
```
### Enoch Bootloader (alternate extraction method)
* Build xar from http://mackyle.github.io/xar/ on a Linux box.
@ -69,11 +134,37 @@ is provided for this unmaintained project!
<string>vmw_options_fb=0x06</string>
```
Thanks to Kfir Ozer for finding this.
Thanks to Zhang Tong and Kfir Ozer for finding this.
GPU passthrough is out of scope for this project. No support for it is provided
whatsoever.
### Virtual Sound Device
No support is provided for this. You are on your own. The sound output is known
to be choppy and distorted.
* Add `-device ich9-intel-hda -device hda-duplex` to the VM configuration.
`boot-macOS.sh` already has this change.
* To get sound on your virtual Mac, install the VoodooHDA driver from
[here](https://sourceforge.net/projects/voodoohda/files/).
### Building QEMU from source
See http://wiki.qemu-project.org/Hosts/Linux for help.
```
$ git clone https://github.com/qemu/qemu.git
$ cd qemu
$ ./configure --prefix=/home/$(whoami)/QEMU --target-list=x86_64-softmmu --audio-drv-list=pa
$ make clean; make; make install
```
### Boot Notes
Type the following after boot,
@ -117,3 +208,5 @@ Release Date: October 21, 2015
``jar -xf <zipfile>`` is pretty neat.
Move 'InstallESD.dmg' to '/Applications/Install OS X El Capitan.app/Contents/SharedSupport/InstallESD.dmg' location.
Move 'InstallESD.dmg' to '/Applications/Install macOS Sierra.app/Contents/SharedSupport/' location (for macOS Sierra).

Loading…
Cancel
Save