InfiniteMac OSx86

InfiniteMac OSx86 (http://infinitemac.com/forum.php)
-   10.X (http://infinitemac.com/forumdisplay.php?f=36)
-   -   Legacy kernel 10.7.0 with custom dyld (now also with atom patch) (http://infinitemac.com/showthread.php?t=7098)

andyvand 04-12-2011 07:49 AM

Legacy kernel 10.7.0 with custom dyld (now also with atom patch)
 
I updated the sources so that dyld builds with Xcode 4.
This fixed the issue of Finder / SystemUIServer crashing with the custom dyld.
/System/Library/CoreServices/pbs still needs to be packed with upx though.
Also some apps that use Auto::zone::zone (for some ObjC apps) still need packing with upx.
The dyld became faster and more stable with the latest patches though.
On the fly patching works fine (tested it) on any app I've tested it on.
I've also added a new patched kernel with cpu model 15 patch (Atom / new Celeron specific, separate kernel).

Download including sources:
http://rapidshare.com/files/45702217...-AnV-0.4.1.zip

Download Atom / new Celeron kernel:
http://rapidshare.com/files/45702171...ernel_atom.zip

wastez 04-12-2011 09:09 AM

Thatīs fine! Thank you for you hard work!
I will try it today and iīm very agog in the function of the new dyld!!!
Did you use the libunwind from apple or isnīt it available?

Will report immediately after i tried it!

andyvand 04-12-2011 12:35 PM

Quote:

Originally Posted by wastez (Post 53627)
Thatīs fine! Thank you for you hard work!
I will try it today and iīm very agog in the function of the new dyld!!!
Did you use the libunwind from apple or isnīt it available?

Will report immediately after i tried it!

The libunwind from Apple is unfortunetely privately distributed so the only option is changing the exception code to use -lgcc_eh.
This is also why some apps need to be packed with UPX (like pbs).

wastez 04-12-2011 12:45 PM

Tried it and it worked without problems.;)
There are no problems with the dyld this time.:D
pbs have only to be patched in 32 bit mode, or?

Thank you for your great and hard work.
This kernel is really amazing.:cool:

wastez 04-12-2011 08:56 PM

The only software which doesnīt work is garageband and 32 bit mode of cinebench but all other software works without problems.

RobertX 04-13-2011 04:57 AM

hey andy...i'll give it a go too;) ..the first link for intel p4 right?

RobertX 04-13-2011 06:31 AM

seems ok...still sse3 emu probs tho

andyvand 04-13-2011 07:33 AM

Quote:

Originally Posted by wastez (Post 53629)
Tried it and it worked without problems.;)
There are no problems with the dyld this time.:D
pbs have only to be patched in 32 bit mode, or?

Thank you for your great and hard work.
This kernel is really amazing.:cool:

Great, bug 1/2 squashed... ;)

akimoa 04-13-2011 07:49 AM

For some reason me and custom dyld willl never get friends to much programms are not responding and i wont upx them all so no use for me

odin1937 04-13-2011 07:58 AM

Quote:

Originally Posted by andyvand (Post 53626)
I updated the sources so that dyld builds with Xcode 4.
This fixed the issue of Finder / SystemUIServer crashing with the custom dyld.
/System/Library/CoreServices/pbs still needs to be packed with upx though.
Also some apps that use Auto::zone::zone (for some ObjC apps) still need packing with upx.
The dyld became faster and more stable with the latest patches though.
On the fly patching works fine (tested it) on any app I've tested it on.

thanks for the share. I assume that this kernel runs also on amd machines? I am asking cause I am running snow 10.6.7 on amd opteron 185 X2 and nforce4 chipset. :D

Also , any info , how we can pack pbs wih upx , patch it for 32bit mode?:-d

akimoa 04-13-2011 08:11 AM

Get the UPX file from Andys other thread and put him where he belongs after open Terminal and put this

Code:

upx --force /System/Library/CoreServices/pbs
And yes kernel works for AMD

odin1937 04-13-2011 08:20 AM

Quote:

Originally Posted by akimoa (Post 53645)
Get the UPX file from Andys other thread and put him where he belongs after open Terminal and put this

Code:

upx --force /System/Library/CoreServices/pbs
And yes kernel works for AMD

I believe you mean this thread:
Code:

http://osx86.co/f36/10-6-6-legacy-kernel-for-intel-amd-t6892/
.

thank you for the upx command! :D

wastez 04-13-2011 08:30 AM

Quote:

Originally Posted by akimoa (Post 53643)
For some reason me and custom dyld willl never get friends to much programms are not responding and i wont upx them all so no use for me

Last time (10.6.6) i had the same problem but this time almost all works without upx.

odin1937 04-13-2011 08:53 AM

Quote:

Originally Posted by wastez (Post 53647)
Last time (10.6.6) i had the same problem but this time almost all works without upx.

bro , I see from your signature that you use AnVAL Bootloader 5.1.4. Since you have AMD Athlon 64 X2 , do you find anval better for amd than chameleon latest releases? My cpu is amd opteron 185.

wastez 04-13-2011 09:04 AM

Quote:

Originally Posted by odin1937 (Post 53648)
bro , I see from your signature that you use AnVAL Bootloader 5.1.4. Since you have AMD Athlon 64 X2 , do you find anval better for amd than chameleon latest releases? My cpu is amd opteron 185.

In the moment i would use anval for amd. I tried almost every bootloader and this one works at best.
Just try it and you will have no regrets about.

odin1937 04-13-2011 09:27 AM

Quote:

Originally Posted by wastez (Post 53649)
In the moment i would use anval for amd. I tried almost every bootloader and this one works at best.
Just try it and you will have no regrets about.

thanks for the tip! ;)

andyvand 04-13-2011 09:35 AM

Quote:

Originally Posted by odin1937 (Post 53644)
thanks for the share. I assume that this kernel runs also on amd machines? I am asking cause I am running snow 10.6.7 on amd opteron 185 X2 and nforce4 chipset. :D

Also , any info , how we can pack pbs wih upx , patch it for 32bit mode?:-d

No, use my custom upx and pack it (or any other upx).
E.G. upx -9 /System/Library/CoreServices/pbs

odin1937 04-13-2011 09:39 AM

Quote:

Originally Posted by andyvand (Post 53651)
No, use my custom upx and pack it (or any other upx).
E.G. upx -9 /System/Library/CoreServices/pbs

ok thanks , I have decrypted and patched binaries with marvin's amd utility and some amd_insn_patcher , so things should be smooth with upx.

thanks mate!

odin1937 04-13-2011 03:15 PM

I installed the kernel , packed pbs with upx , but during boot I have the : patch_text_segment failed.

When I got online , I saw that nothing from the important stuff was crashing such as finder , disk uitlity , rest utilities , system preferences e.t.c , only safari , seamonkey and radium.

I managed to fix safari with upx , but not seamonkey and radium. Seamonkey had encrypted binaries which have been fixed with marvin's utility.

So i am booting with std_dyld=Yes with no problems.

wastez 04-14-2011 07:17 AM

Quote:

Originally Posted by odin1937 (Post 53654)
I installed the kernel , packed pbs with upx , but during boot I have the : patch_text_segment failed.

When I got online , I saw that nothing from the important stuff was crashing such as finder , disk uitlity , rest utilities , system preferences e.t.c , only safari , seamonkey and radium.

I managed to fix safari with upx , but not seamonkey and radium. Seamonkey had encrypted binaries which have been fixed with marvin's utility.

So i am booting with std_dyld=Yes with no problems.

Thatīs clear because if you use std_kernel=Yes you donīt use the custom dyld which is implemented into the kernel. ;) If you use this kernel flag the kernel differs not to the nawcom kernel.

odin1937 04-14-2011 08:14 AM

Quote:

Originally Posted by wastez (Post 53661)
Thatīs clear because if you use std_kernel=Yes you donīt use the custom dyld which is implemented into the kernel. ;) If you use this kernel flag the kernel differs not to the nawcom kernel.

yes I know bro , but I didn't have other choice at the moment. About Anval's bootloader I was asking , it doesn't support Amd - Aware , which is my case , just for people to know.

Cheers! :D

wastez 04-14-2011 09:01 AM

Quote:

Originally Posted by odin1937 (Post 53662)
yes I know bro , but I didn't have other choice at the moment. About Anval's bootloader I was asking , it doesn't support Amd - Aware , which is my case , just for people to know.

Cheers! :D

Would be interessting to know what for a bootloader does support this?

maya77 04-14-2011 05:20 PM

Short install instructions, please?

I know that kernel must be copied to system root, but what about additional patching you are talking about? What to patch, and how, if that's important part?

odin1937 04-14-2011 06:17 PM

Quote:

Originally Posted by maya77 (Post 53667)
Short install instructions, please?

I know that kernel must be copied to system root, but what about additional patching you are talking about? What to patch, and how, if that's important part?

nothing else to patch , just compress pbs with upx and any other application that is not working!

RobertX 04-14-2011 08:38 PM

...is the sse3 emulator permanently dead?....old asus board here with P4 2.8...i have the kernel booting now...but borked time and installer and stuff make my mac a real pain....:-|

LinearBurn 04-15-2011 06:50 AM

Would patching the libSystem.B.dylib fix this? Seems liek the file is crupted or the on the fly patching is not working

Process: lssave [4349]
Path: /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lssave
Identifier: lssave
Version: ??? (???)
Code Type: X86 (Native)
Parent Process: coreservicesd [51]

Date/Time: 2011-04-14 02:00:53.607 -0500
OS Version: Mac OS X 10.6.7 (10J869)
Report Version: 6

Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000002, 0x0000000000000000
Crashed Thread: 0

Dyld Error Message:
Library not loaded: /usr/lib/libSystem.B.dylib
Referenced from: /System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lssave
Reason: no suitable image found. Did find:
/usr/lib/libSystem.B.dylib: truncated fat file. file length=4022272, but needed slice goes to 4581264
/usr/lib/libSystem.B.dylib: truncated fat file. file length=4022272, but needed slice goes to 4581264

LinearBurn 04-15-2011 06:50 AM

Also how do i build the kernel? is there instructions some were

andyvand 04-15-2011 06:57 AM

Quote:

Originally Posted by LinearBurn (Post 53673)
Also how do i build the kernel? is there instructions some were

With the voodoobuild script but building isn't required.
You can just use the mach_kernel (I assure you, it is built quite well, with latest Xcode tools V4.0)

andyvand 04-15-2011 06:58 AM

Quote:

Originally Posted by LinearBurn (Post 53672)
Would patching the libSystem.B.dylib fix this? Seems liek the file is crupted or the on the fly patching is not working

Process: lssave [4349]
Path: /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lssave
Identifier: lssave
Version: ??? (???)
Code Type: X86 (Native)
Parent Process: coreservicesd [51]

Date/Time: 2011-04-14 02:00:53.607 -0500
OS Version: Mac OS X 10.6.7 (10J869)
Report Version: 6

Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000002, 0x0000000000000000
Crashed Thread: 0

Dyld Error Message:
Library not loaded: /usr/lib/libSystem.B.dylib
Referenced from: /System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lssave
Reason: no suitable image found. Did find:
/usr/lib/libSystem.B.dylib: truncated fat file. file length=4022272, but needed slice goes to 4581264
/usr/lib/libSystem.B.dylib: truncated fat file. file length=4022272, but needed slice goes to 4581264

I doubt it, it seems your upgrade didn't go well...
Truncated means it lacks some bytes... :-/

LinearBurn 04-15-2011 06:59 AM

Is there step by step instructions for installing this kernel and instaling the anv bootloader for amd? This may also sound kinda dumb but shouldnt it be posable to hard embed the cpuid in to the kernel so that the kernel would not have to be patched just like the native cpuid detection it does on the Intel cpu's ... so ultimately you would have a native kernel that don’t need special patching like in Linux it has all the info it needs ... i may sound stupid but I’m trying to learn, but all the doc on the net are either written for hard core or to noob or really ancient or won’t help because I’m running amd. I’m not just trying to learn to do it i want to understand why I’m doing it and the process in doing it

LinearBurn 04-15-2011 07:00 AM

I have installed 4 time and it has failed 4 times if its trunkated dont supose some one can sed me a copy of one that is working?


Ps please forgive me im still adjusting to hackintosh and still showing my noobish

wastez 04-15-2011 08:52 AM

Quote:

Originally Posted by LinearBurn (Post 53676)
Is there step by step instructions for installing this kernel and instaling the anv bootloader for amd? This may also sound kinda dumb but shouldnt it be posable to hard embed the cpuid in to the kernel so that the kernel would not have to be patched just like the native cpuid detection it does on the Intel cpu's ... so ultimately you would have a native kernel that don’t need special patching like in Linux it has all the info it needs ... i may sound stupid but I’m trying to learn, but all the doc on the net are either written for hard core or to noob or really ancient or won’t help because I’m running amd. I’m not just trying to learn to do it i want to understand why I’m doing it and the process in doing it

The dyld is exactly for cpuid autopatching. ;)

Did you boot with std_dyld=Yes? Because if you boot without kernelflags it should use the kernel integrated dyld....

LinearBurn 04-16-2011 12:12 AM

please help me what do i do with the kernel i extracted it and now i have the files do i copy mach_kernel some were? or do somthing in terminal

maya77 04-16-2011 06:57 PM

Quote:

Originally Posted by odin1937 (Post 53668)
nothing else to patch , just compress pbs with upx and any other application that is not working!

Great, but what bolded part means?

LinearBurn 04-16-2011 10:55 PM

Ok i figured it out i moved the mach_kernel to the root then patched the file that was giving me trouble now weverthing is working Anv kernel rocks thanks so much

odin1937 04-17-2011 12:29 PM

Quote:

Originally Posted by maya77 (Post 53700)
Great, but what bolded part means?

download andy's upx from here or any other ready to use upx:

Code:

http://osx86.co/f36/10-6-6-legacy-kernel-for-intel-amd-t6892/
Then put it in your usr/bin/ folder.

Then use the command upx to pack pbs which is located in /System/Library/CoreServices.

The packing - compressing can be done with many commands , such as : upx -9 . which means compress better , or --ultra--brute , or --force e.t.c.

So in the terminal area type : upx -9 "here just drag the pbs binany on terminal" and hit enter.

RayFlower 04-17-2011 11:04 PM

hum, are there any tools that i can use to decrypt these apple binaries?

odin1937 04-18-2011 10:01 AM

Quote:

Originally Posted by RayFlower (Post 53708)
hum, are there any tools that i can use to decrypt these apple binaries?

you can use andy's amd_insn_patcher.

for info:

Code:

http://osx86.co/f36/amd-insn-patcher-instructions-would-be-nice-t6845/

RayFlower 04-18-2011 11:26 AM

uhm, that doesn't decrypt anything though, besides thats done in the kernel now, I only use that to patch some libs that crashes some apps.

Anyhow, if there is a good and safe way to decrypt binaries i would be a lot more likely to use the custom dyld, anyhow nice work andy.

Would be nice if you could explain to us mortals what this does different that the standard dyld for instance:)

vikernes 04-19-2011 08:22 AM

Am I able to start Snow Leopard 10.6.7 in 64bit kernel mode just by copying/pasting the mach_kernel included in the zip and adding the flag -force64?

wastez 04-19-2011 08:52 AM

It is not the 64 bit kernel mode, it is just 64 bit userland. You should also repair the permissions and youīve to check if the bootloader will load the kernel. For that check your boot.plist.

vikernes 04-19-2011 11:26 AM

Sorry for the dumb questions, but I just started learning about all of this a few days ago. Pretty interesting stuff.

So, if I understood well, by drag/dropping the kernel file I'm going to enable 64bit mode for applications, but the kernel will still be run at 32bit? As in, almost every process reporting as intel 64bit kind (in activity monitor) and kernel_task reporting as Intel (32bit) ?

I already managed this, and that's how my system has been running, and so far so good, everything seems to be working OK.

Is there a way to have the kernel_task also in 64bit ? If so, are there many advantages of also having the kernel in 64bit mode, compared to having only 64bit enabled for applications?

Thank you. :)

maya77 04-19-2011 10:31 PM

Quote:

Originally Posted by odin1937 (Post 53707)
download andy's upx from here or any other ready to use upx:

Code:

http://osx86.co/f36/10-6-6-legacy-kernel-for-intel-amd-t6892/
Then put it in your usr/bin/ folder.

Then use the command upx to pack pbs which is located in /System/Library/CoreServices.

The packing - compressing can be done with many commands , such as : upx -9 . which means compress better , or --ultra--brute , or --force e.t.c.

So in the terminal area type : upx -9 "here just drag the pbs binany on terminal" and hit enter.

Thank you very much for your explanation.

But I have no luck with this kernel anyway.

Using nawcom legacy kernel I'm able to run my hackintosh pretty good. The only problem is I must use following flags:
-force64
arch=i386

Some people said that this combination is strange, and no good, but my system won't boot without it.

With AnV kernel I must use same flags to boot + several programs does not work, including iTunes, Smultron, Little Snitch, etc...

Anyone has idea on how to avoid mentioned kernel flags?

-Asus M4A89GTD PRO/USB3
-AMD Phenom II X6 1090T
-16GB DDR3 1333
-Asus GTX-460
-OSX 10.6.7
-Chameleon build752
-Legacy Kernel 10.7.0

RayFlower 04-20-2011 07:48 AM

There is nothing wrong with using the nawcom kernel, Anv kernel has a custom dyld and it does not work with every application.

Your flags look right but also add "std_dyld=yes", it will work the same way as the nawcom kernel.

Custom dyld is a nice project but for me its not usable since I practically live inside Logic.

Just patch the mentioned libs with the amd patcher, i have to patch some extra things with the "amd-ext" patcher to use some AudioUnits plugins though, if you have some problems you just have to go trough the traceback and try to find the lib that crashes your apps, tedious but worth it.

maya77 04-20-2011 08:24 AM

Thanks.

GringoVermelho@InsanelyMac said:
Quote:

Using those flags together normally causes a rift in the time-space continuum that will suck in all living tissue. You're lucky to be alive.

"arch=i386 -force64" forces OS X to run in 32-bit kernel and drivers mode but enables OS X to use the EM64T instruction set of the CPU.
It's an odd combination of flags.

arch=i386 is not necessary when using a Voodoo based (aka legacy) kernel because it runs in 32-bit mode by default.

-force64 is never required, it's an override for 64-bit capable AMD CPUs and pre-Core Microarchitecture Intel CPUs that are running a voodoo based kernel. Some systems will not be able to boot when using -force64, some people will not able to run (some or any) 32-bit apps at all; in other words, it's not enabled by default for a reason.

If you aren't using a Voodoo based Kernel, -force64 does nothing.

andyvand 04-20-2011 08:55 AM

Quote:

Originally Posted by maya77 (Post 53734)
Thank you very much for your explanation.

But I have no luck with this kernel anyway.

Using nawcom legacy kernel I'm able to run my hackintosh pretty good. The only problem is I must use following flags:
-force64
arch=i386

Some people said that this combination is strange, and no good, but my system won't boot without it.

With AnV kernel I must use same flags to boot + several programs does not work, including iTunes, Smultron, Little Snitch, etc...

Anyone has idea on how to avoid mentioned kernel flags?

-Asus M4A89GTD PRO/USB3
-AMD Phenom II X6 1090T
-16GB DDR3 1333
-Asus GTX-460
-OSX 10.6.7
-Chameleon build752
-Legacy Kernel 10.7.0

If you want to use my kernel the same way as the nawcom one following boot arguments:
std_dyld=Yes arch=i386 -force64

wastez 04-20-2011 02:24 PM

Quote:

Using those flags together normally causes a rift in the time-space continuum that will suck in all living tissue. You're lucky to be alive

"arch=i386 -force64" forces OS X to run in 32-bit kernel and drivers mode but enables OS X to use the EM64T instruction set of the CPU.
It's an odd combination of flags.
This user mixed up -force64 and arch=x86_64.
Without it you will start in pure legacy mode and have no chance to run 64 bit software.

andyvand 04-20-2011 02:53 PM

Quote:

Originally Posted by wastez (Post 53742)
This user mixed up -force64 with arch=x86_64.
Without it you will start in pure legacy mode and have no chance to run 64 bit software.

No, arch=i386 -force64 means 32bit kernel space and 64bit userspace
arch=x86_64 means 64bit kernel space and 64bit userspace (no -force64 should be required)

wastez 04-20-2011 03:44 PM

Quote:

Originally Posted by andyvand (Post 53743)
No, arch=i386 -force64 means 32bit kernel space and 64bit userspace
arch=x86_64 means 64bit kernel space and 64bit userspace (no -force64 should be required)

Thatīs exactly that what i mean.

maya77 04-23-2011 08:42 AM

So I don't need to worry about my boot flags. They are safe to use.

Thanks for your explanation, I appreciate that.