InfiniteMac OSx86  


Reply
 
Thread tools Display modes
  #1  
Old 01-03-2011, 08:08 PM
danfloun danfloun is offline
Cheetah
 
Join Date: Jan 2011
Posts: 8
amd_insn_patcher - Instructions would be nice!

Okay so it may be a simple procedure but I can't find nothing of any use on google about the useage of amd_insn_patcher. This confusion arises because stuff seems to change that rapidly, that unless you've been following all this from day one it's just information overload for the rest of us.

One thread I read said that I only needed to patch the bindings, but that was x64 specific, another thread was half the info I needed and assumed we are all geeks

So please, can someone tell me how to patch this damn 10.6.5 Legacy Kernel please!

The amd_insn_patcher zip contains;

amd_insn_patcher
amd_insn_patcher_ext
insn_patcher.c
insn_patcher.h
.DS_Store
Makefile

I assume the .DS_Store is irrelevant.
So what do i do with the rest? /usr/bin /usr/lib?

Yours frustratedly
Danny
Reply With Quote
  #2  
Old 01-03-2011, 09:00 PM
andyvand's Avatar
andyvand andyvand is offline
 
Join Date: Apr 2009
Location: Tienen
Posts: 515
That instruction patcher was designed by me.
You don't need to patch the kernel with it, you can use it to patch /usr/lib/libSystem.B.dylib and any other binaries (containing cpuid's).
From within terminal (install amd_insn_patcher from folder to /usr/bin first) you can use it like this:
amd_insn_patcher <input_file> <output_file>
mv <ouput_file> <input_file>
-> First command makes a patched version (output file is only created if instructions to patch are found) and the second command replaces the original file with the patched file.
amd_insn_patcher_ext is the same but with some extensions for patching up some SSE3 instructions to their SSE2 variants.
Hope this helps you...
Oh yeah, forgot to mention: after patching libSystem.B.dylib you need to update prebinding by running following command:
sudo update_dyld_shared_cache
Reply With Quote
  #3  
Old 01-03-2011, 11:43 PM
danfloun danfloun is offline
Cheetah
 
Join Date: Jan 2011
Posts: 8
Hi,

That's great thanks.
Just what I required!

But, how do I know which binaries need patching? I guess I don't, so am I supposed to try every single binary or just those such as QuickTime, safari iTunes etc?

And when you say the _patcher_ext is for some extensions, by that do you mean kexts?

You obviously put a lot of time into the project and community and for that I thank you.

Cheers
Danny
Reply With Quote
  #4  
Old 01-04-2011, 12:46 AM
fumoboy007 fumoboy007 is offline
Jaguar
 
Join Date: Jul 2010
Posts: 40
Quote:
Originally Posted by danfloun View Post
But, how do I know which binaries need patching? I guess I don't, so am I supposed to try every single binary or just those such as QuickTime, safari iTunes etc?
Since you are using the new legacy kernel, on the fly CPUID patching is available by the kernel. So, you only need to patch:
Code:
/System/Library/QuickTime/QuickTimeComponents.component/Contents/MacOS/QuickTimeComponents
If you are running in 64-bit mode, also patch:
Code:
/usr/lib/libSystem.B.dylib
/usr/lib/dyld
I'm not sure about the dyld one but whatever; it doesn't hurt to patch it anyways.

Last edited by fumoboy007; 01-04-2011 at 12:55 AM.
Reply With Quote
  #5  
Old 01-04-2011, 12:51 AM
fumoboy007 fumoboy007 is offline
Jaguar
 
Join Date: Jul 2010
Posts: 40
Quote:
Originally Posted by danfloun View Post
And when you say the _patcher_ext is for some extensions, by that do you mean kexts?
No, Andy is saying that amd_insn_patcher_ext contains some extra functionality
Quote:
Originally Posted by andyvand View Post
for patching up some SSE3 instructions to their SSE2 variants.
Reply With Quote
  #6  
Old 01-04-2011, 12:57 AM
fumoboy007 fumoboy007 is offline
Jaguar
 
Join Date: Jul 2010
Posts: 40
Also, since you have an AMD Athlon 64 X2 processor, you will probably need this too: AMD Dual-Core Optimizer for Snow Leopard.
Reply With Quote
  #7  
Old 01-04-2011, 01:12 AM
danfloun danfloun is offline
Cheetah
 
Join Date: Jan 2011
Posts: 8
Quote:
Originally Posted by fumoboy007 View Post
Also, since you have an AMD Athlon 64 X2 processor, you will probably need this too: AMD Dual-Core Optimizer for Snow Leopard.
Hey,

Thanks for that.
I'm far more clued up now.

Regarding the optimizer, I already installed that earlier today. I saw some cpu time sync issues in the error logs just after looking through these forums and installed it to find it fixed the problem. I should maybe post there to let the dev know it's working for me.

Thanks again for taking the time to help.
It's been a long time since I was digging into stuff this deep, last time it was the early versions of gentoo Linux on a thinkpad t21..... I was well fed up, all those hours of compiling crap to no avail.

Cheers
Danny

Last edited by danfloun; 01-04-2011 at 01:14 AM.
Reply With Quote
  #8  
Old 01-04-2011, 10:03 PM
AVO-Electronics AVO-Electronics is offline
Puma
 
Join Date: Jan 2011
Posts: 15
Quote:
Originally Posted by fumoboy007 View Post

If you are running in 64-bit mode, also patch:
Code:
/usr/lib/libSystem.B.dylib
/usr/lib/dyld
Do not patch those two if you are presently running in x86 mode, it kills you're mac!


ASUS Crosshair MCP590 SLI | AMD Athlon™ 64 X2 Dual-Core 6400+ 3.2GHz | CORSAIR XMS2 6400C4 4GB | GeForce 7300LE 256MB Poo Edition | WD Velociraptor SATAII 10,000rpm 150GB | WD Raptor SATAI 10,000rpm 74GB | SONY DVD±RW SATAI | Snow Leopard 10.6.x - Testing Legacy Kernel 10.6.5 V2

Last edited by AVO-Electronics; 01-04-2011 at 10:09 PM.
Reply With Quote
  #9  
Old 09-12-2012, 01:54 AM
bcoco85 bcoco85 is offline
Cheetah
 
Join Date: Nov 2011
Posts: 5
im not really sure what this tool is for. what i can see in forums is that lets you have more than 4gb ram, and lets you fix some 32 bits apps when running in 64 bits (arch=i386 -force64)

there is a c file that contains this in the header
*
* instruction length decoder (written by kaitek, modified by mercurysquad)
* voodoo xnu kernel
*
* based on code from AntiHookExec 1.00, Copyright (c) 2004 Chew Keong TAN
* opcode tables based on documentation from http://www.sandpile.org/
*
* todo: * support for instruction set extensions newer than SSSE3
* * verify that VT instructions are correctly decoded
* AnV - Added better opcode + SSE4.1 + SSE4.2 support
*/
also, i found 2 versions of the same tool. both with the same header but different size

one doubt: if you path those files () with this tool, does it lets you start with arch=x86_64 with a 10.6.8 legacy kernel?

best regards

Last edited by bcoco85; 09-12-2012 at 01:59 AM.
Reply With Quote
  #10  
Old 02-09-2013, 10:20 AM
daksi99 daksi99 is offline
Cheetah
 
Join Date: Mar 2011
Posts: 1
syntax error near unexpected taken '<' HELP!



💡 Deploy cloud instances seamlessly on DigitalOcean. Free credits ($100) for InfMac readers.

Reply With Quote