Bochs 2.1 - Compile, Install and SetupBochs is a very popular, x86 emulator, capable of emulating the Intel IA32 CPUS along with common (IBM PC) input/output devices. For more information on Bochs, check out the Sig9 spotlight on it. I will try and explain, how to obtain the source code for the latest stable release (Bochs 2.1), compile, install and set it up. I am using Slackware 9.1, but the steps described here should work well for most linux/bsd distros. Getting BochsGetting Bochs is very easy. Its `free' and can be downloaded from the internet. You can download the tar'ed and gzip'ed source code for the latest stable release - Bochs 2.1, from here. Click here for more information on the latest stable releases. While you are downloading, it would be a very good idea to go through the Bochs FAQs. CompilingNow that you have obtained the source tarball, the next thing to do is extract the contents. Use the tar(1) utility to both unzip and untar it. Then change your current working directory to ./bochs-2.1. $tar -xvzf bochs-2.1.tar.gz $cd ./bochs-2.1 Now you are ready to get started with the compilation process. The first step towards compiling Bochs is to configure it for your system. This is taken care of by the configure scripts. You can specify configure options when you run the scripts to generate details specific to your needs. For a list of options use the following command. $./configure --helpA few options that might be of interest are -
For more information on configureable options, check out the user guide. So, depending on what options you want, you must run the configure script. If you simply run the the script, the default options for configuration are assumed. $./configure --enable-cdrom Assuming that the configuration has been taken care of, lets move on to the compilation part. Note that, Bochs is written in C++, so you'll need a C++ compiler. A part of the GCC, g++ is a commonly used C++ compiler for Linux systems. To compile, run the make utility, which will compile the source code according to the options you specified during configuration. $make all install The above command compiles all the source files to objects, links them, creates the binaries and installs them into proper locations. The compilation and installation part of Bochs is essentially over. You might want to clean the object files created, to do so, again use the make utility to clean them up. $make all-clean Remember that, if you need to enable or disable features in Bochs, you will have to reconfigure and recompile Bochs. For more information on compiling Bochs, check out the user guide. SetupTo setup Bochs for proper functioning, you must specify the location of ROM images, either explicity as parameters when starting Bochs or in an rc file. The source distribution of Bochs comes with the ROM image BIOS-bochs-latest. Besides that, you also need to specify the VGA BIOS image. An image distributed along with the sources is VGABIOS-lgpl-latest. Copy these files into a directory. Usually, in Unix systems, after installing Bochs, these images are copied to /usr/local/share/bochs/. As the next step, create an rc file in your home/working directory. For this, run Bochs.. $bochsOn doing so, you'll be presented with a configuration interface menu. ------------------------------ Bochs Configuration: Main Menu ------------------------------ This is the Bochs Configuration Interface, ... . . 1. Restore factory default configuration 2. Read options from... 3. Edit options 4. Save options to... 5. Begin simulation 6. Quit now . . Selecting option 3 will let you edit the options interactively. After doing so, use option 4 to write the configuration to a file, bochsrc (say). Once you write it to bochsrc, you can always edit it using your favorite editor. Make sure you specify the romimage and vgaromimage in that file. romimage: file=~/.bochsimages/BIOS-bochs-latest, address=0xf0000 vgaromimage: ~/.bochsimages/VGABIOS-lgpl-latest Note, that I have stored the images into a directory .bochsimages in my home directory. In addition to this, you must specify the devices you wish to emulate and state a bootable one too. Information on all this and more can be found in the user guide. This constitutes the basic setup process for Bochs. To run Bochs, type in the following.. $bochs -q bochsrcThis will begin the simulation immediately after the rc file, bochsrc, is loaded and processed.
|
TopicsRecent blog posts
|