cd /path/parent-directory gzip -dc bochs-YYMMDD.tar.gz | tar -xvf - cd bochs-YYMMDDBefore compiling, you'll need to run the configure script, which will configure source code to run on your system, and with your chosen options. There are many options to 'configure', and some depend upon which OS you plan to run within Bochs. To see a complete list:
unix-> ./configure --helpOptions to 'configure':
--enable-inlines use inlines for instruction funcs --enable-debugger compile in support for Bochs internal debugger --enable-8086 target emulation is 8086 --enable-80286 target emulation is 80286 --enable-80386 target emulation is 80386 --enable-native-floppy allow use of native floppy device --enable-dma-floppy-io allow use of DMA/floppy IO xfers --enable-v8086-mode allow use of virtual 8086 mode --enable-paging allow use of paging --enable-tasking allow use of tasking --enable-vga use VGA emulation --enable-memory=Nmegs configure emulator with Nmegs RAM --enable-hga-dumps=Nmicroseconds copy memory to HGA video buffer every N useconds --enable-external-device-models use external hardware device models --enable-external-cpu-memory use external CPU+memory simulation environment --enable-bochs-bios-hooks compile in native Bochs BIOS hooks --enable-processor-ips=IPS processor speed in instructions/sec --enable-tlb use a TLB for faster paging --enable-smf use static member functions for speedSet your CC & CFLAGS environment flags for your compiler and optimization flags. For example, on a SuperSparc with GCC: (CSH)
unix-> setenv CC gcc unix-> setenv CFLAGS "-Wall -O3 -mv8 -msupersparc -mno-epilogue"...or on an x86 with Linux and GCC: (CSH)
unix-> setenv CC gcc unix-> setenv CFLAGS "-Wall -O3 -m486 -fomit-frame-pointer -pipe"Now run the configure script with necessary options. For example, for Win'95 I use the following. Note that the 'megs:' directive in your '.bochsrc' file will override the '--enable-memory=' option if you supply one, but you might as well compile in a reasonable default.
# for Win '95 unix-> ./configure --enable-memory=16 \ --enable-bochs-bios-hooks \ --enable-processor-ips=400000 # for Minix, you need DMA/Floppy IO emulation unix-> ./configure --enable-memory=16 \ --enable-bochs-bios-hooks \ --enable-processor-ips=400000 \ --enable-dma-floppy-ioIf the configure script bombs, check 'config.log'. Specifically, look for errors returned by the compiler. You may have options incompatible with your compiler. See the section on setting the CC & CFLAGS above.
Assuming at this point all went well with the configure command, you may compile the source.
unix-> make
There are two options; you may install the VGA font in a global place, or in a local directory. You may need to install it locally if you don't have root access.
Option 1: installing VGA font in global font directory
# NOTE1: Make sure your DISPLAY variable points to local machine. # NOTE2: These steps require root privileges. # NOTE3: Your X11 fonts path will vary on different systems. For example: # Solaris 2.x /usr/openwin/lib/X11/fonts # Linux /usr/lib/X11/fonts/ root-> cp font/vga.pcf font-path-here/misc root-> compress font-path-here/vga.pcf root-> mkfontdir font-path-here/misc root-> xset fp rehashOption 2: installing VGA font in local font directory
# NOTE1: Make sure your DISPLAY variable points to local machine. # NOTE2: The "xset" command needs to be run for each X session. user-> mkfontdir bochs-YYMMDD/font user-> xset fp+ [full-path]/bochs-YYMMDD/fontHard Drive Image File: Bochs emulates a hard drive by using a large Unix file, which you must create. The size of the hard drive is dependent upon the number of cylinders, heads, and sectors-per-track that you would like to emulate. Here are some examples of possible drive geometries:
Size | Cylinders | Heads | Sectors/Track | Sectors Total |
---|---|---|---|---|
10MB | 306 | 4 | 17 | 20808 |
20MB | 615 | 4 | 17 | 41820 |
30MB | 615 | 6 | 17 | 62730 |
46MB | 940 | 6 | 17 | 95880 |
62MB | 940 | 8 | 17 | 127840 |
112MB | 900 | 15 | 17 | 229500 |
483MB | 1024 | 15 | 63 | 967680 |
unix-> dd if=/dev/zero of=112M bs=512 count=229500Floppy Disk Image File: Bochs emulates a floppy drive/disk using either a Unix file, or a real floppy drive Unix device. To use either, you will need an entry in your '.bochsrc' file pointing to the regular or device file. Use the 'floppya:' and 'floppyb:' directives. If you are starting out, you will need to make a copy of an existing bootable floppy. Otherwise, you may create a blank image file, if you intend on formatting it using the OS you boot within Bochs.
Size | Cylinders | Heads | Sectors/Track | Sectors Total |
---|---|---|---|---|
0.720MB | 80 | 2 | 9 | 1440 |
1.2MB | 80 | 2 | 15 | 2400 |
1.44MB | 80 | 2 | 18 | 2880 |
1.680MB | 80 | 2 | 21 | 3360 |
unix-> dd if=/dev/zero of=1.44M bs=512 count=2880To create a copy of an existing floppy disk, granted you have a floppy disk drive on your workstation, you can use one of the following commands, where '/dev/fd0' would be the path to your floppy drive device name.
NOTE: If your system uses a form of volume management to automount your floppy drive, you may have to tell it you popped in a new floppy, and use an alternative device name to access it.
# Linux, direct use of floppy drive using 'dd' unix-> dd if=/dev/fd0 ibs=512 of=1.44M --or-- # Linux, direct use of floppy drive using 'cp' unix-> cp /dev/fd0 1.44M --or-- # With Volume Management handling floppy drive Solaris 2.x-> volcheck Solaris 2.x-> dd if=/vol/dev/aliases/floppy0 ibs=512 of=1.44M
To subscribe: email to: bochs-developers-request@world.std.com subject: (leave blank) body: subscribe To send to mailing list email to: bochs-developers@world.std.com
NOTE: your backspace key may not work properly. You may have to source the file 'xmods' in the main distribution directory. I need to look at this problem a little more. Using Ctrl-h always seems to work for me.