Bochs/bochs/doc/docbook/user/user.dbk
Bryce Denney 749763770e - move platforms table to its own section
- add text in "Download Bochs" section
2001-09-12 13:16:03 +00:00

659 lines
24 KiB
Plaintext

<!--
================================================================
doc/docbook/user/user.dbk
$Id: user.dbk,v 1.5 2001-09-12 13:16:03 bdenney Exp $
This is the top level file for the Bochs Users 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 User Manual</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>
</authorgroup>
</bookinfo>
<!-- *************************************************************** -->
<chapter><title>Introduction to Bochs</title>
<section><title>What is Bochs?</title>
<para>
Bochs is a program that simulates a complete Intel x86 computer. It
can be configured to act like a 286, 386, 486, Pentium, or Pentium Pro.
Bochs interprets every instruction from power-up to reboot, and has
device models for all of the standard PC peripherals: keyboard, mouse,
VGA card/monitor, disks, timer chips, network card, etc. Because Bochs
simulates the whole PC environment, the the software running in the simulation
"believes" it is running on a real machine. This approach allows Bochs
to run a wide variety of software with no modification, include most popular
x86 operating systems: Windows 95/98/NT, all Linux flavors, all BSD flavors,
and more.
</para>
<para>
Bochs is written in the C++ programming language, and is designed to run
on many different host platforms<footnote>
<para>
Since Bochs can run on one kind of machine and simulate another machine, we
have to be clear in our terminology to avoid confusion. The host platform is
the machine that runs the Bochs software. The guest platform is the operating
system and applications that Bochs is simulating.
</para>
</footnote>, including x86, PPC, Alpha, Sun, and MIPS. No matter what the
host platform is, Bochs still simulates x86 software. In other words, it
does not depend on the native instructions of the host machine at all.
This is both a strength and a weakness, and it's the major difference between
Bochs and many other x86 emulation software such as plex86, VMware, etc.
Because Bochs uses software simulation for every single x86 instruction, it
can simulate a Windows application on an Alpha or Sun workstation. However,
the downside of Bochs's approach is simulation performance. To model the
processor accurately, Bochs must run many instructions for every simulated x86
instruction, and this makes the simulated machine many times slower than
the physical machine. Commercial PC emulators (VMware, Connectix, etc.) can
achieve much high emulation speed using a technique called
virtualization<footnote>
<para>
Virtualization takes advantage of simulating x86 instructions on an
x86 machine, allowing large portions of the simulation to take place
at native hardware speed. Whenever the simulated machine talks to the
hardware or enters certain privileged modes (such as in kernel code),
the simulator typically takes command and simulates that code in
software at much slower speed, just like Bochs does.
</para>
</footnote>, but they are neither portable to non-x86 platforms nor open
source. <ulink url="http://www.plex86.org">Plex86</ulink>, Kevin Lawton's
current project, is working toward an open-source x86 simulator with
virtualization.
</para>
<para>
To do anything interesting in the simulated machine, Bochs needs to communicate
with the operating system on the host platform (the host OS). When you press a
key in the Bochs display window, a key event goes into the device model for the
keyboard. When the simulated machine needs to read from the simulated hard
disk, Bochs reads from a disk image file on the host machine. When the
simulated machine sends a network packet to the local network, Bochs uses the
host platform's network card to send the packet out into the real world. These
interactions between Bochs and the host operating system can be complicated,
and in some cases they are host platform specific. Sending a network packet in
FreeBSD requires different code than sending the packet in Windows 95, for
example. For this reason, certain features are supported on some host
platforms and not others. On Linux, Bochs can simulate a network card that
communicates with the world, but on BeOS the simulated network card may not
work because the communication code between the device model and the BeOS
operating system has not been written.
</para>
<para>
<!-- really more like Background or Bochs History, but maybe it doesn't need its own section unless it gets to 3 paras or so -->
Bochs was written by Kevin Lawton starting in 1994. It began as a
commercial product, which ...&NEEDHELP; <footnote>
<para>
We need a Bochs historian to help out here. For background, it would be
interesting to know how much Bochs used to cost and what it was used for. I
thought I saw an interview out there somewhere where Kevin says why he started
it and some more background information.
</para>
</footnote> Finally, in March 2000, Mandrakesoft bought Bochs and made it open
source under the GNU LGPL.
<!--
we should make it clear that Kevin is no longer working on bochs,
but I want to get some more background. Did he get hired by Mandrakesoft
to do plex86 at the same time as Bochs was bought? In his linux.com interview
Kevin said: "The only way I can move Bochs to open source is if someone
sponsors that happening. That would be ideal, and would enable me to focus more
on Bochs and FreeMWare, rather than be sidetracked with related consulting
jobs."
The last version of Bochs that he released was 3/25/2000, three days after the
Mandrake press release.
-->
In March 2001, Kevin helped a few developers to move all Bochs activities from bochs.com to a new site at bochs.sourceforge.net. Since then the Bochs Project has settled into its new home, and around release times has even hit #1 most active project of the week at Source Forge. </para> </section> <!-- end of Introduction:What is Bochs? section --> <section><title>Who uses Bochs?</title> <para> It is hard to estimate how many people have tried Bochs or use it on a regular basis, but a few statistics give an indication. The bochs-developers mailing list, which is the primary source of news on bugs and releases, has over 300 subscribers. The latest version has been downloaded over 40,000 times from SourceForge, not counting mirrors or CVS users.
</para>
<para>
Bochs has many different uses, and different people use it for different
things. Many people use it to run applications in a second operating system
without needing two different computers or dual-booting. Running
Windows software on a non-x86 workstation or on an x86 Linux box are common
uses. Also, because every hardware instruction and every line of simulator
code is accessible, Bochs is used extensively for debugging new operating
systems and profiling. If you were writing boot code for your home-brewed
x86 operating system and it didn't work right, booting it in Bochs could
give you great visibility into what is really going on. The Bochs
debugger lets you simulate quickly or slowly, pausing whenever you want
to look at the contents of memory or the CPU registers. Or, if you
wanted to study which parts of a program take the most time, you could use
Bochs to measure often pieces of the code were executed.
</para>
<para>
Bochs has been used as a teaching tool in Operating Systems classes, in which
students used it to learn how the PC hardware works. As a final project the
students had to add a new peripheral device, so they had to learn all about I/O
ports, interrupts, and device drivers. Also, it has been used as a
reference model to test x86-compatible hardware.
</para>
<para>
There may be as many uses of Bochs as there are users. Do you want to run
your old DOS games? Or learn to program under Linux, without leaving your
Windows desktop? You decide.
</para>
</section> <!-- end of Introduction:Who uses Bochs? section -->
<section><title>Will it work for me?</title>
<para>
Bochs is very useful for some applications, and not well suited to others.
This section tries to answer the question, "Will Bochs work for me?"
</para>
<para> &FIXME; </para>
<!--
I want this section to set reasonable expectations for people before they
try out Bochs. They should not expect to find blazing speed and complain
to the list because Bochs perfoms so poorly compared to their VMWare demo.
For simulating x86 on x86, if they want blazing speed they should look
at a commercial simulator or plex86 (though it's still in development so
it's not fast yet).
Another factor is ease of setup. With bochs you have to go editing config
files in a text editor (with a very picky syntax), which is not for
everybody.
<para>
If you are running on a x86 hardware, you have a range of choices.
Check the installation section for your host platform to see what
options Bochs supports on your platform<footnote>
<para>
&FIXME; Well, it will when it has been written.
</para>
</footnote>. Bochs will run on Windows, Linux,
FreeBSD, OpenBSD, or BeOS. If the most important factor is speed, you may
want to try a virtualization product instead of Bochs (VMware, plex86).
</para>
<para>
If you are using a non-x86 machine, then Bochs is one of the few choices for
running x86 software. Bochs has been known to work on Solaris (Sparc),
Linux (PowerPC/Alpha), MacOS (PowerPC), IRIX (MIPS), BeOS (PowerPC), Digital
UNIX (Alpha), and AIX (PowerPC).
</para>
-->
<para>
You can also find more detailed testing information on the testing
status page on the &bochswebsite;. The testing status page tells which
combinations of host platform and guest platform have been tried by other Bochs
users.
</para>
</section> <!-- end of Introduction:Will it work for me? section -->
<section><title>License</title>
<para>
Bochs is distributed under the
<ulink url="http://www.gnu.org/copyleft/lesser.html">GNU Lesser General Public
License</ulink> (LGPL). It was originally a commercial product, but in
March 2000 <ulink url="http://www.linux-mandrake.com">MandrakeSoft</ulink>
bought Bochs and committed it to Open Source.
</para>
</section> <!-- end of Introduction:License section -->
</chapter> <!-- End of Introductino to Bochs -->
<!-- *************************************************************** -->
<chapter><title>FAQ</title>
<qandaset>
<qandaentry>
<question>
<para>Is Bochs Open Source?</para>
</question>
<answer>
<para>
Yes! Bochs is released under the <ulink url="http://www.gnu.org/copyleft/lesser.html">GNU LGPL</ulink>,
much thanks to <ulink url="http://www.linux-mandrake.com">MandrakeSoft</ulink>, makers
of the Linux-Mandrake distribution.
</para>
</answer>
</qandaentry>
<qandaentry>
<question>
<para>How do you pronounce "bochs"?</para>
</question>
<answer>
<para>
Phonetically the same as the English word "box". It's just a play on the word "box", since techies like to call their machines a "Linux box", "Windows box", ... Bochs emulates a box inside a box.
</para>
</answer>
</qandaentry>
<qandaentry>
<question>
<para>Who is the author of bochs?</para>
</question>
<answer>
<para>
Kevin Lawton is the primary author of bochs. There have been bug fixes, enhancements, and code contributions from some few hundred people, so it is not possible to list them all. Kevin is presently working on a PC virtualization project called <ulink url="http://www.plex86.org">plex86</ulink> and no longer maintain bochs.
</para>
</answer>
</qandaentry>
<qandaentry>
<question><para>
Who maintains bochs now?
</para></question>
<answer><para>
With Kevin's help, in April 2001, the members of the bochs-developers mailing list set up a new official bochs site hosted by <ulink url="http://sourcefourge.net">Source Forge</ulink>. The current admins on this project are Bryce Denney and Greg Alexander.
</para></answer>
</qandaentry>
<qandaentry>
<question><para>
Tell me about peformance when running bochs?
</para></question>
<answer><para>
Because Bochs emulates every x86 instruction and all the devices in a PC system, it does not reach high emulation speeds. Kevin reported approximately 1.5MIPS using bochs on a 400Mhz PII Linux machine. Users who have an x86 processor and want the highest emulation speeds may want to consider PC virtualization sotware uch as plex86 (free) or vmware (commercial).
</para></answer>
</qandaentry>
<qandaentry>
<question><para>
Does bochs use a disk partition to install the OS?
</para></question>
<answer><para>
No. You use a disk image file, which is simply a large file, like any other file, on your platform's disk.
</para></answer>
</qandaentry>
<qandaentry>
<question><para>
Why can't I use Bochs with my current Win95 installation?
</para></question>
<answer><para>
Think about this. If you had two different PC's, they would require different hardware drivers. So you may not be able to safely move a disk drive with Win95 on it, from one to the other. Bochs is no different. It emulates a certain set of hardware devices, and requires each OS be configured for those devices.
</para></answer>
</qandaentry>
<qandaentry>
<question><para>
Is there a developer's email list for bochs?
</para></question>
<answer><para>
Yes. For instructions on joining, go to
<ulink url="developers.html">Developers email-list.</ulink>
</para></answer>
</qandaentry>
<qandaentry>
<question><para>
Is there an irc channel for bochs?
</para></question>
<answer><para>
Not that I am aware of.
</para></answer>
</qandaentry>
<qandaentry>
<question><para>
Do you know of any snapshots of Bochs running Win95?
</para></question>
<answer><para>
Yes! Look for "screen shots" on the <ulink url="http://bochs.sourceforge.net">Bochs home page</ulink> or on other Bochs sites.
</para></answer>
</qandaentry>
<qandaentry>
<question><para>
Does bochs support a CDROM?
</para></question>
<answer><para>
Yes, a CDROM is supported in Linux, Windows, and OpenBSD. The
CDROM drivers for bochs allow the guest operating system to access the
host operating system's CDROM data directly.
</para></answer>
</qandaentry>
<qandaentry>
<question><para>
Does bochs support a sound device?
</para></question>
<answer><para>
Yes, there is Sound Blaster emulation support for Windows and Linux.
</para></answer>
</qandaentry>
<qandaentry>
<question><para>
Does bochs support a network card?
</para></question>
<answer><para>
Supposedly yes. There is emulation for an NE2000 NIC in the current
releases, though I have not heard whether it works or not. If you try it,
please fill out a testing form or bug report.
</para></answer>
</qandaentry>
<qandaentry>
<question><para>
What applications are known to run inside of bochs?
</para></question>
<answer><para>
Well, lot's of different OS's run inside of bochs, so
thousands. I'm assuming your asking about Windows programs.
To give you a few, the following ones from the Winstone'98 tests
worked:
</para>
<itemizedlist>
<listitem>
<para>Access 97</para>
</listitem>
<listitem>
<para>CorelDRAW! 7</para>
</listitem>
<listitem>
<para>Excel 97</para>
</listitem>
<listitem>
<para>Lotus 1-2-3 97</para>
</listitem>
<listitem>
<para>Word 97</para>
</listitem>
<listitem>
<para>PowerPoint 97</para>
</listitem>
<listitem>
<para>Quattro Pro 7</para>
</listitem>
<listitem>
<para>WordPerfect 7</para>
</listitem>
</itemizedlist>
<para>Also, I've compiled an entire OS kernel inside bochs before. Not
to mention, running DOOM, though at then-pathetic speeds.
</para></answer>
</qandaentry>
<!-- ......................................................
A blank question to fill in copy and paste to create
a new entry (8 lines to yank)
......................................................
<qandaentry>
<question><para>
Question is put here
</para></question>
<answer><para>
Answer is put here.
</para></answer>
</qandaentry>
-->
</qandaset>
</chapter>
<!-- *************************************************************** -->
<chapter><title>Installation</title>
<section><title>Platforms</title>
<table><title>Supported platforms</title>
<tgroup cols=2 align=left colsep=1 rowsep=1>
<tbody>
<row>
<entry>Unix/X11</entry>
<entry>This was Kevin's main development platform.</entry>
</row>
<row>
<entry>BeOS</entry>
<entry>Kevin Lawton also did this port, originally to R3/PPC using CodeWarrior.
It now works on R4/x86 with egcs. Simon Huet picked up
maintaining/reworking the BeOS GUI port. Check out Simon's
BeBochs page.
</entry>
</row>
<row>
<entry>Win32</entry>
<entry> This port was done by David Ross. I've enhanced
the build process
for Win32. You can compile with either the MS Visual C++ 5.0
or GNU-Win32 environments. Go to Compiling Bochs on Win32 </entry>
</row>
<row>
<entry>OS/2</entry>
<entry> Nick Behnken used PE2LX to translate David Ross's Win32
port to an OS/2 program. Check out Nick Behnken's page.
</entry>
</row>
<row>
<entry>OS/2</entry>
<entry> Craig Ballantyne ported bochs to OS/2. I will
integrate this back
into the main bochs source soon. Check out the guiSoft Corp.
home page.
</entry>
</row>
<row>
<entry>Macintosh</entry>
<entry>David Batterham drbatter@socs.uts.edu.au or
drbatter@yahoo.com ported bochs to the Mac. His changes are
integrated, though it is work in progress.
He compiled with CodeWarrior
Pro R1 (CW12), and included a project file 'Bochs.proj'
in the top-level
directory of source code, which you may need to modify. I
added a '--with-macos' option to configure, so you can use a Unix
machine to generate header files for the Mac. Check out David's
MacBochs website. David has not had time to maintain the page or the
Mac port since early 2000. If you have Mac
development tools and want
to contribute, contact the developers list. </entry>
</row>
<row>
<entry>FreeDOS for Bochs</entry>
<entry> David Batterham also offers information on running FreeDOS inside of bochs. You can download a disk image with a pre-installed copy of FreeDOS, a completely free DOS-like operating system. Check out his website at http://members.xoom.com/macbochs/freedos.html.
For more info about FreeDOS, see FreeDOS Web page</entry>
</row>
</tbody>
</tgroup>
</table>
</section> <!-- End Platforms section -->
<section><title>Downloading Bochs</title>
<para>
You can download Bochs from our web site at &bochs-sf-net;. On the download
page, you will find the latest release version (binaries and source code)
and also some development versions. If you trying to get things working
for the first time, a release version is recommended since it has been
tested the most. We have precompiled binaries for many platforms, which
can save you the troubles (and joys) of compiling Bochs yourself. Most
binary packages come with a small demo of a guest operating system called DLX
Linux. If you choose to compile it yourself, you have a lot more flexibility
in which devices you enable.
</para>
<para>
For those familiar with CVS software, you can also obtain the sources for any
version using CVS. See the CVS instructions<footnote>
<para>
&FIXME; section doesn't exist yet
</para>
</footnote>
for details.
</section> <!-- End of Installation:Downloading Bochs section -->
<section><title>Installing a Binary</title>
<section><title>Windows</title>
<para>
unzip into some directory. Look for DOC-win32.html
for more instructions. Quick start: find dlxlinux/start.bat and
double click
</para>
</section>
<section><title>Unix</title>
<para>
<command>rpm -i bochs-&lt;VERSION>;.rpm</command>
Look for <filename>/usr/local/bochs/latest/DOC-linux.html</filename>, man pages for
bochs. Quick start: <command>run bochs-dlx</command> (in <filename>/usr/local/bin</filename>)
</para>
</section>
</section>
<section><title>Compiling from source</title>
<section><title>Unix</title>
<para>
All releases are gzip'd tar files. That means the whole Bochs source code directory has been consolidated into one file using the Unix command 'tar', then compressed to save space with GNU 'gzip'. To extract the source code, you'll need both 'tar' and 'gzip/gunzip'. All files are contained within one subdirectory named 'bochs-YYMMDDv'.
<screen>
<userinput>
cd /path/parent-directory
gzip -dc bochs-YYMMDDv.tar.gz | tar -xvf -
cd bochs-YYMMDDv
</userinput>
</screen>
</para>
<para>
Run configure to make the Makefiles
List of configure arguments
Option of using .conf.* scripts
What to report if configure fails: Tar up config.* and send to
bochs-testing@tlw.com
Make
What to try if make fails: turn off configure options,
look at SF bugs and patches section to see if it's a known
problem, try to fix it yourself, if using CVS version try
a release source file instead, fix it yourself
Make install, what it installs and where
/usr/local/bochs/$VERSION/*
/usr/local/bin/bochs (and bximage)
/usr/man/man1/bochs*.1 (and bximage.1)
make install_dlx option
How to build an RPM in Linux
</para>
</section>
<section><title>Instructions for win32 VC++</title>
<para>
Getting the makefiles
Download them from web site in a zip, install them on top
of the source directory
Run configure on a unix box, copy the Makefiles and config.h
to your windows machine
RUN CONFIGURE IN BOCHS! This would be awesome.
Cygwin?
Building it with NMAKE
Installation? Maybe download an existing windows binary package
and drop in your new binary. There is no make install, though
this may be added some day.
</para>
</section>
<section><title>Instructions for cygwin?</title>
<para>I have no idea.</para>
</section>
</section>
</chapter>
<chapter><title>Setup</title>
<section><title>What does Bochs need?</title>
<para>
bochsrc, BIOS, VGABIOS, VGA font, disk images.
table of bochsrc options and what they do
BIOS/VGABIOS, what do they do?
VGA font, how to install it
disk images
where to find one pre-made
make a blank one with bximage
grab one from a real hard disk
</para>
</section>
</chapter>
<chapter><title>Using Bochs</title>
<para>
Resources for users
bochs-developers mailing list, archive
testing status page: tells what has been tried and who got it working
SourceForge
look for bug reports
how to report problems, make feature requests
</para>
</chapter>
<chapter><title>Common problems and what to do about them (Troubleshooting)</title>
<para>
What's a panic? How to report it to bug tracker, how to make
it non-fatal.
Mouse behavior, enabling and disabling
Keyboard mapping problems
[...]
</para>
</chapter>
<chapter><title>Tips and Techniques</title>
<para>
Mount disk image in loopback
Using two hard disks
[...]
</para>
</chapter>
<chapter><title>Guest operating systems</title>
<section><title>Linux</title>
<para>
What disk images are available.
Installing from scratch.
What works
Known problems
</para>
</section>
<section><title>OpenBSD</title>
<para>
</para>
</section>
<section><title>FreeBSD</title>
<para>
</para>
</section>
<section><title>FreeDOS</title>
<para>
</para>
</section>
<section><title>DOS</title>
<para>
</para>
</section>
<section><title>Windows *</title>
<para>
</para>
</section>
<section><title>[...]</title>
<para>
</para>
</section>
</chapter>
</book>