bochsrc.5

来自「bochs : one pc simulator.」· 5 代码 · 共 834 行 · 第 1/2 页

5
834
字号
.\"Document Author:  Timothy R. Butler   -   tbutler@uninetsolutions.com".TH bochsrc 5 "22 Jun 2006" "bochsrc" "The Bochs Project".\"SKIP_SECTION".SH NAMEbochsrc \- Configuration file for Bochs..\"SKIP_SECTION".SH DESCRIPTION.LPBochsrc   is  the   configuration   file  that specifieswhere  Bochs should look for disk images,  how the Bochsemulation layer  should  work,  etc.   The  syntax  usedfor bochsrc  can also be used as command line  argumentsfor Bochs. The .bochsrc  file should be placed either inthe current  directory  before running  Bochs or in yourhome directory.Starting with Bochs 1.3, you can use environment variables inthe bochsrc file, for example:   floppya: 1_44="$IMAGES/bootdisk.img", status=insertedStarting with version 2.0, two environment variables have a built-indefault value which is set at compile time.  $BXSHARE points to the"share" directory which is typically /usr/local/share/bochs on UNIXmachines.  See the $(sharedir) variable in the Makefile for the exactvalue.  $BXSHARE is used by disk images to locate the directory where the BIOS images and keymaps can be found.  If $BXSHARE is not defined, Bochswill supply the default value.  Also, $LTDL_LIBRARY_PATH points to a list ofdirectories (separated by colons if more than one) to search in for Bochsplugins.  A compile-time default is provided if this variable is not definedby the user..\".\"DONT_SPLIT".SH OPTIONS.TP.I "#include"This option includes another configuration file. It ispossible to put installation defaults in a global configfile (e.g. location of rom images).Example:  #include /etc/bochsrc.TP.I "config_interface:"The configuration interface is a series of menus or dialog boxes thatallows you to change all the settings that control Bochs's behavior.There are two choices of configuration interface: a text mode versioncalled "textconfig" and a graphical version called "wx".  The textmode version uses stdin/stdout and is always compiled in.  The graphicalversion 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..B NOTE:if you use the "wx" configuration interface, you must also usethe "wx" display library.Example:  config_interface: textconfig.TP.I "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 foryou.The choices are:   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.B NOTE:if you use the "wx" configuration interface, you must also usethe "wx" display library.Example:  display_library: x.TP.I "romimage:"The ROM BIOS controls what the PC does when it first powers on.  Normally, youcan use a precompiled BIOS in the source or binary distribution called.B BIOS-bochs-latest.The ROM 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 isnow supported, but we still recommend to use the BIOS distributed with Bochs.Now the start address can be calculated from image size.Examples:  romimage: file=bios/BIOS-bochs-latest, address=0xf0000  romimage: file=$BXSHARE/BIOS-bochs-latest, address=0xf0000  romimage: file=mybios.bin, address=0xfff80000  romimage: file=mybios.bin.TP.I "cpu:"This defines cpu-related parameters inside Bochs:count:Set the number of processors:cores per processor:threads per core whenBochs is compiled for SMP emulation. Bochs currently supports up to8 processors. If Bochs is compiled without SMP support, it won't acceptvalues different from 1.quantum:Maximum amount of instructions allowed to execute by processor beforereturning control to another cpu. This option exists only in Bochs binary compiled with SMP support.reset_on_triple_fault:Reset the CPU when triple fault occur (highly recommended) rather thanPANIC. Remember that if you trying to continue after triple fault the simulation will be completely bogus !ips:Emulated Instructions Per Second.  This is thenumber of IPS that Bochs is capable of runningon your machine.  You can recompile Bochs with--enable-show-ips option enabled, to find yourworkstation's capability.  Measured IPS valuewill then be logged into your log file or statusbar (if supported by the gui).IPS is used to calibrate  many  time-dependentevents   within   the  bochs  simulation.  Forexample, changing IPS affects the frequency ofVGA updates, the duration of time before a keystarts to autorepeat,  and the measurement  ofBogoMips and other benchmarks.Example Specifications[1] Bochs Machine/Compiler                                Mips ------------------------------------------------------------------- 2.2.6 2.6Ghz Intel Core 2 Duo with WinXP/g++ 3.4      21 to 25 Mips 2.2.6 2.1Ghz Athlon XP with Linux 2.6/g++ 3.4         12 to 15 Mips 2.0.1 1.6Ghz Intel P4 with Win2000/g++ 3.3             5 to  7 Mips 1.4   650Mhz Athlon K-7 with Linux 2.4.4/egcs-2.91.66  2 to  2.5 Mips 1.4   400Mhz Pentium II with Linux 2.0.36/egcs-1.0.3   1 to  1.8 Mips [1]  IPS measurements depend on OS and compilerconfiguration  in addition  to processor clockspeed.Example:  cpu: count=2, ips=10000000.TP.I "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.Example:  megs: 32.TP.I "optromimage1: \fP, \fIoptromimage2: \fP, \fIoptromimage3: \fPor \fIoptromimage4:"You may now load up to 4 optional ROM images. Be sure to use aread-only area, typically between C8000 and EFFFF. These optionalROM images should not overwrite the rombios (located atF0000-FFFFF) and the videobios (located at C0000-C7FFF).Those ROM images will be initialized by the bios if they containthe right signature (0x55AA).It can also be a convenient way to upload some arbitrary code/datain the simulation, that can be retrieved by the boot loaderExample:  optromimage1: file=optionalrom.bin, address=0xd0000.TP.I "vgaromimage:"You also need to load a VGA ROM BIOS into 0xC0000.Examples:  vgaromimage: file=bios/VGABIOS-elpin-2.40  vgaromimage: file=bios/VGABIOS-lgpl-latest  vgaromimage: file=$BXSHARE/VGABIOS-lgpl-latest.TP.I "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.Examples:  vga: extension=cirrus  vga: extension=vbe.TP.I "floppya: \fPor \fIfloppyb:"Point  this to  the pathname of a floppy imagefile or  device.  Floppya is the  first drive,and  floppyb is the  second drive.  If  you'rebooting from a floppy, floppya should point toa bootable disk.You can set the initial status of the media to\&'ejected' or 'inserted'. Usually you will wantto use 'inserted'.Example:2.88M 3.5" Floppy:  floppya: 2_88=path, status=ejected1.44M 3.5" Floppy:  floppya: 1_44=path, status=inserted1.2M  5.25" Floppy:  floppyb: 1_2=path, status=ejected720K  3.5" Floppy:  floppya: 720k=path, status=inserted360K  5.25" Floppy:  floppya: 360k=path, status=insertedAutodetect Floppy type:  floppya: image=path, status=inserted.TP.I "ata0: \fP, \fIata1: \fP, \fIata2: \fPor \fIata3:"These options enables up to 4 ata channels. For each channelthe two base io addresses and the irq must be specified.ata0 and ata1 are enabled by default, with the values shown below.Examples:   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.TP.I "ata\fR[\fB0-3\fR]\fI-master: \fPor \fIata\fR[\fB0-3\fR]\fI-slave:"This defines the type and characteristics of all attached ata devices:   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 and volatile disks   Point this at a hard disk image file, cdrom iso file,or a physical cdrom device.  To create a hard disk image, try running bximage.  It will help you choose the size and then suggest a line that works with it.In UNIX it is possible to use a raw device as a Bochs hard disk, but WE DON'T RECOMMEND IT.The path is always mandatory. Disk geometry autodetection works with imagescreated by bximage if CHS is set to 0/0/0 (cylinders are calculated usingheads=16 and spt=63). For other hard disk images and modes the cylinders,heads, and spt are mandatory.The mode option defines how the disk image is handled. Disks can be defined as:  - 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 redologThe disk translation scheme (implemented in legacy int13 bios functions, and used byolder operating systems like MS-DOS), can be defined as:  - 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)Default values are:   mode=flat, biosdetect=auto, translation=auto, model="Generic 1234"The biosdetect option has currently no effect on the biosExamples:   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.TP.I "com1: \fP, \fIcom2: \fP, \fIcom3: \fPor \fIcom4:"This defines a serial port (UART type 16550A). In the 'term' you can specifya device to use as com1. This can be a real serial line, or a pty.  To usea pty (under X/Unix), create two windows (xterms, usually).  One of them willrun bochs, and the other will act as com1. Find out the tty the com1 windowusing 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 allgo to the other window.Other serial modes are 'null' (no input/output), 'file' (output to a filespecified as the 'dev' parameter), 'raw' (use the real serial port - underconstruction for win32) and 'mouse' (standard serial mouse - requiresmouse option setting 'type=serial' or 'type=serial_wheel')Examples:  com1: enabled=term, dev=/dev/ttyp7  com2: enabled=1, mode=file, dev=serial.out  com1: enabled=1, mode=mouse.TP.I "parport1: \fPor \fIparport2:"This defines a parallel (printer) port. When turned on and an output file isdefined the emulated printer port sends characters printed by the guestOS into the output file. On some platforms a device filename can be used tosend the data to the real parallel port (e.g. "/dev/lp0" on Linux).Examples:  parport1: enabled=1, file=parport.out  parport2: enabled=1, file="/dev/lp0"  parport1: enabled=0.TP.I "boot:"This defines the boot sequence. Now you can specify up to 3 boot drives.You can either boot from 'floppy', 'disk' or 'cdrom'(legacy 'a' and 'c' are also supported)Example:  boot: cdrom, floppy, disk.TP.I "floppy_bootsig_check:"This disables the 0xaa55 signature check on boot floppiesThe check is enabled by default.Example:  floppy_bootsig_check: disabled=1.TP.I "log:"Give the path of the log file you'd like Bochsdebug and misc. verbiage to be written to.   Ifyou really don't want it, make it /dev/null.Example:  log: bochs.out  log: /dev/tty               (unix only)  log: /dev/null              (unix only).TP.I "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 Default : %t%e%dExamples:  logprefix: %t-%e-@%i-%d  logprefix: %i%e%d.TP.I "panic:"If Bochs reaches  a condition  where it cannotemulate correctly, it does a panic.  This  canbe a configuration problem  (like a misspelledbochsrc line) or an emulation problem (like anunsupported video mode). The  "panic"  settingin  bochsrc  tells  Bochs  how to respond to apanic.  You  can  set this to fatal (terminatethe session),  report   (print information  tothe console), or ignore (do nothing).The safest setting is action=fatal. If you aregetting  panics,  you  can  try  action=reportinstead.  If you allow Bochs to continue aftera panic, don't be surprised if you get strangebehavior or crashes if a panic occurs.  Pleasereport  panic  messages  unless  it is just  aconfiguration  problem  like  "could  not findhard drive image."Example:  panic: action=fatal.TP

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?