Skip to content

Commit b25fa91

Browse files
committed
Fix misc issues
1 parent 627bc81 commit b25fa91

File tree

5 files changed

+34
-8
lines changed

5 files changed

+34
-8
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
## 0.0.5
44
- Enable hibernation support
5+
- Work around USB Map failing
6+
- Add checks whether booting with OpenCore
7+
- Fix MouSSE injection
58

69
## 0.0.4
710
- Add basic audio support for legacy chipsets

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,4 +126,14 @@ Once you've booted OpenCore at least once, your hardware should now auto boot it
126126

127127
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.
128128

129-
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.
129+
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.
130+
131+
### OpenCore won't show up in the boot picker
132+
133+
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):
134+
135+
```sh
136+
sudo bless --verbose --file /Volumes/EFI/EFI/OC/Bootstrap/Bootstrap.efi --folder /Volumes/EFI/EFI/OC/Bootstrap --setBoot
137+
```
138+
139+
* Note: NVRAM write is disabled with SIP, so disables SIP first before running

Resources/BuildOpenCore.py

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,17 @@
2222
pass
2323

2424
# Find SMBIOS of machine
25-
current_model = subprocess.Popen("system_profiler SPHardwareDataType".split(), stdout=subprocess.PIPE)
26-
current_model = [line.strip().split(": ", 1)[1] for line in current_model.stdout.read().split("\n") if line.strip().startswith("Model Identifier")][0]
25+
opencore_model = subprocess.Popen(["NVRAM", "4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102:oem-product"], stdout=subprocess.PIPE).communicate()[0]
26+
if opencore_model not in ("NVRAM: Error getting variable - '4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102:oem-product': (iokit/common) data was not found"):
27+
print("Detected OpenCore machine")
28+
opencore_model = subprocess.Popen("nvram 4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102:oem-product".split(), stdout=subprocess.PIPE)
29+
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]
30+
current_model = opencore_model
31+
else:
32+
print("No OpenCore detected")
33+
current_model = subprocess.Popen("system_profiler SPHardwareDataType".split(), stdout=subprocess.PIPE)
34+
current_model = [line.strip().split(": ", 1)[1] for line in current_model.stdout.read().split("\n") if line.strip().startswith("Model Identifier")][0]
35+
print("Current Model: %s" % current_model)
2736

2837
OCExist = False
2938

@@ -71,7 +80,7 @@ def BuildEFI():
7180

7281
if current_model in ModelArray.SSEEmulator:
7382
print("- Adding AAAMouSSE v%s" % Versions.mousse_version)
74-
copy(Versions.mousse_version, Versions.kext_path_build)
83+
copy(Versions.mousse_path, Versions.kext_path_build)
7584
Versions.plist_data = Versions.plist_data.replace(
7685
"<false/><!--AAAMouSSE-->",
7786
"<true/><!--AAAMouSSE-->"
@@ -208,6 +217,10 @@ def BuildEFI():
208217
print("- Adding USB Map for %s" % current_model)
209218
copy(usb_map_path, Versions.kext_path_build)
210219
map_name = ("USB-Map-%s.kext" % current_model)
220+
Versions.plist_data = Versions.plist_data.replace(
221+
"<<false/><!--USBmap-->",
222+
"<true/><!--USBmap-->"
223+
)
211224
Versions.plist_data = Versions.plist_data.replace(
212225
"USB-Map-SMBIOS.kext",
213226
map_name

payloads/Config/v0.6.3/config.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@
448448
<key>Comment</key>
449449
<string>USB Map</string>
450450
<key>Enabled</key>
451-
<true/>
451+
<false/><!--USBmap-->
452452
<key>MaxKernel</key>
453453
<string></string>
454454
<key>MinKernel</key>
@@ -625,7 +625,7 @@
625625
<key>EnablePassword</key>
626626
<false/>
627627
<key>ExposeSensitiveData</key>
628-
<integer>6</integer>
628+
<integer>15</integer>
629629
<key>HaltLevel</key>
630630
<integer>2147483648</integer>
631631
<key>PasswordHash</key>

payloads/Config/v0.6.4/config.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@
450450
<key>Comment</key>
451451
<string>USB Map</string>
452452
<key>Enabled</key>
453-
<true/>
453+
<false/><!--USBmap-->
454454
<key>MaxKernel</key>
455455
<string></string>
456456
<key>MinKernel</key>
@@ -629,7 +629,7 @@
629629
<key>EnablePassword</key>
630630
<false/>
631631
<key>ExposeSensitiveData</key>
632-
<integer>6</integer>
632+
<integer>15</integer>
633633
<key>HaltLevel</key>
634634
<integer>2147483648</integer>
635635
<key>PasswordHash</key>

0 commit comments

Comments
 (0)