📄 user.dbk
字号:
try to keep your directory in sync with the version you chose. In otherwords, when developers check in changes you will notsee them because your directory is "stuck" looking at an old version.To clear the sticky tag, use <command>cvs update -A</command>.</para><para>A variation on the sticky tag concept is a sticky date<footnote><para>According to some sources, this is when you eat dinner with someone, andaccidently spill a drink on him/her.</para></footnote>. If some feature was working at some time in the past, butis no longer working, you can ask CVS to give you the sources from anydate. <command>cvs update -D 2001-06-14</command> will download theBochs source as they were on June 14, 2001. Again, use <command>-A</command>to clear the sticky date and track the current sources.</para></section><section><title>More about CVS</title><para>Entire books have been written on CVS, so there's no sense in duplicatingit all here in the Bochs documentation. Some sources of additionalinformation are listed below.</para><itemizedlist><listitem><para>The <ulink url="http://www.cvshome.org">cvshome.comsite</ulink> has tons of CVS FAQs and documentation, including the official CVSmanual by Per Cederqvist.</para></listitem><listitem><para>Another <ulink url="http://www.cs.utah.edu/dept/old/texinfo/cvs/FAQ.txt">CVS FAQ</ulink> is available at University of Utah.</para></listitem></itemizedlist></section></section> <!-- End of Installation:Getting the source code with CVS --><section id="install-binary"><title>Installing a Binary</title><para>This section is divided up by platform, since installing a binary packageis different on different platforms.</para><section><title>Windows</title><para>unzip into some directory. Look for DOC-win32.htmlfor more instructions. Quick start: find dlxlinux/start.bat anddouble click</para><para>&FIXME;Someone needs to write this.</para></section> <!-- end of Installing a Binary:Windows --><section id="linuxrpm"><title>Linux RPM</title><para>RPM stands for "RedHat Package Manager." An RPM is a compressed filecontaining files to be installed on your system. Many Linux distributions,not just RedHat ones, can install files from an RPM. Debian packages areavailable for Bochs as well, but this section talks deals with RPMs. First,download the Bochs RPM for your architecture to your computer. For example, ifyou have an Intel-compatible computer, be sure to get the RPM that says "forLinux x86 distributions." Once you have the package on your local disk, youshould be able to install it as follows<footnote><para>Many distributions have their own RPM installer program, often graphical, andthey should work as well. It is helpful to be able to see the text output fromRPM, so if you use a fancy RPM installer, be sure to find the text output andcheck that it looks correct.</para></footnote>:<figure><title>Installing an RPM in Linux</title><screen> user$ <command>su</command> Password: root# <command>ls -l bochs-1.2.1.i386.rpm</command> -rw-rw-r-- 1 user user 1877515 Sep 14 09:02 bochs-1.2.1.i386.rpm root# <command>rpm -i bochs-1.2.1.i386.rpm</command> Looking for fonts to install... /usr/local/bochs/latest/ Looking for X11 Font Path... /usr/lib/X11/fonts Installing vga.pcf... ok (it was already there) Running mkfontdir... Done installing Bochs fonts for X11. root# exit user$ _</screen></figure></para><note><para>All RPM installations are done as the root user because they require permissionto update system files and directories. If you do not have root access youneed to compile Bochs in your home directory.</para></note><tip><para>If RPM installation fails, try running <command>rpm -e bochs</command> first toerase any old bochs RPMs. VGA Font failure? For now, look at old bochs docs for now for instructions oninstalling the VGA font by hand. &FIXME;Missing RPM dependencies? Try --nodeps option.</para></tip><para>The Bochs RPM installs three new commands and associated manual pages: bochs,bochs-dlx, and bximage. First, let's try out the DLX Linux demo by typing<command>bochs-dlx</command>. This command is installed into <filename>/usr/local/bin</filename>, so you might need to add thatdirectory to your <varname>PATH</varname> variable.<screen> user$ bochs-dlx Checking for bochs binary...ok Checking for DLX linux directory...ok Entering /usr/local/bochs/dlxlinux Running bochs ======================================================================== Bochs x86 Emulator 1.2.1 June 12, 2001 ======================================================================== 00000000000 [ ] looking for configuration in .bochsrc 00000000000 [ ] looking for configuration in bochsrc 00000000000 [ ] looking for configuration in bochsrc.txt 00000000000 [ ] reading configuration from bochsrc.txt 00000000000 [ ] using log file bochsout.txt</screen>Then you get a new X11 window containing the VGA display of the simulatedmachine. First you see the VGA BIOS screen, then Linux uncompresses andboots, and you get a login prompt. Type "root" and ENTER to log in toDLX linux.<figure><title>DLX Linux screenshot, running on Linux</title><graphic format="GIF" fileref="dlxlinux-in-linux.gif"></figure></para><para>If you get the DLX Linux screen, your Bochs installation is working correctly. This documentation will assume that everything is workingas expected, then there are some tips at the end in case any step goes wrong.</para><para>&FIXME;Point to all the files that get installed with the RPM: binaries,BIOSes, DLX linux, HTML docs and man pages, etc.</para></section> <!-- end of Installing a Binary:Linux section --></section> <!-- end of Installing a Binary --><section id="compiling"><title>Compiling Bochs</title> <section><title>Standard Compile</title><para>Bochs is written in C++, so you need a C++ compiler on your system. Mostplatforms have been tested with GNU gcc/g++, but other compilers are knownto work too. By now, you should have unpacked your source TAR file or checkedout Bochs from CVS. If not, you can return to <linklinkend="downloading">Downloading Bochs</link> for details. The top leveldirectory of the source code will be referred to as &bochsdir;. (&bochsdir;contains the files <filename>bochs.h</filename> and<filename>main.cc</filename> and subdirectories <filename>cpu</filename> and<filename>bios</filename>.) </para><para>The standard compile process has three basic steps:<command>configure</command>, <command>make</command>, and <command>makeinstall</command>. Each step is described in a separate section below. Thestandard compile process is used on all Unix machines, MacOS X, BeOS, and Cygwin (win32). There are separate instructions for <linklinkend="compiling-win32">compiling for Win32 with Microsoft VC++</link>.</para><section id="configure"><title>Configure</title><para>There is a script called <command>configure</command> which tests yourmachine, C/C++ compiler and libraries to discover what settings should work onyour system. If you run <command>configure</command> with no arguments afterit, defaults will be used for all settings. To change the settings, you canrun <command>configure</command> with options that override the defaults. You can get a list of valid configure options by typing<command>configure --help</command>. One useful configure option is--prefix=<replaceable>directory</replaceable>, which sets the directory inwhich Bochs will be installed. All the possible configure options aredocumented in a <link linkend="config-opts">later section</link>. </para><para>Among other things, the configure script tries to detect your platformand which compile options to use. If you want to control this, set theseenvironment variables before running configure: <varname>CC</varname>,<varname>CXX</varname>, <varname>CFLAGS</varname>,<varname>CXXFLAGS</varname>. Here is an example that sets the environmentvariables, using bash/ksh<footnote><para>The syntax for bash and ksh is given. In csh and variants, use the syntax<command>setenv <replaceable>VARIABLE</replaceable><replaceable>value</replaceable></command> to change environment variables.Do not use an equal sign for csh!</para></footnote>syntax:<screen> export CC=egcs export CXX="$CC" export CFLAGS="-Wall -O2 -m486 -fomit-frame-pointer -pipe" export CXXFLAGS="$CFLAGS"</screen></para><para>Once the configure script knows what options are selected,it creates a Makefile in every source code directory, and creates <filename>$BOCHS/config.h</filename> with all the option values writtenas preprocessor #defines. Now the sources are ready to compile.</para><section><title>Configure Shortcut Scripts</title><para>In the Bochs source directory, you will see a series of scripts called<filename>.conf.<replaceable>platform</replaceable></filename>.These scripts run the <command>configure</command> script for you, with a set ofoptions that are appropriate for that platform. It is not necessary touse the shortcut scripts; they are simply there to show you an example thatthe developers have used.<tip><para>If a shortcut script is "almost right" for you, just edit it and then run it!If you run a shortcut script, you don't need to run configure manually. </para></tip>Run a shortcut script using Bourne shell, like this:<screen> sh .conf.win32-vcpp</screen>These <filename>.conf.<replaceable>platform</replaceable></filename> have been tested in recent Bochs versions:<screen> .conf.linux .conf.sparc .conf.macosx .conf.win32-vcpp .conf.win32-cygwin .conf.AIX.4.3.1 .conf.beos-x86-R4</screen></para></section> <!-- end of Configure Shortcut Scripts --></section> <!-- end of Compiling:Unix:Configure --><section><title>Make</title><para>The <command>make</command> command compiles Bochs. Make is a programused by many software projects that reads the &Makefile; in each sourcedirectory and follows the instructions that it finds there. A &Makefile; tellswhich files depend on which other files, what commands to use to compile andlink the code, and more. After you have finished the configure step, just type<command>make</command> to build the source code. </para> <para>The reason that make is so popular is that it is smart about when to compileand when not to compile. If you run make once, it compiles every file. Butwhen you run it again, it checks to see if any source files have been modified;if not, there's nothing to do! For example, the &Makefile; says that<filename>main.o</filename> depends on <filename>main.cc</filename>. Knowing this, it will only compile <filename>main.cc</filename> if it is newer than<filename>main.o</filename>.</para><para>Of course, make can only do the right thing if the &Makefile; lists all thedependencies correctly, so human error can sometimes lead make astray.If make refuses to build something that you think it should, or you are getting strange compile errors, try doing <command>make all-clean</command>and then <command>make</command> again. All-clean means to clean upthe compiled files in every subdirectory, while <command>make clean</command>means to clean up just the current directory<footnote><para>This is different from the terminology of some other projects, and it may causeconfusion. Sometimes "clean" implies that all subdirectories are affected.</para></footnote>. However, it's important to note that <command>makeall-clean</command> leaves the configuration intact. You do not haveto run <command>configure</command> again.</para><para>If you're really in the mood for cleaning, <command>make dist-clean</command>erases all the configuration information too. In theory, after a dist-cleanyour directory should look much like when you first untarred it or checked itout. There's usually some extra stuff lying around, but the &Makefile; triesat least to erase any files that it created.</para></section><section><title>Make Install</title><para>Once the program has been built, the next step is typically to run<command>make install</command> to copy the executables, documentation, andother required files into a public place so that all users can use it.<footnote><para>&FIXME; We should mention what gets installed, and where. /usr/local/bochs/$VERSION/* /usr/local/bin/bochs (and bximage) /usr/man/man1/bochs*.1 (and bximage.1) make install_dlx option</para></footnote></para></section></section> <!-- end of Compiling:Unix section -->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -