 |
 |
Building a New OSX Kernel
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Apr 2001
Location: New York, NY USA
Status:
Offline
|
|
the following is a terse description of how to compile your own MacosX kernel.
it assumes a somewhat more than basic familiarity with a unix command line,
and brass balls. when finished, you can reboot, and, ostensible, be using
an up-to-the-minute osx kernel. I believe, kick me if I'm wrong, the Darwin1.3
kernel is the MacosX 10.0.1 update kernel, so checking out the previous version
of xnu should give you that. (as opposed to Darwin1.3.1 that current gives now)
please note that while this is fun and enlightening, it's not all that has to
be done to actually get a functioning OS. it boots, and works, mostly, but
not everything sits quite right. you might have better luck if you check
out the same version of xnu as the kernel you're running ( I believe the
10.0.1 update is xnu-123.5). notably, I've had proglems with netinfo,
ipfw and all of aqua's pref's getting whacked. $.02.
here's the output of a uname -a with the new kernel:
battlej@icarus:~/Darwin/System/xnu % uname -a
Darwin localhost 1.3.1 Darwin Kernel Version 1.3.1: Sun Apr 29 20:15:44 EDT 2001
; battlej:BUILD/obj/RELEASE_PPC Power Macintosh powerpc
it's got inet6 and ipsec (though the nettools don't quite grok v6 yet)!! joy!
battlej@icarus:~/Darwin % cvs co bootstrap_cmds
battlej@icarus:~/Darwin % cd bootstrap_cmds ; make ; make install
battlej@icarus:~/Darwin/System/xnu % set path=($path /usr/local/bin /dst/usr/bin
) #if it isn't already there...
battlej@icarus:~/Darwin % cvs co Libraries/NeXT/libstreams # gets you strea
ms/stream.h for kld_build
battlej@icarus:~/Darwin % cd Libraries/NeXT/libstreams ; make macos ; make insta
ll
battlej@icarus:~/Darwin % cvs co cctools
battlej@icarus:~/Darwin % cd cctools ; make # fails somewhere... ambitious...
# didn't spend any time trying to figure out why this failed yet...
battlej@icarus:~/Darwin % cd cctools/ld ; make kld_build ; cp libkld.a /usr/loca
l/lib ; ranlib /usr/local/lib/libkld.a
battlej@icarus:~/Darwin % cvs co System
battlej@icarus:~/Darwin % cd System/xnu
battlej@icarus:~/Darwin/System/xnu % source SETUP/setup.csh
battlej@icarus:~/Darwin/System/xnu % make exporthdrs
battlej@icarus:~/Darwin/System/xnu % make
battlej@icarus:~/Darwin/System/xnu % cp /mach_kernel /omach_kernel
battlej@icarus:~/Darwin/System/xnu % cp BUILD/obj/RELEASE_PPC/mach_kernel /mach_
kernel
and reboot...
g'luck,
Joe
battlej@groove.com
|
|
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: Nov 2000
Status:
Offline
|
|
This may pay off in the future but the risk v. reward for 1.3.1 is gone. The Darwin devs have been saying it just an international version, no added functionality.
10.0.2 is 1.3.2 anyways.
|
|
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Apr 2001
Location: New York, NY USA
Status:
Offline
|
|
10.0.2=1.3.2
yeah, I know.... the latest build available build checked out from the CVS tree builds as 1.3.1, and the latest tarball of xnu is 124-4.2
(10.0.2 = 124.7). what gives? I thought darwin was opensource!
aparently, apple is not commiting all of it's updates to the anoncvs tree.
|
|
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Apr 2001
Location: New York, NY USA
Status:
Offline
|
|
well, the reason I wanted to compile a new kernel in the first place was to enable KTRACE, so I could debug an app I was building.
I'm sad that it's such a complicated ordeal to get a new kernel that works properly under OSX. especially since there are so many features that could entice unix users over to OSX, if only they had some control over them...
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Enthusiast
Join Date: Sep 2000
Location: Cupertino, CA
Status:
Offline
|
|
Much of Darwin is developed live on the external trees. xnu is filtered to remove some encumbered code, thus it sometimes lags behind Apple's internal versions.
Note that while Darwin 1.3.2 from OS 10.0.2 is based on xnu-124.7, you can get xnu-127 which one of the current dev builds (xnu-124.7 is maintenance, I think). I should also note xnu-127 has major networking bugs, and you probably don't want to use it, but often the opensource repository is is ahead of what is released, sometimes it falls behind.
Louis
------------------
Louis Gerbarg
Darwin Developer
|
|
Louis Gerbarg
Darwin Developer
These are my views, and not the views of my employer.
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Apr 2001
Location: New York, NY USA
Status:
Offline
|
|
I appreciate your reply. I haven't been playing with darwin, but for a month or two, so I'm still getting a feel for how darwin relates to osx. thanks for the info.
I was thinking, would it be so hard to put tags into CVS to allow people to check out the version of darwin (or xnu, for example) that
corresponds to osx version 10.x.x. is this realistic
xnu-127: I noticed the netcode spoo. is there any real plan to rework the networking code in darwin? could you point me in the right direction on this?
tnx,
Joe
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|