I've compiled xnu-1456.1.26 by following this guide:
http://shantonu.blogspot.com/2009/09...-has-been.html
I have a Pentium-D so these are the minimum changes that need to be made to get it to boot:
changes
===============
* 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);
A few more changes are needed to get x64 support but before I add that, I wanted to get 32bit mode to work.
With the above changes, the kernel boots 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. Any ideas?