site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com Thread-index: AcpuCm/Qk3zISuutRc6pRlo3AunxLgAEEA76 Thread-topic: Building 10.6 kernel? The instructions at: http://shantonu.blogspot.com/2009/09/mac-os-x-kernel-source-xnu-has-been.htm... work great. I had no problems building the kernel. The problem is that when I install the new kernel, my test machine takes approx. 10 minutes to boot. Actually boot works ok, but the machine hangs prior to login -- just after the SecurityAgent launches. It hangs for about 10 minutes and then proceeds normally. It's as if some process is timing out. When I ssh into the machine and run top, I notice that the hidd process is "stuck". If I kill the hidd process, it restarts, and the machine immediately becomes responsive. Any ideas? Are there some kernel dependencies that I am overlooking? By the way, this happens with all three versions of the 10.6 source available at opensource.apple.com. Thanks, --Jim -----Original Message----- From: darwin-kernel-bounces+james.nix=ngc.com@lists.apple.com on behalf of darwin-kernel-request@lists.apple.com Sent: Wed 11/25/2009 3:03 PM To: darwin-kernel@lists.apple.com Subject: Darwin-kernel Digest, Vol 6, Issue 174 Send Darwin-kernel mailing list submissions to darwin-kernel@lists.apple.com To subscribe or unsubscribe via the World Wide Web, visit http://lists.apple.com/mailman/listinfo/darwin-kernel or, via email, send a message with subject or body 'help' to darwin-kernel-request@lists.apple.com You can reach the person managing the list at darwin-kernel-owner@lists.apple.com When replying, please edit your Subject line so it is more specific than "Re: Contents of Darwin-kernel digest..." Today's Topics: 1. Building 10.6 kernel? (Duane Murphy) 2. Re: Building 10.6 kernel? (Duane Murphy) 3. Re: remote debugging with gdb on 10.6.2 (Brian Bechtel) 4. Re: Building 10.6 kernel? (Stacey Son) 5. Re: Building 10.6 kernel? (Chris Simpson) 6. Re: Building 10.6 kernel? (Shantonu Sen) 7. Re: Kernel stack size and kernel memory debugger (Michael Smith) 8. Re: Kernel stack size and kernel memory debugger (Michael Crawford) 9. Re: Kernel stack size and kernel memory debugger (mogambo) 10. Re: Kernel stack size and kernel memory debugger (Andrew Myrick) ---------------------------------------------------------------------- Message: 1 Date: Tue, 24 Nov 2009 15:51:11 -0800 From: Duane Murphy <duanemurphy@mac.com> Subject: Building 10.6 kernel? To: darwin-kernel@lists.apple.com Message-ID: <CEA9F5F9-B891-41F3-87EE-A156D2315734@mac.com> Content-Type: text/plain; charset=US-ASCII -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 I am correct in assuming that the 10.6 kernel cannot be built (publicly) at this point? Seems like there are several pieces missing or at least not obvious where to find those pieces. References to instructions for building the 10.6 kernel would be great. (http://developer.apple.com/mac/library/documentation/Darwin/Conceptual/Kerne... doesn't work by the way. :-)) Thanks, ...Duane -----BEGIN PGP SIGNATURE----- Version: PGP Desktop 9.10.0 (Build 500) Charset: US-ASCII wsBVAwUBSwxxdUrg9acQ4r2CAQjPgggApkPrHThcJMBd0xblkw672qcfTKXvzP4J j6SdXEeUH0Nz+9DKvI1EUZ/9iYDHE83gsLVs7kLD3LfPKbIwdqrTQCf8mmmp7024 Klhkue6u1YafAV0ShuzXlIF4/tI1FIyvQTgMz6+BNI1BqvEk5R+bHjfk8M13gJ4+ UWyoSGSTgUoRYLEGIlvg27gw82243xxyTOmBacQWp9D+Yrjl4L6S9WZbf8hEoHmH t+g9igpTzcralIQVSPx/YXxOPdqs9rD5kAZ6NxwE3mke8JD0gSIAKHkwKGtWpW/A 8m91WtOugm+pQRFi2JGWZ9NsGnsBHlvTtwmsO73ZviHC1rjFWfAf/Q== =R5Mp -----END PGP SIGNATURE----- ------------------------------ Message: 2 Date: Tue, 24 Nov 2009 16:04:15 -0800 From: Duane Murphy <duanemurphy@mac.com> Subject: Re: Building 10.6 kernel? To: darwin-kernel@lists.apple.com Message-ID: <283C64E3-F2CA-49B7-A247-D3583287EC27@mac.com> Content-Type: text/plain; charset=US-ASCII -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 darwinbuild to the rescue. :-) On Nov 24, 2009, at 3:51 PM, Duane Murphy wrote:
Am I correct in assuming that the 10.6 kernel cannot be built (publicly) at this point? Seems like there are several pieces missing or at least not obvious where to find those pieces.
References to instructions for building the 10.6 kernel would be great. (http://developer.apple.com/mac/library/documentation/Darwin/Conceptual/Kerne... doesn't work by the way. :-))
...Duane -----BEGIN PGP SIGNATURE----- Version: PGP Desktop 9.10.0 (Build 500) Charset: US-ASCII wsBVAwUBSwx0hkrg9acQ4r2CAQggXgf/ZdIS5/LulSExO3YOKoaMehW48YF3YbgV +nfXzHtjdG0TIBRoip0e4Xb6IW4ZOQnefJjc397iF5a8/P9xWrSkEbP6xuQPcbW8 4HXFERdkiG7vv/90V7t6l3bNPDjkqweCXq6raUsu9rM8sxwH3DVMSl6dC4BLwbpD DsyzOozBUaeHMBqwfYvuCKHhwyeij1LiaH58rt9SkjG4rLxeYJSN5/0uDB6/cjo0 FuPXOhbag48cE8uJ+moLkXREzA/z0vxCLaiHEf8fZiHRNS9c1nFkgFSlRc5xgI6D 26x/Khk50fYmI5Ho2y5FvjK7XX2erHpZw/tZl27n91jM4iepVhy0Bw== =mPEq -----END PGP SIGNATURE----- ------------------------------ Message: 3 Date: Tue, 24 Nov 2009 17:10:21 -0800 From: Brian Bechtel <brian.bechtel@gmail.com> Subject: Re: remote debugging with gdb on 10.6.2 To: mogambo <mogambo13@gmail.com> Cc: darwin-kernel@lists.apple.com Message-ID: <f6b4217c0911241710t5694e3b1g59379cdbf606a10d@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1 On Mon, Nov 23, 2009 at 10:19 PM, mogambo <mogambo13@gmail.com> wrote:
Thanks, Brian. I made some progress, but I am still having problems. I tried boot-args 0x144 (although with boot-args 0xd44 I did have _panicd_ip set as welll). The most important I was misisng was NMI the machine with power button. I had used remote debugging with freebsd in my previous job. I don't remember having to do anything special like that. I am debugging a file system driver, which I am able to load successfully. I created symbols at kextload time and copied to the debugger machine earlier. I used -arch x86_64 as the debugger and debugee are both running 64-bit 10.6. I was able to connect to the debugee in the gdb. With add-symbol-file, I added the kext symbols, but get warnings: Reading symbols from /path/to/com.company.kext.fsd.sym... warning: .o file "/path/to/object.o" more recent than executable timestamp in "/path/to/com.company.kext.fsd.sym warning: Could not open OSO file /path/to/object.o to scan for pubtypes for objfile /path/to/com.company.kext.fsd.sym : done. I was able to set a breakpoint in my kext and apparently hit it too as expected. However, I cannot single-step through the kext code - I get an error saying something like "no symbol information for this line was found; continuing to the end of the function". At the point where I hit the trap fault, I am unable print any arguments to the function, or locals. I am sure what I intend to do is not an uncommon use of remote debugging. What am I doing wrong?
Are you following the guidelines at <http://developer.apple.com/mac/library/documentation/DeviceDrivers/Conceptual/WritingDeviceDriver/DebuggingDrivers/DebuggingDrivers.html> ? In Leopard and later, kextutil was split into two parts. You want to do the following: { build your kext } cd build/Development { in here you would have the kext and kext.dSYM bundles } kextutil -z -n -s . -- ./fsd.kext { it will prompt you for the kext load address. You can get that from "showallkmods" in gdb } inside gdb, use add-kext (gdb) add-kext ./fsd.kext This should give you source lines and locals if you compiled & linked everything correctly. Good luck. ------------------------------ Message: 4 Date: Tue, 24 Nov 2009 20:27:02 -0600 From: Stacey Son <apple@son.org> Subject: Re: Building 10.6 kernel? To: Duane Murphy <duanemurphy@mac.com> Cc: darwin-kernel@lists.apple.com Message-ID: <877EE38E-44B2-49C0-9DC9-087622C7F154@son.org> Content-Type: text/plain; charset="us-ascii" On Nov 24, 2009, at 5:51 PM, Duane Murphy wrote:
I am correct in assuming that the 10.6 kernel cannot be built (publicly) at this point? Seems like there are several pieces missing or at least not obvious where to find those pieces.
References to instructions for building the 10.6 kernel would be great. (http://developer.apple.com/mac/library/documentation/Darwin/Conceptual/Kerne... doesn't work by the way. :-))
see http://shantonu.blogspot.com/2009/09/mac-os-x-kernel-source-xnu-has-been.htm... Best Regards, -stacey. ---- Stacey Son sson@FreeBSD.org