Jump to content

Using the ToH XNU source


  • Please log in to reply
8 replies to this topic

#1
ritalin

ritalin

    InsanelyMac Protégé

  • Members
  • PipPip
  • 67 posts
  • Gender:Male
  • Location:A dull, bluish green, planet
I've done a bit of research and I've managed to teach myself how to compile the XNU from source. I can compile vanilla OSX Leopard XNU versions upto xnu-1228.5.20 (10.5.4).

By adding the missing key to the ToH source code patch (available from here) I can patch the xnu-1228.3.13 (10.5.2) source, and compile a working 10.5.2 xnu with working decrypt etc...

I would like to be able to update the patch for use on later XNU, 10.5.4 etc...

Anyone know how to go about achieving this?

#2
nickhe

nickhe

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 365 posts
  • Gender:Male
  • Location:Where all the girls are sexy
it would be perfect becouse if you make a vanillia ToH XNU Kernel it would be able to support Pentium M

#3
Superhai

Superhai

    InsanelyMac Legend

  • Retired Developers
  • 1,425 posts

it would be perfect becouse if you make a vanillia ToH XNU Kernel it would be able to support Pentium M


what is vanillia toh xnu kernel?

#4
Kiko

Kiko

    You Dont Understand Me

  • Members
  • PipPipPipPipPipPipPipPipPipPipPip
  • 2,889 posts
  • Gender:Female
  • Location:United States Of Israel
lol, stupid noobs


ritalin, look at what has been changed, the source patch isnt a very complex one.

#5
Dense

Dense

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 230 posts
Its been already done. Just take the ToH sources, reverse out the speedstep patches and create a new diff. This will then cleanly apply to the 9.4.0 sources. This is how the StageXNU kernel floating around was made. Its really nothing special.

I've got an automated builder that does all of this and can handle all kernels from 9.0.0 to 9.4.0.

#6
ritalin

ritalin

    InsanelyMac Protégé

  • Members
  • PipPip
  • 67 posts
  • Gender:Male
  • Location:A dull, bluish green, planet

Its been already done. Just take the ToH sources, reverse out the speedstep patches and create a new diff. This will then cleanly apply to the 9.4.0 sources. This is how the StageXNU kernel floating around was made. Its really nothing special.

I've got an automated builder that does all of this and can handle all kernels from 9.0.0 to 9.4.0.


Thanks Dense, I didn't think it would be that easy but you are right as always.

Here is one I just made.
Posted Image

I've made my own build script. It doesn't do the patching yet, but it handles the compiling stage okay.

#7
mercurysquad

mercurysquad

    InsanelyMac Legend

  • Retired Developers
  • 521 posts
  • Gender:Male
  • Location:India
Might wanna send me a PM, we (voodoo dev) need more kernel developers.

#8
LedY

LedY

    InsanelyMac Protégé

  • Members
  • PipPip
  • 65 posts
Has anyone had any luck compiling and patching the xnu-1456.1.26 kernel sources for use in Snow Leopard? I'm using modbin's 10a432 kernel currently and it works great but it doesn't support 64-bit apps so I'm trying to add that support to the sources to enable it for my Pentium-D.

I almost have a kernel that works on my Pentium-D but it hangs after the 'BSD root: disk0s2, major 14, minor 2' print. Normally after that it prints a few 'com.apple.launchd' lines but not with the kernel that I built and I don't know why.

I followed this guide to get the kernel to compile under snow leopard.

So far I have made the following changes to the sources:

* remove the CPUID checks in cpuid_set_info() in osfmk/i386/cpuid.c: Specifically the cpuid_family and cpuid_model panic

* change 'cpufamily = CPUFAMILY_UNKNOWN' to 'cpufamily = CPUFAMILY_INTEL_6_14' in bsd/kern/kern_mib.c

* comment out cpuid_family check in tsc_init() on line x in osfmk/i386/tsc.c. Specifically comment out this code:

if (cpuid_info()->cpuid_family != CPU_FAMILY_PENTIUM_M) {
panic("tsc_init: unknown CPU family: 0x%X\n", cpuid_info()->cpuid_family);
}

* comment out following lines in commpage_stuff_routine() on line x in osfmk/i386/commpage/commpage.c:

if ((cur_routine!=0) && (matched==0))
panic("commpage no match for last, next address %08lx", rd->commpage_address);


These were the only changes that were required to get a working kernel for Leopard but obviously things have changed in Snow leopard.

#9
MusicOSx86

MusicOSx86

    InsanelyMac Protégé

  • Members
  • Pip
  • 8 posts
How do you recomend getting rid of

unnable to determine UUID for host

I've done a bit of research and I've managed to teach myself how to compile the XNU from source. I can compile vanilla OSX Leopard XNU versions upto xnu-1228.5.20 (10.5.4).

By adding the missing key to the ToH source code patch (available from here) I can patch the xnu-1228.3.13 (10.5.2) source, and compile a working 10.5.2 xnu with working decrypt etc...

I would like to be able to update the patch for use on later XNU, 10.5.4 etc...

Anyone know how to go about achieving this?







0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

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