
Getting the Source Code
|
125
Getting the Source Code
To get the Darwin source code, you’ll need to register with the Apple Open
Source web site and check the source code out of the CVS archive. (The ker-
nel source code weighs in at about 35 MB; after you compile the kernel, it
will occupy about 150 MB.) To register for CVS access, visit http://developer.
apple.com/darwin/tools/cvs/. That page should lead to a getting-started page,
where you can register as a user.
The first step in registering is to agree to the Apple Public Source License
(http://www.opensource.apple.com/apsl/). When you agree to that license,
you can create a username and password that lets you check files out of CVS
and view the web-based CVS archive.
Using CVS
When you register with Apple, you choose a username and password. You’ll
need to use that username and password when you log into CVS. The first
step is setting your
CVSROOT environment variable. Under tcsh, issue this
command:
setenv CVSROOT :pserver:username@anoncvs.opensource.apple.com:/cvs/Darwin
Under bash or zsh, use this command:
export CVSROOT=:pserver:username@anoncvs.opensource.apple.com:/cvs/Darwin
Replace username with your username. After you set this environment vari-
able, you can log into CVS with cvs login:
% cvs login
(Logging in to username@anoncvs.opensource.apple.com)
CVS password: ********
Checking out sources
To check out the source code for a module, use the checkout command:
cvs -z3 checkout [-r VERSION] modulename
The -z3 option tells CVS to use compression when transferring files.
seg_addr_table Works with segment address tables. cctools
seg_hack Changes segment names. cctools
setd/jointfilesconvert/428949/bg Operates as an interactive kernel debugger. at_cmds
Table 7-1. Darwin development tools (continued)
Tool Description CVS module
,ch07.839 Page 125 Friday, May 6, 2005 1:34 PM
Komentáře k této Příručce