Jump to content

10.6.6 legacy kernel for INTEL/AMD 32+64bit ready to download by qoopz/nawcom/AnV/BlackKnight/mucha


  • Please log in to reply
77 replies to this topic

#1
nawcom

nawcom

    InsanelyMac Protégé

  • Retired Developers
  • 69 posts
  • Gender:Male
  • Location:localhost
  • Interests:Mind {censored}. Telephony.
Here is the new installer package for legacy kernel for OS X 10.6.6 / Darwin 10.6.0. This has all the same features as the previous release but added LGA1555 Sandy Bridge CPU recognition to the current support for newer Intel processors. Have fun, let me know of any issues that you might run into. I have PMed AnV and if he sees anything else new he wishes to add as well I will definitely update this if there is any to be added.

Installer pkg (fastest link): http://dl.nawcom.com...-10.6.0.pkg.zip

Link from my home server (slow as hell): http://nawcom.com/os...-10.6.0.pkg.zip

Current source diff: http://nawcom.com/os...-1504.9.26.diff

Here’s the tarball for xnu: http://www.opensourc...504.9.26.tar.gz

The installer does the same thing as before – it will update your SleepEnabler kext (only if you have one installed) as well as do any patching needed for AMD people. FYI there’s actually no patching needed if you updated from 10.6.5->10.6.6. They hardly changed anything in the update.

If anyone can add support to this kernel, you are welcome to do so. We of course can’t stop you from doing your own release, just remember and understand that parts of the kernel is released under APSL which requires you to release the source. The intent of the legacy kernel is to maintain a collaborative effort of releasing a kernel for supporting all unsupported x86 CPUs, just like OS X 10.5′s voodoo-xnu project. Full credit goes to your code changes, as we don’t hide any of the changes or put them under someone elses name, and if you feel like your name should be someplace in it, we're more than likely be glad to give you the missing credit.

I've started a google-code page at http://code.google.com/p/xnu-legacy/ and I'm going to get everyone who's contributed as owners of the project. This will be a much easier way to communicate with source code updates IMO. PM me if I haven't PMed you about that, if you have contributed code to the kernel.
  • iDo likes this

#2
valv

valv

    InsanelyMac Architect

  • Members
  • PipPipPipPipPipPipPip
  • 910 posts
  • Gender:Male
  • Location:Unrevealed Area
  • Interests:Operating Systems<br />Networking<br />Security
Thank u for this nawcom
Keep up the good work ;)

#3
dickhouse

dickhouse

    InsanelyMac Protégé

  • Members
  • PipPip
  • 71 posts
  • Gender:Male
  • Location:The Gunners HomeTown
Go..go..go! nawcom thanks man! :star_smile:

#4
.picodev

.picodev

    Insanelymac Ninja

  • Members
  • PipPipPip
  • 158 posts
  • Gender:Male
  • Location:Serbia
Picked up from bitchblog the second mr. nawcom posted. :( Already tested,done and dusted.Works.

#5
Jamesisnotonfire

Jamesisnotonfire

    InsanelyMac Protégé

  • Members
  • PipPip
  • 77 posts
  • Gender:Male
  • Location:Bracknell UK
Thanks Nawcom :D

Thanks Nawcom :D

#6
mohdumar

mohdumar

    InsanelyMac Protégé

  • Members
  • PipPip
  • 84 posts
its working on my p4 650

http://www.insanelym...p...t&p=1622664

#7
Andy Vandijck

Andy Vandijck

    InsanelyMac Deity

  • Coders
  • 1,693 posts
  • Gender:Male
  • Location:Tienen
  • Interests:Programming stuff for Mac OS X...
    Hacking...
    Hard rock (also really big Metallica...
I updated the latest patch to include a custom dyld.
The dyld has also been rebased for security purposes (patch for rebase included in patched/ld...) and has been pre-patched for sysenter purposes (eliminates need for kernel patching custom dyld).
Make sure you pack /System/Library/CoreServices/pbs with upx in order to make it work with the custom dyld.
NOTE: This dyld is beta because we don't have libunwind from Apple.
Some apps may need to be patched with upx in order to let them work.
You can always boot with std_dyld=Yes to skip the patched dyld and use Apple one instead.

So without further delay, the download to the patched kernel:
http://rapidshare.co...d-AnV-0.4.0.zip

#8
Mohamed Khairy

Mohamed Khairy

    InsanelyMac Deity

  • Members
  • PipPipPipPipPipPipPipPipPipPip
  • 2,172 posts
  • Gender:Male

I updated the latest patch to include a custom dyld.
The dyld has also been rebased for security purposes (patch for rebase included in patched/ld...) and has been pre-patched for sysenter purposes (eliminates need for kernel patching custom dyld).
Make sure you pack /System/Library/CoreServices/pbs with upx in order to make it work with the custom dyld.
NOTE: This dyld is beta because we don't have libunwind from Apple.
Some apps may need to be patched with upx in order to let them work.
You can always boot with std_dyld=Yes to skip the patched dyld and use Apple one instead.

So without further delay, the download to the patched kernel:
http://rapidshare.co...d-AnV-0.4.0.zip

thanks andy for good work :)

#9
nefilim

nefilim

    InsanelyMac Protégé

  • Members
  • Pip
  • 42 posts
i've got this kernel running on my system:

gigabyte P67A-UD3 with i5-2500k CPU and 8800GT (for now, GTX 470 is laying here in waiting).

i used the dsdt and kexts from this post:

http://www.insanelym...howtopic=243207

i basically just installed them on a running system (gigabyte P35 + C2Q) and then rebooted from the same drive with the new hardware in place.

i have two problems:

1. usb (bus?) seems to stutter when there's is no cpu load, i can see this with a laggy/jumpy mouse and by holding a key down on my usb keyboard.
2. stuttering sound, both when using the headphone out (ALC892) and using USB headset (i really thought latter would at least work - and did work fine with my previous P35 + C2Q setup, exact same 10.6.6 installation).

the mouse smooths out nicely when there's a little load on the system, usually just the flash plugin in chrome is enough to do that. no fix yet for the sound though :P

#10
LeXa2

LeXa2

    InsanelyMac Protégé

  • Members
  • PipPip
  • 85 posts
  • Gender:Male
  • Location:Moscow, Russian Federation
  • Interests:IT, *nix, SciFi

I updated the latest patch to include a custom dyld...

Andy, nawcom, thanks again for your work over this project.

I'm wondering about the patch you had posted a link to: what is the background in a two words?

I've been following the process of development xnu-kernel patches for a while now and as far as I remember correctly one of the latest bits required to provide "patch-free" Mac OS X experience for AMD CPU users was the creation of non-standard version of dynamic loader that would be capable of auto-patching dloaded libs to be free of cpuid checks and to be compatible with AMD64 way of doing system calls. It the patch you had posted the link to expected to replace Apple's vanilla dynamic loader with a custom version that would do exactly what I had just described?

Also, is this patch a complement or a replacement to the compiled legacy kernel nawcom had posted at the first post in this thread?

#11
nefilim

nefilim

    InsanelyMac Protégé

  • Members
  • Pip
  • 42 posts
please be patient with my layman's terms, my day job is filled with java, completely out of my element here :(

my BIOS is set to 100Mhz BCLK and 33x multiplier, stock standards for a i5-2500k.

dug into this a bit more, stutter seems related to the bus speed and hence TSC increment being calculated incorrectly:

without kernel busratio flag:

rtclock_init: Taking bus ratio path 4 (Intel / Apple)
TSC: Reported FSB:  100.0000MHz, corrected FSB:  411.563665MHz
TSC: Verification of clock speed failed. Fallback correction was performed. Please upgrade bootloader.
TSC: Frequency =   3292.509320MHz, FSB frequency =  411.563665MHz, bus ratio = 8

and with the kernel busratio=33 flag:

rtclock_init: Taking bus ratio path 0 (Boot-time argument)
TSC: Reported FSB:  100.0000MHz, corrected FSB:  940.724834MHz
TSC: Verification of clock speed failed. Fallback correction was performed. Please upgrade bootloader.
TSC: Frequency =   3292.536920MHz, FSB frequency =  940.724834MHz, bus ratio = 3.5

problem seems MUCH worse in latter case, adding to my suspicion of the source of the problem. in the latter case of a supplied busratio, 33 is being disregarded as invalid, being > 30 and not a factor of 10:

+ 		case BUSRATIO_BOOTFLAG:
+ 			/* tscGranularity was already set. However, check for N/2. N/2 is specified by
+ 			 * giving a busratio of 10 times what it is (so last digit is 5). We set a cutoff
+ 			 * of 30 before deciding it's n/2. TODO: find a better way */
+ 			if (tscGranularity == 0) tscGranularity = 1; // avoid div by zero
+ 			N_by_2_bus_ratio = (tscGranularity > 30) && ((tscGranularity % 10) != 0);
+ 			if (N_by_2_bus_ratio) tscGranularity /= 10; /* Scale it back to normal */
+ 			break;

perhaps the cutoff limit could be move to 40 or 50 for the time being? give the overclockers some room to play ;)

without specifying the busratio, going the intel/apple MSR way seems to get the wrong values unfortunately, no ideas.

i assume the sound drivers are clocked off the RTC and not the HPET, could anyone give me a one or two liner of the real facts? would love to learn more :)

finally, thanks for all this work, just looking at the size of the diff is humbling :)

#12
nefilim

nefilim

    InsanelyMac Protégé

  • Members
  • Pip
  • 42 posts
just to follow up, i've confirmed this as the problem. when i set the bios to 100mhz and multiplier to 29x and set the kernel flag busratio to 29x everything works perfectly, mouse is very smooth, usb audio works 100%.

#13
maleorderbride

maleorderbride

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 291 posts
  • Gender:Male

just to follow up, i've confirmed this as the problem. when i set the bios to 100mhz and multiplier to 29x and set the kernel flag busratio to 29x everything works perfectly, mouse is very smooth, usb audio works 100%.



Just to add to the precise problem. The booloader and its auto-detect FSB is certainly a problem at 30-34 multi. However, at 40+ I can get Anval loader to properly validate my CPU speed and multi. The problem is that the 10.6.6 Quoopz kernel panics with an RTClock init error.

I assume that can be fixed within the Quoopz kernel? It would be lovely to be able to use my 4.5Ghz overclock!

#14
bcc9

bcc9

    InsanelyMac Legend

  • Coders
  • 1,281 posts
  • Gender:Male

just to follow up, i've confirmed this as the problem. when i set the bios to 100mhz and multiplier to 29x and set the kernel flag busratio to 29x everything works perfectly, mouse is very smooth, usb audio works 100%.

Thank you, I was having the exact same problems with my new core i7-2600k install. Stuttery alc892 audio, and screen/usb io that seems to freeze for ~5 seconds every minute or so.
I'm booting in 64 bit mode (since I have 8GB of memory), so the workaround of busratio=29 doesn't work without also specifying the fsb. So I used:
busratio=29 fsb=1000000000 for my cpu.
This improves the audio, but the audio buffer ring replays old samples a lot of the time, and the system is less responsive than with the default values.

Is there a chameleon rc5 build that sets the ratios correctly? There must be since everyone isn't reporting these problems.

PS: Thanks to Nawcom&team for the custom kernel.

#15
nefilim

nefilim

    InsanelyMac Protégé

  • Members
  • Pip
  • 42 posts
interesting, these are my kernel flags:

<key>Kernel Flags</key>
	<string>arch=x86_64 busratio=29 -v debug=0x144 </string>

using 12GB of RAM.

no need to specify the FSB here. i do use the AnVAL boot/ACPI loader (based on RC5 - http://www.insanelym...owtopic=216726), it does a pretty good job at detecting CPU and board features.

i might spend some time soon on porting some of the FSB detection code from AnVAL to nawcom kernel, see how that works.

#16
M@dMac

M@dMac

    InsanelyMac Protégé

  • Members
  • PipPip
  • 55 posts
  • Gender:Male
  • Location:Mérida, Venezuela
hi andy, I'm a bit curious about your lines where you advice to use upx to pack pbs binary, I mention this because I tried to find an upx tool and found nothing for darwin, so I had to download the sources along the tools needed for it to compile and I did it so I could have an UB version of upx and packed it so it would weight less and also I posted the resulting file... so my question is: where should anyone else go to get the tool? is mine useful in any way? if so, or not, would you post links to where people would find a version you advice anyone to use? and btw... THANKS!!! it's awesome to have your help, and thanks to nawcom/everyone involved!

#17
rashan

rashan

    InsanelyMac Protégé

  • Members
  • PipPip
  • 90 posts
  • Location:U.S.S.R.
thx alot!
just updated and got kp, with the argument "kernel version - cpu version mismatch"
is there a way to install this kernel from within windows (hfs access through paragon hfs)?

or how do install this from inside OSX Installer through terminal (assuming the pkg is at the root of a usbflash) ?

or, assuming i've got a fresh install, do i first install this and then update from 10.6.3 to 6.4?

#18
bcc9

bcc9

    InsanelyMac Legend

  • Coders
  • 1,281 posts
  • Gender:Male

<key>Kernel Flags</key>
		   <string>arch=x86_64 busratio=29 -v debug=0x144 </string>

using 12GB of RAM.

no need to specify the FSB here. i do use the AnVAL boot/ACPI loader (based on RC5 - http://www.insanelym...owtopic=216726), it does a pretty good job at detecting CPU and board features.

i might spend some time soon on porting some of the FSB detection code from AnVAL to nawcom kernel, see how that works.

Strange, when I boot in 64 bit, with busratio set, and chameleon rc5, the kernel reports:
TSC: Verification of clock speed not available in x86_64.
	 TSC: Frequency =  14067.533103MHz, FSB frequency =  485.87347MHz, bus ratio = 29
Where the frequency is wrong because the FSB is wrong.

anval 5.1.3 sounded promising with the new sandy bridge support, but when I boot that (boot1h and boot installed), the system resets immediately (doesn't even get to a chameleon boot menu).
Update: anval 5.1.4 boots, but with the kernel hanging after "warning: kernel was not built with custom dyld blob"
Update2: doesn't hang if I specify busratio manually, but still haven't found a set of values that allows audio /keyboard IO to work smoothly.

#19
bsdmaniac

bsdmaniac

    InsanelyMac Protégé

  • Members
  • Pip
  • 26 posts
  • Gender:Male

hi andy, I'm a bit curious about your lines where you advice to use upx to pack pbs binary, I mention this because I tried to find an upx tool and found nothing for darwin, so I had to download the sources along the tools needed for it to compile and I did it so I could have an UB version of upx and packed it so it would weight less and also I posted the resulting file... so my question is: where should anyone else go to get the tool? is mine useful in any way? if so, or not, would you post links to where people would find a version you advice anyone to use? and btw... THANKS!!! it's awesome to have your help, and thanks to nawcom/everyone involved!


u can get upx through macports :)

#20
Andy Vandijck

Andy Vandijck

    InsanelyMac Deity

  • Coders
  • 1,693 posts
  • Gender:Male
  • Location:Tienen
  • Interests:Programming stuff for Mac OS X...
    Hacking...
    Hard rock (also really big Metallica...

Andy, nawcom, thanks again for your work over this project.

I'm wondering about the patch you had posted a link to: what is the background in a two words?

I've been following the process of development xnu-kernel patches for a while now and as far as I remember correctly one of the latest bits required to provide "patch-free" Mac OS X experience for AMD CPU users was the creation of non-standard version of dynamic loader that would be capable of auto-patching dloaded libs to be free of cpuid checks and to be compatible with AMD64 way of doing system calls. It the patch you had posted the link to expected to replace Apple's vanilla dynamic loader with a custom version that would do exactly what I had just described?

Also, is this patch a complement or a replacement to the compiled legacy kernel nawcom had posted at the first post in this thread?

Yes, this dyld is built-in into the kernel (in both the 32 and the 64 bit versions) and enables auto on-the-fly patching of every library/framework(/plugin/...).
It is thus a replacement (in Voodoo style) for vanilla dyld.
I noticed some issues though in 32 bit mode but for 64 bit it worked great.
NOTE: If anybody wants to help to do some work on the dyld, we need to reverse engineer the libunwind code Apple used in its dyld in order to get a perfect dyld (which won't have the last issues...)





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

© 2014 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Mac Netbook  |   PHP hosting by CatN  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy