1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289
|
<!--
================================================================
doc/docbook/development/development.dbk
$Id: development.dbk,v 1.3 2001/11/17 17:15:38 bdenney Exp $
This is the top level file for the Bochs Developers Manual.
================================================================
-->
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
<!-- include definitions that are common to all bochs documentation -->
<!ENTITY % bochsdefs SYSTEM "../include/defs.sgm">
%bochsdefs;
]>
<book>
<bookinfo>
<title>Bochs Developers Guide</title>
<authorgroup>
<author><firstname>Kevin</firstname><surname>Lawton</surname></author>
<author><firstname>Bryce</firstname><surname>Denney</surname></author>
<editor><firstname>Michael</firstname><surname>Calabrese</surname></editor>
<editor><firstname>Vasudeva</firstname></editor>
</authorgroup>
</bookinfo>
<!-- *************************************************************** -->
<chapter><title>Resources for developers</title>
<para>
The development guide describes resources that are intended for developers
in particular. Many Bochs resources are also covered in the User Guide,
including compile instructions, bochsrc options, how to find the mailing
lists, etc.
</para>
<section><title>Setting up CVS write access</title>
<para>
If you are an official SourceForge developer, then you can use CVS with write
access. The CVS contains the most recent copy of the source code, and with
write access you can upload any changes you make to the CVS server for others
to use. A few extra steps are required the first time you use CVS write
access.
</para>
<section><title>Install ssh and cvs</title>
<para>
First you need to install both cvs (Concurrent Version System) and ssh (Secure
Shell). These are already installed on many UNIX systems and also Cygwin
(win32 platform). If not, you can install binaries or compile cvs and ssh
yourself. The links below should help you get going.
</para>
<itemizedlist>
<listitem> <para> CVS software and instructions are available at <ulink url="http://www.cvshome.org">www.cvshome.org</ulink>. </para> </listitem>
<listitem> <para> A free version of secure shell called OpenSSH is at <ulink url="http://www.openssh.org">www.openssh.org</ulink>. </para> </listitem>
<listitem> <para> OpenSSH requires a library called OpenSSL from <ulink url="http://www.openssl.org">www.openssl.org</ulink>. Be sure to install OpenSSL before trying to compile OpenSSH. </para> </listitem>
</itemizedlist>
</section>
<section><title>ssh to cvs.sf.net</title>
<para>
Next, you need to use secure shell to connect to cvs.sf.net. This step is a
little strange, because you can't actually log in and get a shell prompt. All
that will happen, when you get the username and password right, is that it
will create a home directory on that machine for you. That's it! If you try
it again, it will say "This is a restricted Shell Account. You cannot execute
anything here." At this point, you've succeeded and you never have to do
this step again, ever.
<screen>
ssh <replaceable>sfusername</replaceable>@cvs.sf.net
</screen>
</para>
<para>
Replace <replaceable>sfusername</replaceable> with your Source Forge username,
of course. The first time, you will probably get a message like
<screen>
The authenticity of host 'cvs.sf.net' can't be established.
Are you sure you want to continue?</screen>
Just type yes. When it asks for a password, be sure to type your source
forge password. If you have trouble logging in, be sure to use your SOURCE
FORGE username and password in the ssh line, which isn't necessarily the same
as your local username and password. Add the "-v" option to ssh to see more
information about what is failing. If you have ssh version 2, it is possible
that you might need to add "-1" to the ssh command to force it to use the
version 1 protocol. </para> </section>
<section><title>Set CVS_RSH environment variable to ssh</title>
<para>
Every time you connect to the Source Forge CVS server (including cvs update,
stat, commit, etc.), you must set the CVS_RSH environment variable to ssh. So
just take the time now to add one of these lines to your .bashrc/.cshrc, so
that the CVS_RSH setting will be there every time you log in.
</para>
<screen>
export CVS_RSH=ssh (bash syntax)
setenv CVS_RSH ssh (csh syntax)
</screen>
</section> <!--end of "Set environment variable"-->
<section><title>cvs checkout</title>
<para>
Finally, you should be able to do the checkout! If you already have a bochs
subdirectory directory, move it out of the way because the checkout will
overwrite it.
</para>
<screen>
export CVSROOT=":ext:<replaceable>sfusername</replaceable>@cvs.bochs.sourceforge.net:/cvsroot/bochs"
cvs -z3 checkout bochs
<replaceable>sfusername</replaceable>@cvs.sf.net's password: <replaceable><--type your password</replaceable>
</screen>
<para>
In the CVSROOT variable, replace <replaceable>sfusername</replaceable> with your SF username. There's
no need to add CVSROOT to your rc files because CVS will remember it
after the checkout. The -z3 (optional) just adds some compression to make
the checkout go faster. Once all the files have been downloaded, you will
have a bochs directory which is checked out with write access!
</para>
</section> <!-- end cvs checkout -->
</section> <!-- end setting up cvs write access -->
<section><title>Using CVS write access</title>
<section><title>Checking in files</title>
<para>
Once you have a bochs directory with cvs write access, you can compile the
files, edit them, test them, etc. See the documentation section, "Tracking
the source code with CVS" for more info on CVS, in the User Manual.
(FIXME: add cross reference) But what's new and different is that you can now
do cvs commits. When a file is all fixed and ready to share with the rest of
the world, you run a commit command to upload your version to the server.
First, it's good to do a cvs update to make sure nobody else has changed it
since you downloaded it last.
</para>
<screen>
$ cvs update file.cc
<replaceable>sfusername</replaceable>@cvs.sf.net's password: <replaceable><--type your password</replaceable>
$ cvs commit file.cc
<replaceable>sfusername</replaceable>@cvs.sf.net's password: <replaceable><--type your password</replaceable>
[editor opens. type log message, save, and exit.]
</screen>
<para>
When CVS starts an editor, The default is usually vi. If you want a different
editor, set the EDITOR environment variable to the name of your preferred
editor. When you're done, just save the file and quit the editor. Unless
there's some problem, you will see a message that says what the new revision
number for the file is, and then "done". If while you're editing the log
message, you decide that you don't want to commit after all, don't save the
file. Quit the editor, and when it asks where the log message went, tell it
to abort.
</para>
<para>
Here is an example of a successful checkin:
<screen>
$ cvs commit misc.txt
<replaceable>sfusername</replaceable>@cvs.sf.net's password: <replaceable><--type your password</replaceable>
[edit log msg]
Checking in misc.txt;
/cvsroot/bochs/bochs/doc/docbook/misc.txt,v <-- misc.txt
new revision: 1.6; previous revision: 1.5
done
</screen>
And here is an aborted one:
<screen>
$ cvs commit misc.txt
<replaceable>sfusername</replaceable>@cvs.sf.net's password: <replaceable><--type your password</replaceable>
[quit editor without saving]
Log message unchanged or not specified
a)bort, c)ontinue, e)dit, !)reuse this message unchanged for remaining dirs
Action: a
cvs [commit aborted]: aborted by user
</screen>
</para>
</section> <!--end of "Checking in Files" -->
</section> <!--end of "Using CVS write access" -->
<section><title>SourceForge bug, feature, and patch trackers</title>
<para>
&FIXME;
</para>
</section>
<section><title>Ideas for other sections</title>
<para>
<screen>
Ideas:
- how to browse code with cvsweb
- how to find an identifier, variable, or specific text in the code
- write access CVS (must be an official developer on SF)
- how to make patches with CVS
</screen>
</para>
</section>
</chapter>
<chapter><title>About the code</title>
<section><title>Directory Structure</title>
<para>
&FIXME;
cpu directory does this, iodev does that, gui does that
</para>
</section>
<section><title>Configure Scripting</title>
<para>
&FIXME;
configure script, makefiles, header files
</para>
</section>
<section><title>Log Functions</title>
<para>
&FIXME;
log functions: what is a panic, what is an error, etc.
</para>
</section>
<section><title>Emulator Objects</title>
<para>
&FIXME;
objects that do all the work (cpu, mem)
</para>
</section>
<section><title>timers</title>
<para>
&FIXME;
</para>
</section>
</chapter>
<chapter><title>Debugger</title>
<section><title>compile with debugger support</title>
<para>
&FIXME;
</para>
</section>
<section><title>get started in debugger</title>
<para>
&FIXME;
</para>
</section>
<section><title>command reference</title>
<para>
&FIXME;
</para>
</section>
<section><title>techniques</title>
<para>
&FIXME;
</para>
</section>
</chapter>
<chapter><title>Coding</title>
<section><title>coding conventions</title>
<para>
&FIXME;
</para>
</section>
<section><title>patches:</title>
<para>
&FIXME;
how to make, where to submit, what happens then?
</para
</section>
<section><title>life cycle of a CVS release</title>
<para>
&FIXME;
</para>
</section>
</chapter>
</book>
|