Fix misc issues

This commit is contained in:
Mykola Grymalyuk
2020-12-03 13:42:54 -07:00
parent 627bc817d0
commit b25fa91962
5 changed files with 34 additions and 8 deletions

View File

@@ -2,6 +2,9 @@
## 0.0.5
- Enable hibernation support
- Work around USB Map failing
- Add checks whether booting with OpenCore
- Fix MouSSE injection
## 0.0.4
- Add basic audio support for legacy chipsets

View File

@@ -126,4 +126,14 @@ Once you've booted OpenCore at least once, your hardware should now auto boot it
At this time, the OpenCore Patcher won't install macOS onto the internal drive itself during installs. Instead, you'll need to either [manually transfer](https://dortania.github.io/OpenCore-Post-Install/universal/oc2hdd.html) OpenCore to the internal drive's EFI or run this patcher's Option 2 again but select your internal drive.
Reminder that once this is done, you'll need to select OpenCore in the boot picker again for your hardware to remenber this entry and auto boot from then on.
Reminder that once this is done, you'll need to select OpenCore in the boot picker again for your hardware to remenber this entry and auto boot from then on.
### OpenCore won't show up in the boot picker
If OpenCore refuses to show up in the boot picker even with the above troubleshooting step, you can try to disable SIP and run this command(With your EFI drive mounted):
```sh
sudo bless --verbose --file /Volumes/EFI/EFI/OC/Bootstrap/Bootstrap.efi --folder /Volumes/EFI/EFI/OC/Bootstrap --setBoot
```
* Note: NVRAM write is disabled with SIP, so disables SIP first before running

View File

@@ -22,8 +22,17 @@ except NameError:
pass
# Find SMBIOS of machine
current_model = subprocess.Popen("system_profiler SPHardwareDataType".split(), stdout=subprocess.PIPE)
current_model = [line.strip().split(": ", 1)[1] for line in current_model.stdout.read().split("\n") if line.strip().startswith("Model Identifier")][0]
opencore_model = subprocess.Popen(["NVRAM", "4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102:oem-product"], stdout=subprocess.PIPE).communicate()[0]
if opencore_model not in ("NVRAM: Error getting variable - '4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102:oem-product': (iokit/common) data was not found"):
print("Detected OpenCore machine")
opencore_model = subprocess.Popen("nvram 4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102:oem-product".split(), stdout=subprocess.PIPE)
opencore_model = [line.strip().split(":oem-product ", 1)[1] for line in opencore_model.stdout.read().split("\n") if line.strip().startswith("4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102:")][0]
current_model = opencore_model
else:
print("No OpenCore detected")
current_model = subprocess.Popen("system_profiler SPHardwareDataType".split(), stdout=subprocess.PIPE)
current_model = [line.strip().split(": ", 1)[1] for line in current_model.stdout.read().split("\n") if line.strip().startswith("Model Identifier")][0]
print("Current Model: %s" % current_model)
OCExist = False
@@ -71,7 +80,7 @@ def BuildEFI():
if current_model in ModelArray.SSEEmulator:
print("- Adding AAAMouSSE v%s" % Versions.mousse_version)
copy(Versions.mousse_version, Versions.kext_path_build)
copy(Versions.mousse_path, Versions.kext_path_build)
Versions.plist_data = Versions.plist_data.replace(
"<false/><!--AAAMouSSE-->",
"<true/><!--AAAMouSSE-->"
@@ -208,6 +217,10 @@ def BuildEFI():
print("- Adding USB Map for %s" % current_model)
copy(usb_map_path, Versions.kext_path_build)
map_name = ("USB-Map-%s.kext" % current_model)
Versions.plist_data = Versions.plist_data.replace(
"<<false/><!--USBmap-->",
"<true/><!--USBmap-->"
)
Versions.plist_data = Versions.plist_data.replace(
"USB-Map-SMBIOS.kext",
map_name

View File

@@ -448,7 +448,7 @@
<key>Comment</key>
<string>USB Map</string>
<key>Enabled</key>
<true/>
<false/><!--USBmap-->
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
@@ -625,7 +625,7 @@
<key>EnablePassword</key>
<false/>
<key>ExposeSensitiveData</key>
<integer>6</integer>
<integer>15</integer>
<key>HaltLevel</key>
<integer>2147483648</integer>
<key>PasswordHash</key>

View File

@@ -450,7 +450,7 @@
<key>Comment</key>
<string>USB Map</string>
<key>Enabled</key>
<true/>
<false/><!--USBmap-->
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
@@ -629,7 +629,7 @@
<key>EnablePassword</key>
<false/>
<key>ExposeSensitiveData</key>
<integer>6</integer>
<integer>15</integer>
<key>HaltLevel</key>
<integer>2147483648</integer>
<key>PasswordHash</key>