#21
|
|||
|
|||
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? |
#22
|
||||
|
||||
Code:
MIG clock.h MIG clock_priv.h MIG host_priv.h Generating libkern/version.h from /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/libkern/libkern/version.h.template MIG host_security.h MIG ledger.h MIG lock_set.h MIG mach_host.h MIG default_pager_object.h MIG mach_port.h MIG mach_vm.h Generating bsd/sys/syscall.h from /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/kern/syscalls.master MIG memory_object_control.h MIG memory_object_name.h MIG processor.h MIG gssd_mach.h MIG kextd_mach.h MIG processor_set.h MIG security.h MIG lockd_mach.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/paulzurrr/desktop/xnu/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 WKdmDecompress.o CC WKdmCompress.o CC device_tree.o CC bootargs.o CC IOHibernateRestoreKernel.o CC randomdev.o CC pe_gen.o CC pe_init.o CC pe_bootargs.o CC fips_sha1.o CC pe_identify_machine.o CC smf.o CC pe_kprintf.o CC comp.o CC pe_interrupt.o CC pe_serial.o CC prng.o LDFILELIST pexpert CC yarrowUtils.o C++ IOLib.cpo CC sha1mod.o C++ IOLocks.cpo CC memdev.o CC unix_startup.o C++ IOConditionLock.cpo C++ IOSyncer.cpo CC shadow.o C++ IOHibernateIO.cpo CC crc32.o CC random.o CC scanc.o CC skpc.o CC vn.o CC strsep.o CC inet_ntop.o CC bcd.o cc1plus: warnings being treated as errors /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/iokit/Kernel/IOStartIOKit.cpp: In function ‘void iokit_post_constructor_init()’: /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/iokit/Kernel/IOStartIOKit.cpp:100: warning: ‘PE_parse_boot_arg’ is deprecated (declared at /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/BUILD/obj//EXPORT_HDRS/pexpert/pexpert/pexpert.h:239) /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/iokit/Kernel/IOStartIOKit.cpp:100: warning: ‘PE_parse_boot_arg’ is deprecated (declared at /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/BUILD/obj//EXPORT_HDRS/pexpert/pexpert/pexpert.h:239) make[6]: *** [IOStartIOKit.cpo] Error 1 make[6]: *** Waiting for unfinished jobs.... cc1: warnings being treated as errors In file included from /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/vfs/vfs_attrlist.c:47: /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/sys/sysproto.h:2: warning: implicit declaration of function ‘PADL_’ /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/sys/sysproto.h:2: error: expected expression before ‘int’ /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/sys/sysproto.h:2: error: variably modified ‘fd_l_’ at file scope /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/sys/sysproto.h:2: warning: implicit declaration of function ‘PADR_’ /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/sys/sysproto.h:2: error: expected expression before ‘int’ /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/sys/sysproto.h:2: error: variably modified ‘fd_r_’ at file scope /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/sys/sysproto.h:3: error: expected expression before ‘uint32_t’ /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/sys/sysproto.h:3: error: variably modified ‘arch_offset_l_’ at file scope /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/sys/sysproto.h:3: error: expected expression before ‘uint32_t’ /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/sys/sysproto.h:3: error: variably modified ‘arch_offset_r_’ at file scope /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/sys/sysproto.h:4: error: expected expression before ‘uint32_t’ /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/sys/sysproto.h:4: error: variably modified ‘arch_size_l_’ at file scope /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/sys/sysproto.h:4: error: expected expression before ‘uint32_t’ /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/sys/sysproto.h:4: error: variably modified ‘arch_size_r_’ at file scope /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/sys/sysproto.h:5: error: expected expression before ‘user_addr_t’ /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/sys/sysproto.h:5: error: variably modified ‘map_addr_l_’ at file scope /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/sys/sysproto.h:5: error: expected expression before ‘user_addr_t’ /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/sys/sysproto.h:5: error: variably modified ‘map_addr_r_’ at file scope /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/sys/sysproto.h:6: error: expected expression before ‘u_int’ /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/sys/sysproto.h:6: error: variably modified ‘mode_l_’ at file scope /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/sys/sysproto.h:6: error: expected expression before ‘u_int’ /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/sys/sysproto.h:6: error: variably modified ‘mode_r_’ at file scope /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/vfs/vfs_attrlist.c:619: warning: ‘struct getattrlist_args’ declared inside parameter list /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/vfs/vfs_attrlist.c:619: warning: its scope is only this definition or declaration, which is probably not what you want /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/vfs/vfs_attrlist.c: In function ‘getvolattrlist’: /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/vfs/vfs_attrlist.c:641: error: dereferencing pointer to incomplete type /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/vfs/vfs_attrlist.c:848: error: dereferencing pointer to incomplete type /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/vfs/vfs_attrlist.c:1143: error: dereferencing pointer to incomplete type /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/vfs/vfs_attrlist.c:1155: error: dereferencing pointer to incomplete type /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/vfs/vfs_attrlist.c: At top level: /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/vfs/vfs_attrlist.c:1174: warning: ‘struct getattrlist_args’ declared inside parameter list /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/vfs/vfs_attrlist.c: In function ‘getattrlist_internal’: /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/vfs/vfs_attrlist.c:1204: error: dereferencing pointer to incomplete type /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/vfs/vfs_attrlist.c:1232: warning: passing argument 2 of ‘getvolattrlist’ from incompatible pointer type /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/vfs/vfs_attrlist.c:1238: error: dereferencing pointer to incomplete type /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/vfs/vfs_attrlist.c:1854: error: dereferencing pointer to incomplete type /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/vfs/vfs_attrlist.c:1869: error: dereferencing pointer to incomplete type /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/vfs/vfs_attrlist.c:1869: error: dereferencing pointer to incomplete type /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/vfs/vfs_attrlist.c: At top level: /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/vfs/vfs_attrlist.c:1888: warning: ‘struct fgetattrlist_args’ declared inside parameter list /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/vfs/vfs_attrlist.c:1889: warning: no previous prototype for ‘fgetattrlist’ /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/vfs/vfs_attrlist.c: In function ‘fgetattrlist’: /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/vfs/vfs_attrlist.c:1893: error: storage size of ‘ap’ isn’t known /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/vfs/vfs_attrlist.c:1898: error: dereferencing pointer to incomplete type /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/vfs/vfs_attrlist.c:1902: error: dereferencing pointer to incomplete type /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/vfs/vfs_attrlist.c:1907: error: dereferencing pointer to incomplete type /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/vfs/vfs_attrlist.c:1908: error: dereferencing pointer to incomplete type /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/vfs/vfs_attrlist.c:1909: error: dereferencing pointer to incomplete type /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/vfs/vfs_attrlist.c:1910: error: dereferencing pointer to incomplete type /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/vfs/vfs_attrlist.c:1914: error: dereferencing pointer to incomplete type /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/vfs/vfs_attrlist.c:1893: warning: unused variable ‘ap’ /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/vfs/vfs_attrlist.c: At top level: /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/vfs/vfs_attrlist.c:1922: warning: ‘struct getattrlist_args’ declared inside parameter list /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/vfs/vfs_attrlist.c:1923: warning: no previous prototype for ‘getattrlist’ /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/vfs/vfs_attrlist.c: In function ‘getattrlist’: /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/vfs/vfs_attrlist.c:1937: error: dereferencing pointer to incomplete type /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/vfs/vfs_attrlist.c:1939: error: dereferencing pointer to incomplete type /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/vfs/vfs_attrlist.c:1946: warning: passing argument 2 of ‘getattrlist_internal’ from incompatible pointer type /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/vfs/vfs_attrlist.c: At top level: /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/vfs/vfs_attrlist.c:1987: warning: ‘struct setattrlist_args’ declared inside parameter list /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/vfs/vfs_attrlist.c: In function ‘setattrlist_internal’: /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/vfs/vfs_attrlist.c:2008: error: dereferencing pointer to incomplete type /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/vfs/vfs_attrlist.c:2048: error: dereferencing pointer to incomplete type /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/vfs/vfs_attrlist.c:2053: error: dereferencing pointer to incomplete type /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/vfs/vfs_attrlist.c:2059: error: dereferencing pointer to incomplete type /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/vfs/vfs_attrlist.c:2059: error: dereferencing pointer to incomplete type /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/vfs/vfs_attrlist.c:2075: error: dereferencing pointer to incomplete type /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/vfs/vfs_attrlist.c: At top level: /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/vfs/vfs_attrlist.c:2311: warning: ‘struct setattrlist_args’ declared inside parameter list /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/vfs/vfs_attrlist.c:2312: warning: no previous prototype for ‘setattrlist’ /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/vfs/vfs_attrlist.c: In function ‘setattrlist’: /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/vfs/vfs_attrlist.c:2325: error: dereferencing pointer to incomplete type /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/vfs/vfs_attrlist.c:2327: error: dereferencing pointer to incomplete type /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/vfs/vfs_attrlist.c:2333: warning: passing argument 2 of ‘setattrlist_internal’ from incompatible pointer type /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/vfs/vfs_attrlist.c: At top level: /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/vfs/vfs_attrlist.c:2341: warning: ‘struct fsetattrlist_args’ declared inside parameter list /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/vfs/vfs_attrlist.c:2342: warning: no previous prototype for ‘fsetattrlist’ /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/vfs/vfs_attrlist.c: In function ‘fsetattrlist’: /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/vfs/vfs_attrlist.c:2346: error: storage size of ‘ap’ isn’t known /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/vfs/vfs_attrlist.c:2350: error: dereferencing pointer to incomplete type /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/vfs/vfs_attrlist.c:2354: error: dereferencing pointer to incomplete type /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/vfs/vfs_attrlist.c:2359: error: dereferencing pointer to incomplete type /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/vfs/vfs_attrlist.c:2360: error: dereferencing pointer to incomplete type /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/vfs/vfs_attrlist.c:2361: error: dereferencing pointer to incomplete type /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/vfs/vfs_attrlist.c:2362: error: dereferencing pointer to incomplete type /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/vfs/vfs_attrlist.c:2365: error: dereferencing pointer to incomplete type /Users/paulzurrr/desktop/xnu/xnu-1456.1.26/bsd/vfs/vfs_attrlist.c:2346: warning: unused variable ‘ap’ make[6]: *** [vfs_attrlist.o] Error 1 make[6]: *** Waiting for unfinished jobs.... C++ IODeviceTreeSupport.cpo CC vfs_bio.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 C++ IORegistryEntry.cpo 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 make: *** [all] Error 2 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... Mac Inspiron 531 » 10.6.8 • 10.8.0 Legacy Kernel • AMD Athlon 64 X2 5000+ (2.60GHz) Dell M2N61-AX/nForce 430/MCP61 • 4GB Dual Channel DDR2 667MHz ALC888 • nVidia GeForce 8600 GT 256 MB 2 x WDC WD5000AAKS 500 GB SATA HDD Last edited by pαuℓzurrr.; 09-29-2009 at 08:50 AM. |
#23
|
||||
|
||||
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? |
#24
|
||||
|
||||
It seems that their defined in mach_traps.h...
Not sure which header file to include... Mac Inspiron 531 » 10.6.8 • 10.8.0 Legacy Kernel • AMD Athlon 64 X2 5000+ (2.60GHz) Dell M2N61-AX/nForce 430/MCP61 • 4GB Dual Channel DDR2 667MHz ALC888 • nVidia GeForce 8600 GT 256 MB 2 x WDC WD5000AAKS 500 GB SATA HDD |
#25
|
||||
|
||||
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 |
#26
|
|||
|
|||
Nice to hear that Andy, looking forward to AnV snow kitty kernel
|
#27
|
||||
|
||||
I am not pleased with the modbin kernel...
It panics right after init I'm not able to install SL on my external HD |
#28
|
||||
|
||||
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 Mac Inspiron 531 » 10.6.8 • 10.8.0 Legacy Kernel • AMD Athlon 64 X2 5000+ (2.60GHz) Dell M2N61-AX/nForce 430/MCP61 • 4GB Dual Channel DDR2 667MHz ALC888 • nVidia GeForce 8600 GT 256 MB 2 x WDC WD5000AAKS 500 GB SATA HDD |
#29
|
|||
|
|||
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 Last edited by never_mind; 09-29-2009 at 12:51 PM. |
#30
|
|||
|
|||
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?? 💡 Deploy cloud instances seamlessly on DigitalOcean. Free credits ($100) for InfMac readers. Last edited by never_mind; 09-29-2009 at 01:10 PM. |