Note that the configure script sets up the Makefiles to use the compiler and compiler options from your environment. You should set 4 environment variables, before calling configure. For example, in bash:
CC="egcs" CXX="$CC" CFLAGS="-Wall -O2 -m486 -fomit-frame-pointer -pipe" CXXFLAGS="$CFLAGS" export CC export CXX export CFLAGS export CXXFLAGS ./configureI cheat and use script files to do this for me. You can look in files such as ".conf.x86" to see what options I use, and how I invoke configure.
This table is divided into the options that most users will need and the more obscure options.
Option | Defaults to | Comments |
---|---|---|
--enable-cpu-level={3,4,5} | 5 | Select which CPU level to emulate. Choices are 3,4,5 which mean target 386, 486 or Pentium emulation. |
--enable-processors={1,2,3,...,15} | 1 | By changing to more than 1 processor, you enable SMP simulation. This allows you to boot Linux and maybe other OSes in SMP mode, and bochs will simulate all the different CPUs and communication between them. Do not expect this option to speed up your simulation! On the contrary, it has to spend extra time simulating the different CPUs (even if they're mostly idle) and the communication between them. Use it to try out an SMP OS if you don't have an SMP machine, or to debug your SMP OS drivers. Click here for more details on SMP in Bochs. |
--enable-cdrom | no | Enable use of a real CDROM. The cdrom emulation is always present, and emulates a drive without media by default. You can use this option to compile in support for accessing the media in your workstation's cdrom drive. The supported platforms are Linux, Solaris, OpenBSD, and Windows. For other platforms, a small amount of code specific to your platform must be written. The module iodev/cdrom.cc is the place to add more support. For the most part, you need to figure out the right set of ioctl() calls. |
--enable-sb16={dummy, win, linux} | no | Enable Sound Blaster emulation. SB16 output is only supported for Windows or Linux. The dummy option means to support an SB16, but don't use an output device. So for example, you might use '--enable-sb16=linux'. Check out sound.html for more info. |
--enable-cpp | no | Use .cpp as C++ suffix. Moves all the .cc files to .cpp for use with compilers which want that, like MS C++ compilers. Don't use this option unless you know you need it. |
--enable-debugger | no | Compile in support for Bochs internal command-line debugger. This has nothing to do with x86 hardware debug support. It is a more powerful and non-intrusive native debugger. Enabling this will of course slow down the emulation. You only need this option if you know you need it. After you have run ./configure, you may want to edit 'config.h' to customize the debugger further. Look at the section entitled 'OPTIONAL DEBUGGER SECTION'. |
--enable-disasm | no | Compile in support for built-in disassembler. Bochs has a built-in disassembler, which is useful if you either run the built-in debugger (--enable-debugger), or want disassembly of the current instruction when there is a panic in bochs. You don't need this option. |
--enable-vga | yes | Use VGA emulation. VGA is the only supported option and since it's the default, you don't need to include this option. |
--enable-fpu | no before bugfix2 yes for bugfix3 (5/16/2001) and after | If you want to compile bochs to make use of the FPU emulator written by Bill Metzenthen (the one used by the Linux kernel), use this option. |
--enable-x86-debugger | no | X86 debugger support. If the software you run in bochs needs to use the x86 hardware debugging facilities such as DR0..DR8, instruction and data breakpoints etc., then you should use this option. Otherwise don't use it, as it will slow down the emulation. |
--with-x11 | yes | Use X11 GUI. This is the default and you don't need this option if you are using X11. |
--with-rfb | no | Use RFB protocol to talk to AT&T's VNC Viewer. The RFB code was written by Don Becker, who has a Bochs-RFB web page on his site, http://www.psyon.org/bochs-rfb. |
--with-beos | no | Use BeOS GUI. The configure script will run natively on BeOS and use this option when doing so. |
--with-win32-vcpp | no | Use Win32 GUI/Visual C++ environment. This is for running configure on a platform which supports running configure, so that you may then transfer the configured code over to an MS Win32/Visual C++ environment. |
--with-macos | no | Use Macintosh/CodeWarrior environment |
--with-nogui | no | No native GUI, just use blank stubs. This is if you don't care about having video output, but are just running tests. This option may not be up-to-date, but can be made so easily. |
Option | Defaults to | Comments |
---|---|---|
--enable-ne2000 | no | Enable limited ne2000 support. This requires a low-level component to be written for each OS. One is written only for FreeBSD so far. Not complete yet. Don't use this option yet. |
--enable-pci | no | Enable limited i440FX PCI support. This is not complete. Don't use this option. |
--enable-port-e9-hack | no | Writes to port e9 go to console. Unless you know you want this option, you don't. |
--enable-loader | no | Support calling external loader from debugger. This is an unsupported option. Don't use it. |
--enable-instrumentation | no | Compile in support for instrumentation. This allows you to collect instrumentation data from bochs as it executes code. You have to create your own instrumentation library and define the instrumentation macros (hooks in bochs) to either call your library functions or not, depending upon whether you want to collect each piece of data. [Kevin wrote: I broke some of the hooks when I recoded the fetch/decode loop. Contact me if you need this option.] |
--enable-simid={0, 1} | 0 | CPU simulator ID. You likely don't need this option. If you are using bochs to cosimulate, that is to run multiple simulators in parallel so that you can compare results and check for divergence, each simulator needs an ID. When you only have one CPU simulator (as usual) the default of 0 is fine. I use this option occasionally to run 2 versions of bochs against each other and check for divergence, to find bugs etc. This option gets broken more than not due to architectural changes, and I usually end of fixing it each time I use it. |
--enable-num-sim={1, 2} | 1 | Number of CPU simulators. The default of 1 is likely what you want, so don't use this option. It is for assigning an ID to the simulator, for cosimulation described above. |
--enable-time0=n | no | Start CMOS clock at at time0 of n instead of using time(). You likely don't want this option. When debugging, it is very helpful to have deterministic execution, and the clock is something that can skew determinism. If you supply this option, pass it a value returned by the time(NULL) call, relating to the time you want bochs to start the CMOS clock from. For instance, '--enable-time0=917385580'. If you use this option but don't provide a value, configure uses a default value. Note that the time0 option in .bochsrc will override this value. Without this option, the CMOS clock uses a time0 based on the value of time(NULL), which is probably what you want. |
--enable-hga-dumps=Nmicroseconds | no | Copy memory to HGA video buffer every N useconds. A deprecated option, don't use. |
--with-win32 | no | Use Win32 GUI. I think this option was similar to --with-win32-vcpp, but for targeting a Win32/gcc environment. Deprecated option. |