table of contents
bochsrc(5) | The Bochs Project | bochsrc(5) |
NAME¶
bochsrc - Configuration file for Bochs.DESCRIPTION¶
Bochsrc is the configuration file that specifies where Bochs should look for disk images, how the Bochs emulation layer should work, etc. The syntax used for bochsrc can also be used as command line arguments for Bochs. The .bochsrc file should be placed either in the current directory before running Bochs or in your home directory.floppya: 1_44="$IMAGES/bootdisk.img", status=inserted
OPTIONS¶
- #include
- This option includes another configuration file. It is
possible to put installation defaults in a global config file (e.g.
location of rom images).
#include /etc/bochsrc
- config_interface:
- The configuration interface is a series of menus or dialog
boxes that allows you to change all the settings that control Bochs's
behavior. Depending on the platform there are up to 3 choices of
configuration interface: a text mode version called "textconfig"
and two graphical versions called "win32config" and
"wx". The text mode version uses stdin/stdout and is always
compiled in, unless Bochs is compiled for wx only. The choice
"win32config" is only available on win32 and it is the default
there. The choice "wx" is only available when you use
"--with-wx" on the configure command. If you do not write a
config_interface line, Bochs will choose a default for you.
config_interface: textconfig
- display_library:
- The display library is the code that displays the Bochs VGA
screen. Bochs has a selection of about 10 different display library
implementations for different platforms. If you run configure with
multiple --with-* options, the display_library command lets you choose
which one you want to run with. If you do not write a display_library
line, Bochs will choose a default for you.
x X windows interface, cross platform
win32 native win32 libraries
carbon Carbon library (for MacOS X)
beos native BeOS libraries
macintosh MacOS pre-10
amigaos native AmigaOS libraries
sdl SDL library, cross platform
term text only, uses curses/ncurses library, cross platform
rfb provides an interface to AT&T's VNC viewer, cross platform
wx wxWidgets library, cross platform
nogui no display at all
display_library: x
display_library: rfb, options="timeout=60" # time to wait for client
display_library: sdl, options="fullscreen" # startup in fullscreen mode
display_library: x, options="hideIPS" # disable IPS output in status bar
display_library: x, options="gui_debug" # use GTK debugger gui
- romimage:
- The ROM BIOS controls what the PC does when it first powers
on. Normally, you can use a precompiled BIOS in the source or binary
distribution called BIOS-bochs-latest. The default ROM BIOS is
usually loaded starting at address 0xe0000, and it is exactly 128k long.
The legacy version of the Bochs BIOS is usually loaded starting at address
0xf0000, and it is exactly 64k long. You can also use the environment
variable $BXSHARE to specify the location of the BIOS. The usage of
external large BIOS images (up to 512k) at memory top is now supported,
but we still recommend to use the BIOS distributed with Bochs. The start
address is optional, since it can be calculated from image size.
romimage: file=bios/BIOS-bochs-latest
romimage: file=$BXSHARE/BIOS-bochs-legacy
romimage: file=mybios.bin, address=0xfff80000
romimage: file=mybios.bin
- cpu:
- This defines cpu-related parameters inside Bochs:
Bochs Machine/Compiler Mips 2.3.7 3.2Ghz Intel Core 2 Q9770 w/ WinXP/g++ 3.4 50-55 Mips 2.3.7 2.6Ghz Intel Core 2 Duo w/ WinXP/g++ 3.4 38-43 Mips 2.2.6 2.6Ghz Intel Core 2 Duo w/ WinXP/g++ 3.4 21-25 Mips 2.2.6 2.1Ghz Athlon XP w/ Linux 2.6/g++ 3.4 12-15 Mips 2.0.1 1.6Ghz Intel P4 w/ Win2000/g++ 3.3 5-7 Mips
[1] IPS measurements depend on OS and compiler configuration in addition to processor clock speed.
cpu: count=2, ips=10000000, msrs="msrs.def"
- cpuid:
- This defines features and functionality supported by Bochs
emulated CPU:
cpuid: mmx=1, sep=1, sse=sse4_2, xapic=1, aes=1, movbe=1, xsave=1, cpuid_limit_winnt=0
- megs:
- Set the number of Megabytes of physical memory you want to
emulate. The default is 32MB, most OS's won't need more than that. The
maximum amount of memory supported is 2048Mb.
megs: 32
- optromimage1: , optromimage2: , optromimage3: or optromimage4:
- You may now load up to 4 optional ROM images. Be sure to
use a read-only area, typically between C8000 and EFFFF. These optional
ROM images should not overwrite the rombios (located at F0000-FFFFF) and
the videobios (located at C0000-C7FFF). Those ROM images will be
initialized by the bios if they contain the right signature (0x55AA). It
can also be a convenient way to upload some arbitrary code/data in the
simulation, that can be retrieved by the boot loader
optromimage1: file=optionalrom.bin, address=0xd0000
- vgaromimage:
- You also need to load a VGA ROM BIOS into 0xC0000.
vgaromimage: file=bios/VGABIOS-elpin-2.40
vgaromimage: file=bios/VGABIOS-lgpl-latest
vgaromimage: file=$BXSHARE/VGABIOS-lgpl-latest
- vga:
- Here you can specify the display extension to be used. With
the value 'none' you can use standard VGA with no extension. Other
supported values are 'vbe' for Bochs VBE and 'cirrus' for Cirrus SVGA
support.
vga: extension=cirrus
vga: extension=vbe
- floppya: or floppyb:
-
floppya: 2_88=path, status=ejected
floppya: 1_44=path, status=inserted, write_protected=1
floppyb: 1_2=path, status=ejected
floppya: 720k=path, status=inserted
floppya: 360k=path, status=inserted
floppya: image=path, status=inserted
floppya: 1_44=vvfat:path, status=inserted
floppya: type=1_44
- ata0: , ata1: , ata2: or ata3:
-
ata0: enabled=1, ioaddr1=0x1f0, ioaddr2=0x3f0, irq=14
ata1: enabled=1, ioaddr1=0x170, ioaddr2=0x370, irq=15
ata2: enabled=1, ioaddr1=0x1e8, ioaddr2=0x3e0, irq=11
ata3: enabled=1, ioaddr1=0x168, ioaddr2=0x360, irq=9
- ata[0-3]-master: or ata[0-3]-slave:
-
type= type of attached device [disk|cdrom]
path= path of the image
mode= image mode [flat|concat|external|dll|sparse|vmware3|undoable|growing|volatile], only valid for disks
cylinders= only valid for disks
heads= only valid for disks
spt= only valid for disks
status= only valid for cdroms [inserted|ejected]
biosdetect= type of biosdetection [none|auto], only for disks on ata0 [cmos]
translation=type of translation of the bios, only for disks [none|lba|large|rechs|auto]
model= string returned by identify device command
journal= optional filename of the redolog for undoable, volatile and vvfat disks
- flat : one file flat layout
- concat : multiple files layout
- external : developer's specific, through a C++ class
- dll : developer's specific, through a DLL
- sparse : stackable, commitable, rollbackable
- vmware3 : vmware3 disk support
- undoable : flat file with commitable redolog
- growing : growing file
- volatile : flat file with volatile redolog
- vvfat: local directory appears as read-only VFAT disk (with volatile redolog)
- none : no translation, for disks up to 528MB (1032192 sectors)
- large : a standard bitshift algorithm, for disks up to 4.2GB (8257536 sectors)
- rechs : a revised bitshift algorithm, using a 15 heads fake physical geometry, for disks up to 7.9GB (15482880 sectors). (don't use this unless you understand what you're doing)
- lba : a standard lba-assisted algorithm, for disks up to 8.4GB (16450560 sectors)
- auto : autoselection of best translation scheme. (it should be changed if system does not boot)
mode=flat, biosdetect=auto, translation=auto, model="Generic 1234"
ata0-master: type=disk, path=10M.sample, cylinders=306, heads=4, spt=17
ata0-slave: type=disk, path=20M.sample, cylinders=615, heads=4, spt=17
ata1-master: type=disk, path=30M.sample, cylinders=615, heads=6, spt=17
ata1-slave: type=disk, path=46M.sample, cylinders=940, heads=6, spt=17
ata2-master: type=disk, path=62M.sample, cylinders=940, heads=8, spt=17
ata2-slave: type=disk, path=112M.sample, cylinders=900, heads=15, spt=17
ata3-master: type=disk, path=483M.sample, cylinders=1024, heads=15, spt=63
ata3-slave: type=cdrom, path=iso.sample, status=inserted
- com1: , com2: , com3: or com4:
- This defines a serial port (UART type 16550A). In the
'term' you can specify a device to use as com1. This can be a real serial
line, or a pty. To use a pty (under X/Unix), create two windows (xterms,
usually). One of them will run bochs, and the other will act as com1. Find
out the tty the com1 window using the `tty' command, and use that as the
`dev' parameter. Then do `sleep 1000000' in the com1 window to keep the
shell from messing with things, and run bochs in the other window. Serial
I/O to com1 (port 0x3f8) will all go to the other window.
com1: enabled=1, mode=term, dev=/dev/ttyp7
com2: enabled=1, mode=file, dev=serial.out
com1: enabled=1, mode=mouse
- parport1: or parport2:
- This defines a parallel (printer) port. When turned on and
an output file is defined the emulated printer port sends characters
printed by the guest OS into the output file. On some platforms a device
filename can be used to send the data to the real parallel port (e.g.
"/dev/lp0" on Linux).
parport1: enabled=1, file=parport.out
parport2: enabled=1, file="/dev/lp0"
parport1: enabled=0
- boot:
- This defines the boot sequence. Now you can specify up to 3
boot drives, which can be 'floppy', 'disk', 'cdrom' or 'network' (boot
ROM). Legacy 'a' and 'c' are also supported.
boot: cdrom, floppy, disk
- floppy_bootsig_check:
- This disables the 0xaa55 signature check on boot floppies
The check is enabled by default.
floppy_bootsig_check: disabled=1
- log:
- Give the path of the log file you'd like Bochs debug and
misc. verbiage to be written to. If you really don't want it, make it
/dev/null.
log: bochs.out
log: /dev/tty (unix only)
log: /dev/null (unix only)
- logprefix:
- This handles the format of the string prepended to each log
line : You may use those special tokens :
%t : 11 decimal digits timer tick
%i : 8 hexadecimal digits of cpu0 current eip
%e : 1 character event type ('i'nfo, 'd'ebug, 'p'anic, 'e'rror)
%d : 5 characters string of the device, between brackets
logprefix: %t-%e-@%i-%d
logprefix: %i%e%d
- panic:
- If Bochs reaches a condition where it cannot emulate
correctly, it does a panic. This can be a configuration problem (like a
misspelled bochsrc line) or an emulation problem (like an unsupported
video mode). The "panic" setting in bochsrc tells Bochs how to
respond to a panic. You can set this to fatal (terminate the session),
report (print information to the console), or ignore (do nothing).
panic: action=fatal
- error:
- Bochs produces an error message when it finds a condition
that really shouldn't happen, but doesn't endanger the simulation. An
example of an error might be if the emulated software produces an illegal
disk command.
error: action=report
- info:
- This setting tells Bochs what to do when an event occurs
that generates informational messages. You can set this to fatal (that
would not be very smart though), report (print information to the
console), or ignore (do nothing). For general usage, the
"report" option is probably a good choice.
info: action=report
- debug:
- This setting tells Bochs what to do with messages intended
to assist in debugging. You can set this to fatal (but you shouldn't),
report (print information to the console), or ignore (do nothing). You
should generally set this to ignore, unless you are trying to diagnose a
particular problem.
debug: action=ignore
- debugger_log:
- Give the path of the log file you'd like Bochs to log
debugger output. If you really don't want it, make it '/dev/null', or '-'.
log: debugger.out
log: /dev/null (unix only)
log: -
- sb16:
- This defines the SB16 sound emulation. It can have several
of the following properties. All properties are in this format:
sb16: property=value
0 = No data should be output.
1 = output to device (system dependent - midi
denotes the device driver).
2 = SMF file output, including headers.
3 = Output the midi data stream to the file
(no midi headers and no delta times, just
command and data bytes).
0 = no data
1 = output to device (system dependent - wave
denotes the device driver).
2 = VOC file output, including headers.
3 = Output the raw wave stream to the file.
0 = No log.
1 = Resource changes, midi program and bank changes.
2 = Severe errors.
3 = All errors.
4 = All errors plus all port accesses.
5 = All errors and port accesses plus a lot
of extra information.
sb16: midimode=1, midi=/dev/midi00,
wavemode=1, wave=/dev/dsp, loglevel=2,
log=sb16.log, dmatimer=600000
sb16: midimode=1, midi=alsa:128:0,
wavemode=1, wave=alsa,
log=sb16.log, dmatimer=600000
- vga_update_interval:
- Video memory is scanned for updates and screen updated
every so many virtual seconds. The default value is 50000, about 20Hz.
Keep in mind that you must tweak the 'cpu: ips=N' directive to be as close
to the number of emulated instructions-per-second your workstation can do,
for this to be accurate.
vga_update_interval: 250000
- keyboard_serial_delay:
- Approximate time in microseconds that it takes one
character to be transfered from the keyboard to controller over the serial
path.
keyboard_serial_delay: 200
- keyboard_paste_delay:
- Approximate time in microseconds between attempts to paste
characters to the keyboard controller. This leaves time for the guest os
to deal with the flow of characters. The ideal setting depends on how your
operating system processes characters. The default of 100000 usec (.1
seconds) was chosen because it works consistently in Windows.
keyboard_paste_delay: 100000
- clock:
- This defines the parameters of the clock inside Bochs.
clock: sync=[none|slowdown|realtime|both], time0=[timeValue|local|utc]
clock: sync=realtime, time0=938581955 # Wed Sep 29 07:12:35 1999
- mouse:
- This defines parameters for the emulated mouse type, the
initial status of the mouse capture and the runtime method to toggle it.
mouse: enabled=1
mouse: type=imps2, enabled=1
mouse: type=serial, enabled=1
mouse: enabled=0, toggle=ctrl+f10
- private_colormap:
- Requests that the GUI create and use it's own non-shared
colormap. This colormap will be used when in the bochs window. If not
enabled, a shared colormap scheme may be used. Once again, enabled=1 turns
on this feature and 0 turns it off.
private_colormap: enabled=1
- i440fxsupport:
- This option controls the presence of the i440FX PCI
chipset. You can also specify the devices connected to PCI slots. Up to 5
slots are available now. These devices are currently supported: ne2k,
pcivga, pcidev, pcipnic and usb_ohci. If Bochs is compiled with Cirrus
SVGA support you'll have the additional choice 'cirrus'.
i440fxsupport: enabled=1, slot1=pcivga, slot2=ne2k
- pcidev:
- Enables the mapping of a host PCI hardware device within
the PCI subsystem of the Bochs x86 emulator. This feature requires Linux
as a host OS.
pcidev: vendor=0x1234, device=0x5678
- ne2k:
- Defines the characteristics of an attached ne2000 isa card
:
ioaddr=IOADDR,
irq=IRQ,
mac=MACADDR,
ethmod=MODULE,
ethdev=DEVICE,
script=SCRIPT
- fbsd : ethernet on freebsd and openbsd
- linux : ethernet on linux
- win32 : ethernet on win32
- tap : ethernet through a linux tap interface
- tuntap : ethernet through a linux tuntap interface
- null : All packets are discarded, but logged to a few files
- arpback: ARP is simulated (disabled by default)
- vde : Virtual Distributed Ethernet
- vnet : ARP, ICMP-echo(ping), DHCP and TFTP are simulated
The virtual host uses 192.168.10.1
DHCP assigns 192.168.10.2 to the guest
The TFTP server use ethdev for the root directory and doesn't
overwrite files
ne2k: ioaddr=0x300, irq=9, mac=b0:c4:20:00:00:00, ethmod=fbsd, ethdev=xlo
ne2k: ioaddr=0x300, irq=9, mac=b0:c4:20:00:00:00, ethmod=linux, ethdev=eth0
ne2k: ioaddr=0x300, irq=9, mac=b0:c4:20:00:00:01, ethmod=win32, ethdev=MYCARD
ne2k: ioaddr=0x300, irq=9, mac=fe:fd:00:00:00:01, ethmod=tap, ethdev=tap0
ne2k: ioaddr=0x300, irq=9, mac=fe:fd:00:00:00:01, ethmod=tuntap, ethdev=/dev/net/tun0, script=./tunconfig
ne2k: ioaddr=0x300, irq=9, mac=b0:c4:20:00:00:01, ethmod=vde, ethdev="/tmp/vde.ctl"
ne2k: ioaddr=0x300, irq=9, mac=b0:c4:20:00:00:01, ethmod=vnet, ethdev="c:/temp"
- pnic:
- To support the Bochs/Etherboot pseudo-NIC, Bochs must be
compiled with the --enable-pnic configure option. It accepts the same
syntax (for mac, ethmod, ethdev, script) and supports the same networking
modules as the NE2000 adapter. In addition to this, it must be assigned to
a PCI slot.
pnic: enabled=1, mac=b0:c4:20:00:00:00, ethmod=vnet
- keyboard_mapping:
- This enables a remap of a physical localized keyboard to a
virtualized us keyboard, as the PC architecture expects. If enabled, the
keymap file must be specified.
Examples:
keyboard_mapping: enabled=1, map=gui/keymaps/x11-pc-de.map
- keyboard_type:
- Type of emulated keyboard sent back to the OS to a
"keyboard identify" command. It must be one of "xt",
"at" or "mf".
keyboard_type: mf
- user_shortcut:
- This defines the keyboard shortcut to be sent when you
press the "user" button in the header bar. The shortcut string
is a combination of maximum 3 key names (listed below) separated with a
'-' character.
user_shortcut: keys=ctrl-alt-del
- cmosimage:
- This defines image file that can be loaded into the CMOS
RAM at startup. The rtc_init parameter controls whether initialize the RTC
with values stored in the image. By default the time0 argument given to
the clock option is used. With 'rtc_init=image' the image is the source
for the initial time.
cmosimage: file=cmos.img, rtc_init=time0
- usb_uhci:
- This option controls the presence of the USB root hub which
is a part of the i440FX PCI chipset. With the portX option you can connect
devices to the hub (currently supported: 'mouse', 'tablet', 'keypad',
'disk', 'cdrom', 'hub' and 'printer').
usb_uhci: enabled=1, port1=mouse, port2=disk:usbstick.img
usb_uhci: enabled=1, port1=hub:7, port2=disk:growing:usbdisk.img
usb_uhci: enabled=1, port1=printer:printdata.bin, port2=cdrom:image.iso
- usb_ohci:
- This option controls the presence of the USB OHCI host
controller with a 2-port hub. The portX option accepts the same device
types with the same syntax as the UHCI controller (see above). The OHCI HC
must be assigned to a PCI slot.
usb_ohci: enabled=1
- plugin_ctrl:
- Controls the presence of optional plugins without a
separate option. By default all existing plugins are enabled. These
plugins are currently supported: 'acpi', 'biosdev', 'extfpuirq',
'gameport', 'iodebug', 'pci_ide', 'speaker' and 'unmapped'.
plugin_ctrl: biosdev=0, speaker=0
- user_plugin:
- Load user-defined plugin. This option is available only if
Bochs is compiled with plugin support. Maximum 8 different plugins are
supported. See the example in the Bochs sources how to write a plugin
device.
user_plugin: name=testdev
LICENSE¶
This program is distributed under the terms of the GNU Lesser General Public License as published by the Free Software Foundation. See the COPYING file located in /usr/share/doc/bochs/ for details on the license and the lack of warranty.AVAILABILITY¶
The latest version of this program can be found at:http://bochs.sourceforge.net/getcurrent.html
SEE ALSO¶
bochs(1), bochs-dlx(1), bximage(1), bxcommit(1)The Bochs IA-32 Emulator site on the World Wide Web: http://bochs.sourceforge.net Online Bochs Documentation http://bochs.sourceforge.net/doc/docbook
AUTHORS¶
The Bochs emulator was created by Kevin Lawton (kevin@mandrakesoft.com), and is currently maintained by the members of the Bochs x86 Emulator Project. You can see a current roster of members at:http://bochs.sourceforge.net/getinvolved.html
BUGS¶
Please report all bugs to the bug tracker on our web site. Just go to http://bochs.sourceforge.net, and click "Bug Reports" on the sidebar under "Feedback". Provide a detailed description of the bug, the version of the program you are running, the operating system you are running the program on and the operating system you are running in the emulator.20 Feb 2011 | bochsrc |