InfiniteMac OSx86

InfiniteMac OSx86 (http://infinitemac.com/forum.php)
-   10.X (http://infinitemac.com/forumdisplay.php?f=36)
-   -   Snow Leopard xnu kernel test patch (http://infinitemac.com/showthread.php?t=4227)

never_mind 09-30-2009 08:08 AM

Quote:

Originally Posted by never_mind (Post 36358)
wait, now i get it, slave_tsc_init moved, so i guess those declarations need to go somplace else..

ok for now i just chucked those static definitions it needs into the file :)

Now, I ended up at an important bit!! SSE3 emulator start! :)

Code:

/xnu-1456.1.26/osfmk/i386/start.s:202:junk `(_sse3emu_size)' after expression
/xnu-1456.1.26/osfmk/i386/start.s:207:4294967296 shortened to 0
/xnu-1456.1.26/osfmk/i386/start.s:209:junk `(_master_idt)' after expression
make[6]: *** [start.o] Error 1

Arrgh. Now why does it say that? An(d)y ideas? :)

pαuℓzurrr. 09-30-2009 08:40 AM

never_mind, did you figured out the problem with PADL_ and PADR_?
Cause i think this needs to be added to vfs_attrlist.c

#include <osfmk/mach/mach_traps.h>

But im not sure if that the correct way. mach_traps.h is in osfmk/mach/
And vfs_attrlist.c is in bsd/vfs/

Do you know how to change the path so it looks in the right directory?
Thanks!

And Andy, are you from belgium? Cause im dutch :)

never_mind 09-30-2009 09:10 AM

Not sure if this was "right", but what i did is put the sysproto.h from the 10.6 SDK in bsd/sys/ and included the bit in there that was in the original bsd/sys/sysproto.h

That takes me past that error..



Quote:

Originally Posted by pαuℓzurrr. (Post 36369)
never_mind, did you figured out the problem with PADL_ and PADR_?
Cause i think this needs to be added to vfs_attrlist.c

#include <osfmk/mach/mach_traps.h>

But im not sure if that the correct way. mach_traps.h is in osfmk/mach/
And vfs_attrlist.c is in bsd/vfs/

Do you know how to change the path so it looks in the right directory?
Thanks!

And Andy, are you from belgium? Cause im dutch :)


pαuℓzurrr. 09-30-2009 09:36 AM

What do you mean with original? Cause i dont have sysproto.h. Only when i apply andy's patch...
Edit:
When deleted its generated from syscalls.master...

never_mind 09-30-2009 10:00 AM

Quote:

Originally Posted by pαuℓzurrr. (Post 36371)
What do you mean with original? Cause i dont have sysproto.h. Only when i apply andy's patch...
Edit:
When deleted its generated from syscalls.master...

Sorry, I meant after the patch.. I don't know, that generated one didn't work right?

pαuℓzurrr. 09-30-2009 10:06 AM

Yes it did ;) No errors when it generated...

Generating bsd/sys/sysproto.h from /Users/paulzurrr/Desktop/XNU/xnu-1456.1.26/bsd/kern/syscalls.master

Here is the generated sysproto.h
http://pastebin.com/m18b29e92

This are the errors i'm having now...

Code:

CC bootargs.o
LDFILELIST pexpert
/Users/paulzurrr/Desktop/XNU/xnu-1456.1.26/bsd/kern/kern_mib.c: In function ‘sysctl_mib_init’:
/Users/paulzurrr/Desktop/XNU/xnu-1456.1.26/bsd/kern/kern_mib.c:715: error: break statement not within loop or switch
/Users/paulzurrr/Desktop/XNU/xnu-1456.1.26/bsd/kern/kern_mib.c:717: error: ‘default’ label not within a switch statement
/Users/paulzurrr/Desktop/XNU/xnu-1456.1.26/bsd/kern/kern_mib.c:764: error: expected declaration or statement at end of input
make[6]: *** [kern_mib.o] 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_bsd] Error 2
make[1]: *** Waiting for unfinished jobs....
cc1: warnings being treated as errors
/Users/paulzurrr/Desktop/XNU/xnu-1456.1.26/libkern/kernel_mach_header.c: In function ‘get_cs_cmd_from_header’:
/Users/paulzurrr/Desktop/XNU/xnu-1456.1.26/libkern/kernel_mach_header.c:183: warning: implicit declaration of function ‘ASSERT’
/Users/paulzurrr/Desktop/XNU/xnu-1456.1.26/libkern/kernel_mach_header.c:183: warning: nested extern declaration of ‘ASSERT’
make[6]: *** [kernel_mach_header.o] 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_libkern] Error 2
In file included from /Users/paulzurrr/Desktop/XNU/xnu-1456.1.26/osfmk/i386/cpuid.c:38:
/Users/paulzurrr/Desktop/XNU/xnu-1456.1.26/osfmk/i386/cpuid_legacy.h:32:1: error: "KB" redefined
In file included from /Users/paulzurrr/Desktop/XNU/xnu-1456.1.26/osfmk/mach/machine/vm_param.h:35,
                from /Users/paulzurrr/Desktop/XNU/xnu-1456.1.26/osfmk/mach/vm_param.h:70,
                from /Users/paulzurrr/Desktop/XNU/xnu-1456.1.26/osfmk/vm/vm_page.h:73,
                from /Users/paulzurrr/Desktop/XNU/xnu-1456.1.26/osfmk/i386/cpuid.c:33:
/Users/paulzurrr/Desktop/XNU/xnu-1456.1.26/osfmk/mach/i386/vm_param.h:160:1: error: this is the location of the previous definition
/Users/paulzurrr/Desktop/XNU/xnu-1456.1.26/osfmk/i386/cpuid.c: In function ‘cpuid_set_info’:
/Users/paulzurrr/Desktop/XNU/xnu-1456.1.26/osfmk/i386/cpuid.c:830: error: too few arguments to function ‘PE_parse_boot_argn’
/Users/paulzurrr/Desktop/XNU/xnu-1456.1.26/osfmk/i386/cpuid.c:834: error: too few arguments to function ‘PE_parse_boot_argn’
make[6]: *** [cpuid.o] 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_osfmk] Error 2
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....
C++ IOMapper.cpo
C++ IOMemoryCursor.cpo
C++ IOCopyMapper.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


never_mind 09-30-2009 10:43 AM

Mmm, i didn't get any errors in pexpert... Did you see my PM?

Quote:

Originally Posted by pαuℓzurrr. (Post 36374)
Yes it did ;) No errors when it generated...

Generating bsd/sys/sysproto.h from /Users/paulzurrr/Desktop/XNU/xnu-1456.1.26/bsd/kern/syscalls.master

Here is the generated sysproto.h
http://pastebin.com/m18b29e92


Still got a lot of errors with PE_parse_boot_arg...


aryajuanda 09-30-2009 11:44 AM

this i my err

Code:

MIG UNDReplyServer.c
cc1plus: warnings being treated as errors
/Users/arya/Downloads/Kernels/xnu-1456.1.26-Test/iokit/Kernel/IOStartIOKit.cpp: In function ‘void iokit_post_constructor_init()’:
/Users/arya/Downloads/Kernels/xnu-1456.1.26-Test/iokit/Kernel/IOStartIOKit.cpp:100: warning: ‘PE_parse_boot_arg’ is deprecated (declared at /Users/arya/Downloads/Kernels/xnu-1456.1.26-Test/BUILD/obj//EXPORT_HDRS/pexpert/pexpert/pexpert.h:239)
/Users/arya/Downloads/Kernels/xnu-1456.1.26-Test/iokit/Kernel/IOStartIOKit.cpp:100: warning: ‘PE_parse_boot_arg’ is deprecated (declared at /Users/arya/Downloads/Kernels/xnu-1456.1.26-Test/BUILD/obj//EXPORT_HDRS/pexpert/pexpert/pexpert.h:239)
make[6]: *** [IOStartIOKit.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
make[1]: *** Waiting for unfinished jobs....

pastebin : http://pastebin.com/m77caee23

added : pass the pexpert by editing the /pexpert/pexpert/pexpert.h:

#if !defined(__LP64__) && !defined(__arm__)
extern boolean_t PE_parse_boot_arg(
const char *arg_string,
void *arg_ptr) __deprecated;
#endif

to :

#if !defined(__LP64__) && !defined(__arm__)
extern boolean_t PE_parse_boot_arg(
const char *arg_string,
void *arg_ptr);
#endif

i dont know if i m doing the right thing or not.. :D

aryajuanda 09-30-2009 12:21 PM

i get pass the ASERT thing by add

#include <kern/voodoo_assert.h> in /bsd/kern/mach_header.c

xXrkidXx 09-30-2009 12:51 PM

anybody got it fully patched yet? and in kernel form lol?