Closed LeeBinder closed 4 years ago
@LeeBinder Hi, it seems that the L10 doesn't return correct board-id in your case. It should return Mac-827FB448E656EC26
, not Mac-827FB448E656EC26>
, which causes the issue.
MBP15,2 is supported in the script. Please make sure the script is not corrupted, or try the command below to check the board-id is valid or not:
ioreg -lw0 | grep -i "board-id" | sed -e '/[^<]*</s///; s/\"//g; s/\>//'
Great, thanks for the hints - here's my conclusive results:
In Mojave and Catalina, the ioreg-command correctly produces Mac-827FB448E656EC26
In High Sierra (which I need to boot for testing every once in a while) it produces Mac-827FB448E656EC26>
I looked at Clover config.plist in a text and code editor - the line is correct, no duplicate >:
<string>Mac-827FB448E656EC26</string>
Next I booted into High Sierra with other mac models set via Clover Configurator - same thing, always trailing >. So it's not an issue with this particular mac model but with High Sierra.
Output in Hardware Overview is fine:
Also when I only run ioreg -lw0 | grep -i "board-id"
the output format is as expected:
| "board-id" = <"Mac-827FB448E656EC26">
The solution was to add an extra >
into the ioreg command:
ioreg -lw0 | grep -i "board-id" | sed -e '/[^<]*</s///; s/\"//g; s/\>>//'
resulting in correct output Mac-827FB448E656EC26
in High Sierra, and your script continuing and producing appropriate kexts.
However, this only works in High Sierrra. When I run the script with an extra > in Mojave & Catalina, the resulting board-ID string is Mac-827FB448E656EC26>
.
In other words, the script would either need a function with an algorithm like
if macOS-version <=10.13 then
BOARD_ID="$(ioreg -lw0 | grep -i "board-id" | sed -e '/[^<]*</s///; s/\"//g; s/\>>//')"
else
BOARD_ID="$(ioreg -lw0 | grep -i "board-id" | sed -e '/[^<]*</s///; s/\"//g; s/\>//')"
fi
Daliansky has already implemented a remotely similar function in his mod of your script:
which could be modified and used, too (it's just not a real check for version of macOS).
Or, the other approach would be to make the ioreg function which breaks the string down to the mere board-ID compatible with High Sierra, too.
Any which way, from here on it's a downhill ride :)
Here you go:
:)
Thank you for your efforts! The code looks good to me. What about this one, maybe we don't need macOS version detection
ioreg -lw0 | grep -i "board-id" | sed -e '/[^<]*</s///; s/\"//g; s/\>//; s/\>//'
no, same thing in 10.13.6, Mac-827FB448E656EC26>
:( ..
but
ioreg -lw0 | grep -i "board-id" | sed -e '/[^<]*</s///; s/\"//g; s/\>//; s/\>>//'
produces the correct output without trailing >. Haven't tested in macOS >= 10.14 yet, though.
Great. ioreg -lw0 | grep -i "board-id" | sed -e '/[^<]*</s///; s/\"//g; s/\>//; s/\>>//'
works for me in 10.15. I will commit this change, and thank you for your help.
SUCCESS!
ioreg -lw0 | grep -i "board-id" | sed -e '/[^<]*</s///; s/\"//g; s/\>//; s/\>>//'
produces the correct output without trailing > in 10.13 AND 10.14! Haven't tested in macOS 10.15 yet, though.
oh, trans-posting LOL. Great, you're welcome, and thanks to you for this neat and helpful script!
Your board-id is Mac-827FB448E656EC26>
[ ERROR ]: Sorry, your board-id has not been supported yet!
just in case you feel like it, Steve :)
[EDIT]: this might help: https://github.com/daliansky/XiaoMi-Pro-Hackintosh/blob/master/one-key-cpufriend/one-key-cpufriend.sh