![]() |
Snow Leopard xnu kernel test patch
http://rapidshare.com/files/28528776...-AnV_test.diff
I can't compile it since I use Leopard and xcrun doesn't work under it. Could somebody please do a test build for me? NOTE: It could still contain a few errors or mistakes at this time. Enjoy this new test patch... ;) |
Sources were patched without errors,
How to build xnu ? |
applying diff
how apply the patch?
|
Download from opensource.apple.com these packages, and build it.
cxxfilt-9.tar.gz dtrace-78.tar.gz kext_tools-177.tar.gz bootstrap_cmds-72.tar.gz I can compile the original sources but the patched not. I get this error: MIG clock.h MIG default_pager_object.h MIG clock_priv.h MIG host_priv.h MIG host_security.h MIG ledger.h MIG lock_set.h MIG mach_host.h Generating libkern/version.h from /Users/Pet/Desktop/xnu-1456.1.26/libkern/libkern/version.h.template MIG mach_port.h MIG gssd_mach.h MIG mach_vm.h MIG kextd_mach.h MIG memory_object_control.h MIG memory_object_name.h MIG lockd_mach.h MIG processor.h Generating bsd/sys/syscall.h from /Users/Pet/Desktop/xnu-1456.1.26/bsd/kern/syscalls.master MIG processor_set.h MIG security.h MIG task.h MIG task_access.h MIG thread_act.h MIG upl.h MIG vm_map.h MIG audit_triggers_server.h MIG clock_reply_server.h MIG exc_server.h MIG mach_exc_server.h MIG memory_object_server.h MIG memory_object_default_server.h MIG notify_server.h MIG task_access_server.h Missing }. make[4]: *** [/Users/Pet/Desktop/xnu-1456.1.26/BUILD/obj//RELEASE_I386/osfmk/RELEASE/Makefile] Error 1 make[3]: *** [build_all] Error 2 make[2]: *** [build_all_conf] Error 2 make[1]: *** [build_all_osfmk] Error 2 make[1]: *** Waiting for unfinished jobs.... CC WKdmCompress.o CC WKdmDecompress.o CC device_tree.o CC bootargs.o CC pe_gen.o CC randomdev.o CC pe_init.o CC pe_bootargs.o CC pe_identify_machine.o CC IOHibernateRestoreKernel.o CC pe_kprintf.o CC pe_interrupt.o In file included from /Users/Pet/Desktop/xnu-1456.1.26/BUILD/obj//EXPORT_HDRS/bsd/sys/sysctl.h:92, from /Users/Pet/Desktop/xnu-1456.1.26/iokit/Kernel/IOHibernateIO.cpp:160: /Users/Pet/Desktop/xnu-1456.1.26/BUILD/obj//EXPORT_HDRS/bsd/sys/linker_set.h: In function ‘void** __linker_set_object_begin(kernel_mach_header_t*, const char*)’: /Users/Pet/Desktop/xnu-1456.1.26/BUILD/obj//EXPORT_HDRS/bsd/sys/linker_set.h:195: error: ‘getsectdatafromheader’ was not declared in this scope /Users/Pet/Desktop/xnu-1456.1.26/BUILD/obj//EXPORT_HDRS/bsd/sys/linker_set.h: In function ‘void** __linker_set_object_limit(kernel_mach_header_t*, const char*)’: /Users/Pet/Desktop/xnu-1456.1.26/BUILD/obj//EXPORT_HDRS/bsd/sys/linker_set.h:208: error: ‘getsectdatafromheader’ was not declared in this scope CC pe_serial.o LDFILELIST pexpert make[6]: *** [IOHibernateIO.cpo] Error 1 make[6]: *** Waiting for unfinished jobs.... CC fips_sha1.o CC comp.o CC smf.o CC yarrowUtils.o CC prng.o In file included from /Users/Pet/Desktop/xnu-1456.1.26/bsd/sys/sysctl.h:92, from /Users/Pet/Desktop/xnu-1456.1.26/bsd/dev/unix_startup.c:49: /Users/Pet/Desktop/xnu-1456.1.26/bsd/sys/linker_set.h: In function ‘__linker_set_object_begin’: /Users/Pet/Desktop/xnu-1456.1.26/bsd/sys/linker_set.h:195: warning: implicit declaration of function ‘getsectdatafromheader’ /Users/Pet/Desktop/xnu-1456.1.26/bsd/sys/linker_set.h:195: warning: nested extern declaration of ‘getsectdatafromheader’ /Users/Pet/Desktop/xnu-1456.1.26/bsd/sys/linker_set.h:195: warning: assignment makes pointer from integer without a cast /Users/Pet/Desktop/xnu-1456.1.26/bsd/sys/linker_set.h: In function ‘__linker_set_object_limit’:In file included from /Users/Pet/Desktop/xnu-1456.1.26/BUILD/obj//EXPORT_HDRS/bsd/sys/sysctl.h:92, from /Users/Pet/Desktop/xnu-1456.1.26/iokit/Kernel/IOLib.cpp:55: /Users/Pet/Desktop/xnu-1456.1.26/BUILD/obj//EXPORT_HDRS/bsd/sys/linker_set.h: In function ‘void** __linker_set_object_begin(kernel_mach_header_t*, const char*)’: /Users/Pet/Desktop/xnu-1456.1.26/BUILD/obj//EXPORT_HDRS/bsd/sys/linker_set.h:195: error: ‘getsectdatafromheader’ was not declared in this scope /Users/Pet/Desktop/xnu-1456.1.26/BUILD/obj//EXPORT_HDRS/bsd/sys/linker_set.h: In function ‘void** __linker_set_object_limit(kernel_mach_header_t*, const char*)’: /Users/Pet/Desktop/xnu-1456.1.26/BUILD/obj//EXPORT_HDRS/bsd/sys/linker_set.h:208: error: ‘getsectdatafromheader’ was not declared in this scope /Users/Pet/Desktop/xnu-1456.1.26/bsd/sys/linker_set.h:208: warning: assignment makes pointer from integer without a cast make[6]: *** [IOLib.cpo] Error 1 make[5]: *** [build_all] Error 2 make[4]: *** [do_all] Error 2 make[3]: *** [build_all] Error 2 make[2]: *** [build_all_conf] Error 2 make[1]: *** [build_all_iokit] Error 2 CC memdev.o CC sha1mod.o cc1: warnings being treated as errors In file included from /Users/Pet/Desktop/xnu-1456.1.26/bsd/sys/sysctl.h:92, from /Users/Pet/Desktop/xnu-1456.1.26/bsd/sys/user.h:81, from /Users/Pet/Desktop/xnu-1456.1.26/bsd/sys/vfs_context.h:8, from /Users/Pet/Desktop/xnu-1456.1.26/bsd/sys/vnode_internal.h:87, from /Users/Pet/Desktop/xnu-1456.1.26/bsd/dev/vn/vn.c:104: /Users/Pet/Desktop/xnu-1456.1.26/bsd/sys/linker_set.h: In function ‘__linker_set_object_begin’: /Users/Pet/Desktop/xnu-1456.1.26/bsd/sys/linker_set.h:195: warning: implicit declaration of function ‘getsectdatafromheader’ /Users/Pet/Desktop/xnu-1456.1.26/bsd/sys/linker_set.h:195: warning: nested extern declaration of ‘getsectdatafromheader’ /Users/Pet/Desktop/xnu-1456.1.26/bsd/sys/linker_set.h:195: warning: assignment makes pointer from integer without a cast /Users/Pet/Desktop/xnu-1456.1.26/bsd/sys/linker_set.h: In function ‘__linker_set_object_limit’: /Users/Pet/Desktop/xnu-1456.1.26/bsd/sys/linker_set.h:208: warning: assignment makes pointer from integer without a cast CC unix_startup.o make[6]: *** [vn.o] Error 1 make[6]: *** Waiting for unfinished jobs.... CC crc32.o CC random.o CC shadow.o make[5]: *** [build_all] Error 2 make[4]: *** [do_all] Error 2 make[3]: *** [build_all] Error 2 make[2]: *** [build_all_conf] Error 2 make[1]: *** [build_all_bsd] Error 2 make: *** [all] Error 2 |
W00! i cant wait!! im SO looking forward to Snow Leopard!!!!
|
getsectdatafromheader is declared in <libkern/kernel_mach_header.h>
you should put #include <libkern/kernel_mach_header.h> into the failing header That should fix this up |
Quote:
from the directory you have both the patch and the sources in (in xnu-1456.1.26) |
I have the same error as rbm, without patching compile, and patched no.
I take a look at headers, and libkern/mach_kernel_header.h is include under ifdef kernel argument. |
What do we have to do after running, patch -p0 -i xnu-1456.1.26-AnV_test.diff?
Thanks! |
As I understood you in another posts, this will never work in 64-bit mode on AMD. True?
|
Quote:
Where should it be included, as perisman mentions it seems to be (conditionally) included in bsd/sys/linker_set.h? To me its unclear what is is causing this error were. Could you shed a light on it a bit further Andy? Cheers! :) |
I guess _SYS_LINKER_SET_H_ is not defined (should it be?), cause if code in libkern/libkern/kernel_mach_header.h is changed to :
//#ifndef _SYS_LINKER_SET_H_ void *getsectdatafromheader(kernel_mach_header_t *, const char *, const char *, unsigned long *); //#endif the compile errors in linker_set.h regarding getsectdatafromheader disappear. Cant seem to find though where this error: MIG task_access_server.h Missing }. make[4]: *** [/Users/Pet/Desktop/xnu-1456.1.26/BUILD/obj//RELEASE_I386/osfmk/RELEASE/Makefile] Error 1 make[3]: *** [build_all] Error 2 make[2]: *** [build_all_conf] Error 2 make[1]: *** [build_all_osfmk] Error 2 make[1]: *** Waiting for unfinished jobs.... CC WKdmCompress.o is caused... Quote:
|
btw, "why is the rum gone?" :-)
sse3emu.c: ///////////////////// #include <stdint.h> /* kaitek: the SSE3 emulator is automatically disabled if sse3emu_size is zero. */ const uint8_t sse3emu_data[] = { 0x00 }; const uint32_t sse3emu_size = 0; ///////////////////// Ohno! No SSE3 emulator in 32bit after all? | -) |
Somebody compiled this yet? Can't wait :D
|
Quote:
But not on SSE2 only machines |
Quote:
|
Quote:
Try manually migging it and check for errors, then let me know... |
i have an AMD machine running SL in 32 bit mode with this metode : http://www.infinitemac.com/f57/amd-s...install-t3727/ , will try to compile it tonight... hope i can help creating 64 bit XNU kernel..
|
Quote:
|
Quote:
use /usr/bin/mig <file.mig> to try to mig it... Check the returned info + files + line |
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? |
Code:
MIG clock.h Fixed the, getsectdatafromheader error with this like never_mind said: //#ifndef _SYS_LINKER_SET_H_ void *getsectdatafromheader(kernel_mach_header_t *, const char *, const char *, unsigned long *); //#endif Putting in #include <libkern/kernel_mach_header.h> into linker_set.h did however not work... |
Quote:
Also I've read somewhere else that there might be missing #endif directives to #if directives in some of the headers. Perhaps you should investigate? |
It seems that their defined in mach_traps.h...
Not sure which header file to include... |
Quote:
you #include <i386/mach_traps.h> Just an example... Check the base path and include it before the definitions Also check for those unmatched #if s I have bought an external HD so I'll be on Snow myself soon ;) |
Nice to hear that Andy, looking forward to AnV snow kitty kernel :)
|
I am not pleased with the modbin kernel...
It panics right after init :( I'm not able to install SL on my external HD :-/ |
What does the kernel panic say andy? Did you tried the test7 kernel?
I haven't had the time too check on the error while compiling yet... Hope you can figure it out :) |
Quote:
migging the .h file (there's no .mig files?) is giving me buckets of error, but also on other .h files, so I am probably not doing it right. But what I found is that , the "missing }." is caused by a missing newline in osfmk/conf/MASTER.i386 Seems hard to believe? Just open osfmk/conf/MASTER.i386 , go to the lastline, slam some <returns> (ok 1's enough) into the file (so, at the end) and after that the error is gone. Tough one! Let's see about this next error.. BBL! :) p.s. this is what diff gave me (opendiff didn't show me this, annoying!!!): 80,84d79 < < # added builtin decryptor functions < # < options BUILTIN_DECRYPTER < #options BUILTIN_DECRYPTER_VERBOSE \ No newline at end of file |
Quote:
Need custom kernel with SSE3 emulator, or no go :) Forward we go! :) p.s. why are you not able to install it on external hd?? |
Quote:
Seems my CPU isn't supported on that kernel (Intel Celeron M 420) |
Quote:
I tried installing from USB HD |
Quote:
Need that kernel too ;) BTW, I am compiling the SL kernel on LEO. That of course doesn't really work, but what I can do is compile most, so I can at least check for compile errors. I've installed 10.6 SDK headers manually in Leo. I even managed to compile one kernel at some point, but it gave my a brick due to linker errors. I know I need 10.6 compiler/linker/tools etc to really make it, but in Leo i've been able to compile to check for syntax errors etc using some tricks. Are you also compiling this way now Andy? I understand you are not running SL so far either.. |
Code:
MIG clock.h Also on pastebin: http://pastebin.com/m24986ef1 |
Quote:
example: PE_parse_boot_arg("argument", &var) -> PE_parse_boot_argn("argument", &var, sizeof(var)) PADL_ and PADR_ you should look up and make sure bsd/vfs/vfs_attrlist.c has the header included before bsd/sys/sysproto.h |
Quote:
I've been thinking of writing a little xcrun tool which does the same without changing it (just printing the tools statically e.g. xcrun -find mig should return /usr/bin/mig) |
Quote:
One question, what do i need to get rid of this; Code:
xcodebuild: 'ctfconvert' not found |
Quote:
export BUILD_STABS = 1 |
Thanks man ;) Was kinda annoying when compiling :p
|
Quote:
|
k so does this mean we have a working Voodoo kernel? cause im dying here... my Leo install is ALL messed up and I dont want to erase it.. it has a LOT of stuff i need.. its what I get for not buying a TM backup disc...
|
Ok so vfs_attrlist.c is in bsd/vfs/
And mach_traps.h is in osfmk/mach/ Should i add; #include <osfmk/mach/mach_traps.h> To vfs_attrlist.c? And Andy wouldn't it be easier if you would maybe remotely control my pc to test? :p |
Quote:
P.S. Sorry... I'm using a win PC right now... can't remotely control... :( |
teamveiwer!! cross platform lol
|
Quote:
I used a VNC server for remote control. Should work with any VNC Viewer for windows too :) But its 23:00 here now and i need to get up at 6:45. So maybe we can remote control tomorrow... |
Quote:
Also is early day for me tomorrow but I'll continue a little bit longer ;) |
Quote:
|
Quote:
I get these errors now: Code:
xnu-1456.1.26/osfmk/i386/i386_init.c: In function ‘slave_tsc_init’: Any thoughts? |
what is sysproto.h use for?
|
wait, now i get it, slave_tsc_init moved, so i guess those declarations need to go somplace else..
Quote:
|