Configuring and Compiling bochs

You may want to use bochs on your own computer with gdb support. Follow these steps to do this (On a UNIX-like system):
  1. Download the source

    Download the latest stable release (at the time of writing 2.1.1) from sourceforge. You want to get a tar.gz file.

  2. Extract the source code

    Do "tar xzf bochs-X.Y.Z.tar.gz", where X.Y.Z is the version number of the source you downloaded.

  3. Configure the code

    Run the Bourne shell script "configure" with at least the option "--enable-gdb-stub".
    Example: "./configure --enable-gdb-stub".
    You may want to try "./configure --help" for a list of options you may wish to add (e.g. "--enable-port-e9-hack"). Note that the options"--enable-x86-debugger" and "--enable-external-debugger" do not work together with the "--enable-gdb-stub" option.

    If you do not wish to build the code in the same directory that the sources are in, you can "cd" to a separate build directory and then run the "configure" script from there.

  4. Build bochs

    Once the configure script has finished its work, you should have a "Makefile" in the source (or build) directory. Doing "make" in this directory should get the build process going.

  5. Install bochs

    Once the build is successful, you should install the program. You may need to become the superuser "root" or have special privileges for the command "make install" to work.

  6. Cleaning up (optional)

    When you have successfully installed bochs, you might not want intermediate files from the build process (e.g. relocatable object files) taking up space on your filesystem. You can remove these by doing "make clean" in the source (or build) directory.

    At this point, you may also opt to not keep the unpacked source lying around, and deleting the source (and build) directory entirely is now safe to do. You might want to hold on to the compressed tar-archive and the "config.status" script, just in case you want to rebuild using your current configuration later.

Last modified: Wed Nov 3 10:20:48 CET 2004