第17章-实验环境设置与使用方法

总结

Bochs

  • Bochs(box)采用模拟技术,不像VMware采用了虚拟化技术,仅模拟I/O操作,效率高。但是Bochs可以模拟出系统在仿真环境的具体状态和精确时序。因此多用来调试OS,模拟OS。
  • Bochs是大佬在1994年开发的。运行在多平台,无论哪种平台都可以模拟x86 CPU。这是其他模拟软件无力的地方。虚拟化技术依赖于CPU。而这个纯属于模拟,效率低。
  • Bochs运行必备资源

1528684307159.png

  • Bochs运行一般需要加载一个配置文件,里面杂七杂八。如果一条命令下来估计半页屏幕少不了。

    1. bochs -f configurefile

1528684451394.png

  • 具体怎么配置,安装包目录下有.bochsrc参考文件,书上说的那个bochsrc-sample.txt属于老版本。

管它三七二十一,运行起来再说

1528687170131.png

  • 实验环境采用Ubuntu18 x64,根据仓库顶层目录提供的bochs子目录,buildenv.sh 和 onekey.sh,先构建运行环境,然后一键源码包安装既可。相应软件包存放在默认路径即可,不需要配置。
  • 不过不建议源码安装,会碰到坑爹问题。直接apt-get install bochs bochs-x就可以了
  • 如果是CentOS还是源码安装一波

  • runbochhsr.sh一键运行即可。

常见问题

1528686751634.png

  • 这里会报错,只需要手动删除那条配置就可以了。因为用的Bochs版本比较新。

    1. sed -i 's/vga_update_interval: 300000/#vga_update_interval: 300000/g' bochsrc-0.12-hd.bxrc

不过已经在一键运行脚本里面配置好了,当时如果要运行相应版本的话自己改一波。毕竟,我又不知道你要啥

1528687580044.png

1528687628189.png

1528687651490.png

1528687691267.png

1530958888407.png

1530958898991.png

  • 官方给的源码包有bug,坑爹~

内核编译

暂时不考虑,运行起来能用再说,看看前面的原理

bochsrc配置模板

  1. # You may now use double quotes around pathnames, in case
  2. # your pathname includes spaces.
  3. #=======================================================================
  4. # PLUGIN_CTRL:
  5. # Controls the presence of optional device plugins. These plugins are loaded
  6. # directly with this option and some of them install a config option that is
  7. # only available when the plugin device is loaded. The value "1" means to load
  8. # the plugin and "0" will unload it (if loaded before).
  9. #
  10. # These plugins will be loaded by default (if present): 'biosdev', 'extfpuirq',
  11. # 'gameport', 'iodebug','parallel', 'serial', 'speaker' and 'unmapped'.
  12. #
  13. # These plugins are also supported, but they are usually loaded directly with
  14. # their bochsrc option: 'e1000', 'es1370', 'ne2k', 'pcidev', 'pcipnic', 'sb16',
  15. # 'usb_ohci', 'usb_uhci', 'usb_xhci' and 'voodoo'.
  16. #=======================================================================
  17. #plugin_ctrl: unmapped=0, e1000=1 # unload 'unmapped' and load 'e1000'
  18. #=======================================================================
  19. # CONFIG_INTERFACE
  20. #
  21. # The configuration interface is a series of menus or dialog boxes that
  22. # allows you to change all the settings that control Bochs's behavior.
  23. # Depending on the platform there are up to 3 choices of configuration
  24. # interface: a text mode version called "textconfig" and two graphical versions
  25. # called "win32config" and "wx". The text mode version uses stdin/stdout and
  26. # is always compiled in, unless Bochs is compiled for wx only. The choice
  27. # "win32config" is only available on win32 and it is the default there.
  28. # The choice "wx" is only available when you use "--with-wx" on the configure
  29. # command. If you do not write a config_interface line, Bochs will
  30. # choose a default for you.
  31. #
  32. # NOTE: if you use the "wx" configuration interface, you must also use
  33. # the "wx" display library.
  34. #=======================================================================
  35. #config_interface: textconfig
  36. #config_interface: win32config
  37. #config_interface: wx
  38. #=======================================================================
  39. # DISPLAY_LIBRARY
  40. #
  41. # The display library is the code that displays the Bochs VGA screen. Bochs
  42. # has a selection of about 10 different display library implementations for
  43. # different platforms. If you run configure with multiple --with-* options,
  44. # the display_library command lets you choose which one you want to run with.
  45. # If you do not write a display_library line, Bochs will choose a default for
  46. # you.
  47. #
  48. # The choices are:
  49. # x use X windows interface, cross platform
  50. # win32 use native win32 libraries
  51. # carbon use Carbon library (for MacOS X)
  52. # macintosh use MacOS pre-10
  53. # amigaos use native AmigaOS libraries
  54. # sdl use SDL 1.2.x library, cross platform
  55. # sdl2 use SDL 2.x library, cross platform
  56. # svga use SVGALIB library for Linux, allows graphics without X11
  57. # term text only, uses curses/ncurses library, cross platform
  58. # rfb provides an interface to AT&T's VNC viewer, cross platform
  59. # vncsrv use LibVNCServer for extended RFB(VNC) support
  60. # wx use wxWidgets library, cross platform
  61. # nogui no display at all
  62. #
  63. # NOTE: if you use the "wx" configuration interface, you must also use
  64. # the "wx" display library.
  65. #
  66. # Specific options:
  67. # Some display libraries now support specific options to control their
  68. # behaviour. These options are supported by more than one display library:
  69. #
  70. # "gui_debug" - use GTK debugger gui (sdl, sdl2, x) / Win32 debugger gui (sdl,
  71. # sdl2, win32)
  72. # "hideIPS" - disable IPS output in status bar (rfb, sdl, sdl2, vncsrv,
  73. # win32, wx, x)
  74. # "nokeyrepeat" - turn off host keyboard repeat (sdl, sdl2, win32, x)
  75. # "timeout" - time (in seconds) to wait for client (rfb, vncsrv)
  76. #
  77. # See the examples below for other currently supported options.
  78. #=======================================================================
  79. #display_library: amigaos
  80. #display_library: carbon
  81. #display_library: macintosh
  82. #display_library: nogui
  83. #display_library: rfb
  84. #display_library: sdl, options="fullscreen" # startup in fullscreen mode
  85. #display_library: sdl2, options="fullscreen" # startup in fullscreen mode
  86. #display_library: term
  87. #display_library: vncsrv
  88. #display_library: win32
  89. #display_library: wx
  90. #display_library: x
  91. #=======================================================================
  92. # CPU:
  93. # This defines cpu-related parameters inside Bochs:
  94. #
  95. # MODEL:
  96. # Selects CPU configuration to emulate from pre-defined list of all
  97. # supported configurations. When this option is used and the value
  98. # is different from 'bx_generic', the parameters of the CPUID option
  99. # have no effect anymore.
  100. #
  101. # CPU configurations that can be selected:
  102. # -----------------------------------------------------------------
  103. # pentium Intel Pentium (P54C)
  104. # pentium_mmx Intel Pentium MMX
  105. # amd_k6_2_chomper AMD-K6(tm) 3D processor (Chomper)
  106. # p2_klamath Intel Pentium II (Klamath)
  107. # p3_katmai Intel Pentium III (Katmai)
  108. # p4_willamette Intel(R) Pentium(R) 4 (Willamette)
  109. # core_duo_t2400_yonah Intel(R) Core(TM) Duo CPU T2400 (Yonah)
  110. # atom_n270 Intel(R) Atom(TM) CPU N270
  111. # p4_prescott_celeron_336 Intel(R) Celeron(R) 336 (Prescott)
  112. # athlon64_clawhammer AMD Athlon(tm) 64 Processor 2800+ (Clawhammer)
  113. # athlon64_venice AMD Athlon(tm) 64 Processor 3000+ (Venice)
  114. # turion64_tyler AMD Turion(tm) 64 X2 Mobile TL-60 (Tyler)
  115. # phenom_8650_toliman AMD Phenom X3 8650 (Toliman)
  116. # core2_penryn_t9600 Intel Mobile Core 2 Duo T9600 (Penryn)
  117. # corei5_lynnfield_750 Intel(R) Core(TM) i5 750 (Lynnfield)
  118. # corei5_arrandale_m520 Intel(R) Core(TM) i5 M 520 (Arrandale)
  119. # zambezi AMD FX(tm)-4100 Quad-Core Processor (Zambezi)
  120. # trinity_apu AMD A8-5600K APU (Trinity)
  121. # corei7_sandy_bridge_2600k Intel(R) Core(TM) i7-2600K (Sandy Bridge)
  122. # corei7_ivy_bridge_3770k Intel(R) Core(TM) i7-3770K CPU (Ivy Bridge)
  123. # corei7_haswell_4770 Intel(R) Core(TM) i7-4770 CPU (Haswell)
  124. # broadwell_ult Intel(R) Processor 5Y70 CPU (Broadwell)
  125. #
  126. # COUNT:
  127. # Set the number of processors:cores per processor:threads per core when
  128. # Bochs is compiled for SMP emulation. Bochs currently supports up to
  129. # 14 threads (legacy APIC) or 254 threads (xAPIC or higher) running
  130. # simultaniosly. If Bochs is compiled without SMP support, it won't accept
  131. # values different from 1.
  132. #
  133. # QUANTUM:
  134. # Maximum amount of instructions allowed to execute by processor before
  135. # returning control to another cpu. This option exists only in Bochs
  136. # binary compiled with SMP support.
  137. #
  138. # RESET_ON_TRIPLE_FAULT:
  139. # Reset the CPU when triple fault occur (highly recommended) rather than
  140. # PANIC. Remember that if you trying to continue after triple fault the
  141. # simulation will be completely bogus !
  142. #
  143. # CPUID_LIMIT_WINNT:
  144. # Determine whether to limit maximum CPUID function to 2. This mode is
  145. # required to workaround WinNT installation and boot issues.
  146. #
  147. # MSRS:
  148. # Define path to user CPU Model Specific Registers (MSRs) specification.
  149. # See example in msrs.def.
  150. #
  151. # IGNORE_BAD_MSRS:
  152. # Ignore MSR references that Bochs does not understand; print a warning
  153. # message instead of generating #GP exception. This option is enabled
  154. # by default but will not be avaiable if configurable MSRs are enabled.
  155. #
  156. # MWAIT_IS_NOP:
  157. # When this option is enabled MWAIT will not put the CPU into a sleep state.
  158. # This option exists only if Bochs compiled with --enable-monitor-mwait.
  159. #
  160. # IPS:
  161. # Emulated Instructions Per Second. This is the number of IPS that bochs
  162. # is capable of running on your machine. You can recompile Bochs with
  163. # --enable-show-ips option enabled, to find your host's capability.
  164. # Measured IPS value will then be logged into your log file or shown
  165. # in the status bar (if supported by the gui).
  166. #
  167. # IPS is used to calibrate many time-dependent events within the bochs
  168. # simulation. For example, changing IPS affects the frequency of VGA
  169. # updates, the duration of time before a key starts to autorepeat, and
  170. # the measurement of BogoMips and other benchmarks.
  171. #
  172. # Examples:
  173. #
  174. # Bochs Machine/Compiler Mips
  175. # ______________________________________________________________________
  176. # 2.4.6 3.4Ghz Intel Core i7 2600 with Win7x64/g++ 4.5.2 85 to 95 Mips
  177. # 2.3.7 3.2Ghz Intel Core 2 Q9770 with WinXP/g++ 3.4 50 to 55 Mips
  178. # 2.3.7 2.6Ghz Intel Core 2 Duo with WinXP/g++ 3.4 38 to 43 Mips
  179. # 2.2.6 2.6Ghz Intel Core 2 Duo with WinXP/g++ 3.4 21 to 25 Mips
  180. # 2.2.6 2.1Ghz Athlon XP with Linux 2.6/g++ 3.4 12 to 15 Mips
  181. #=======================================================================
  182. cpu: model=core2_penryn_t9600, count=1, ips=50000000, reset_on_triple_fault=1, ignore_bad_msrs=1, msrs="msrs.def"
  183. cpu: cpuid_limit_winnt=0
  184. #=======================================================================
  185. # CPUID:
  186. #
  187. # This defines features and functionality supported by Bochs emulated CPU.
  188. # The option has no offect if CPU model was selected in CPU option.
  189. #
  190. # MMX:
  191. # Select MMX instruction set support.
  192. # This option exists only if Bochs compiled with BX_CPU_LEVEL >= 5.
  193. #
  194. # APIC:
  195. # Select APIC configuration (LEGACY/XAPIC/XAPIC_EXT/X2APIC).
  196. # This option exists only if Bochs compiled with BX_CPU_LEVEL >= 5.
  197. #
  198. # SEP:
  199. # Select SYSENTER/SYSEXIT instruction set support.
  200. # This option exists only if Bochs compiled with BX_CPU_LEVEL >= 6.
  201. #
  202. # SIMD:
  203. # Select SIMD instructions support.
  204. # Any of NONE/SSE/SSE2/SSE3/SSSE3/SSE4_1/SSE4_2/AVX/AVX2/AVX512
  205. # could be selected.
  206. #
  207. # This option exists only if Bochs compiled with BX_CPU_LEVEL >= 6.
  208. # The AVX choises exists only if Bochs compiled with --enable-avx option.
  209. #
  210. # SSE4A:
  211. # Select AMD SSE4A instructions support.
  212. # This option exists only if Bochs compiled with BX_CPU_LEVEL >= 6.
  213. #
  214. # MISALIGNED_SSE:
  215. # Select AMD Misaligned SSE mode support.
  216. # This option exists only if Bochs compiled with BX_CPU_LEVEL >= 6.
  217. #
  218. # AES:
  219. # Select AES instruction set support.
  220. # This option exists only if Bochs compiled with BX_CPU_LEVEL >= 6.
  221. #
  222. # SHA:
  223. # Select SHA instruction set support.
  224. # This option exists only if Bochs compiled with BX_CPU_LEVEL >= 6.
  225. #
  226. # MOVBE:
  227. # Select MOVBE Intel(R) Atom instruction support.
  228. # This option exists only if Bochs compiled with BX_CPU_LEVEL >= 6.
  229. #
  230. # ADX:
  231. # Select ADCX/ADOX instructions support.
  232. # This option exists only if Bochs compiled with BX_CPU_LEVEL >= 6.
  233. #
  234. # XSAVE:
  235. # Select XSAVE extensions support.
  236. # This option exists only if Bochs compiled with BX_CPU_LEVEL >= 6.
  237. #
  238. # XSAVEOPT:
  239. # Select XSAVEOPT instruction support.
  240. # This option exists only if Bochs compiled with BX_CPU_LEVEL >= 6.
  241. #
  242. # AVX_F16C:
  243. # Select AVX float16 convert instructions support.
  244. # This option exists only if Bochs compiled with --enable-avx option.
  245. #
  246. # AVX_FMA:
  247. # Select AVX fused multiply add (FMA) instructions support.
  248. # This option exists only if Bochs compiled with --enable-avx option.
  249. #
  250. # BMI:
  251. # Select BMI1/BMI2 instructions support.
  252. # This option exists only if Bochs compiled with --enable-avx option.
  253. #
  254. # XOP:
  255. # Select AMD XOP instructions support.
  256. # This option exists only if Bochs compiled with --enable-avx option.
  257. #
  258. # FMA4:
  259. # Select AMD four operand FMA instructions support.
  260. # This option exists only if Bochs compiled with --enable-avx option.
  261. #
  262. # TBM:
  263. # Select AMD Trailing Bit Manipulation (TBM) instructions support.
  264. # This option exists only if Bochs compiled with --enable-avx option.
  265. #
  266. # X86-64:
  267. # Enable x86-64 and long mode support.
  268. # This option exists only if Bochs compiled with x86-64 support.
  269. #
  270. # 1G_PAGES:
  271. # Enable 1G page size support in long mode.
  272. # This option exists only if Bochs compiled with x86-64 support.
  273. #
  274. # PCID:
  275. # Enable Process-Context Identifiers (PCID) support in long mode.
  276. # This option exists only if Bochs compiled with x86-64 support.
  277. #
  278. # FSGSBASE:
  279. # Enable GS/GS BASE access instructions support in long mode.
  280. # This option exists only if Bochs compiled with x86-64 support.
  281. #
  282. # SMEP:
  283. # Enable Supervisor Mode Execution Protection (SMEP) support.
  284. # This option exists only if Bochs compiled with BX_CPU_LEVEL >= 6.
  285. #
  286. # SMAP:
  287. # Enable Supervisor Mode Access Prevention (SMAP) support.
  288. # This option exists only if Bochs compiled with BX_CPU_LEVEL >= 6.
  289. #
  290. # MWAIT:
  291. # Select MONITOR/MWAIT instructions support.
  292. # This option exists only if Bochs compiled with --enable-monitor-mwait.
  293. #
  294. # VMX:
  295. # Select VMX extensions emulation support.
  296. # This option exists only if Bochs compiled with --enable-vmx option.
  297. #
  298. # SVM:
  299. # Select AMD SVM (Secure Virtual Machine) extensions emulation support.
  300. # This option exists only if Bochs compiled with --enable-svm option.
  301. #
  302. # VENDOR_STRING:
  303. # Set the CPUID vendor string returned by CPUID(0x0). This should be a
  304. # twelve-character ASCII string.
  305. #
  306. # BRAND_STRING:
  307. # Set the CPUID vendor string returned by CPUID(0x80000002 .. 0x80000004).
  308. # This should be at most a forty-eight-character ASCII string.
  309. #
  310. # LEVEL:
  311. # Set emulated CPU level information returned by CPUID. Default value is
  312. # determined by configure option --enable-cpu-level. Currently supported
  313. # values are 5 (for Pentium and similar processors) and 6 (for P6 and
  314. # later processors).
  315. #
  316. # FAMILY:
  317. # Set model information returned by CPUID. Default family value determined
  318. # by configure option --enable-cpu-level.
  319. #
  320. # MODEL:
  321. # Set model information returned by CPUID. Default model value is 3.
  322. #
  323. # STEPPING:
  324. # Set stepping information returned by CPUID. Default stepping value is 3.
  325. #=======================================================================
  326. #cpuid: x86_64=1, mmx=1, sep=1, simd=sse4_2, apic=xapic, aes=1, movbe=1, xsave=1
  327. #cpuid: family=6, model=0x1a, stepping=5
  328. #=======================================================================
  329. # MEMORY
  330. # Set the amount of physical memory you want to emulate.
  331. #
  332. # GUEST:
  333. # Set amount of guest physical memory to emulate. The default is 32MB,
  334. # the maximum amount limited only by physical address space limitations.
  335. #
  336. # HOST:
  337. # Set amount of host memory you want to allocate for guest RAM emulation.
  338. # It is possible to allocate less memory than you want to emulate in guest
  339. # system. This will fake guest to see the non-existing memory. Once guest
  340. # system touches new memory block it will be dynamically taken from the
  341. # memory pool. You will be warned (by FATAL PANIC) in case guest already
  342. # used all allocated host memory and wants more.
  343. #
  344. #=======================================================================
  345. memory: guest=512, host=256
  346. #=======================================================================
  347. # ROMIMAGE:
  348. # The ROM BIOS controls what the PC does when it first powers on.
  349. # Normally, you can use a precompiled BIOS in the source or binary
  350. # distribution called BIOS-bochs-latest. The default ROM BIOS is usually loaded
  351. # starting at address 0xfffe0000, and it is exactly 128k long. The legacy
  352. # version of the Bochs BIOS is usually loaded starting at address 0xffff0000,
  353. # and it is exactly 64k long.
  354. # You can use the environment variable $BXSHARE to specify the location
  355. # of the BIOS.
  356. # The usage of external large BIOS images (up to 512k) at memory top is
  357. # now supported, but we still recommend to use the BIOS distributed with Bochs.
  358. # The start address is optional, since it can be calculated from image size.
  359. #=======================================================================
  360. romimage: file=$BXSHARE/BIOS-bochs-latest
  361. #romimage: file=$BXSHARE/bios.bin-1.7.5 # http://www.seabios.org/SeaBIOS
  362. #romimage: file=mybios.bin, address=0xfff80000 # 512k at memory top
  363. #=======================================================================
  364. # VGAROMIMAGE
  365. # You now need to load a VGA ROM BIOS into C0000.
  366. #=======================================================================
  367. #vgaromimage: file=bios/VGABIOS-elpin-2.40
  368. vgaromimage: file=$BXSHARE/VGABIOS-lgpl-latest
  369. #vgaromimage: file=bios/VGABIOS-lgpl-latest-cirrus
  370. #=======================================================================
  371. # OPTROMIMAGE[1-4]:
  372. # You may now load up to 4 optional ROM images. Be sure to use a
  373. # read-only area, typically between C8000 and EFFFF. These optional
  374. # ROM images should not overwrite the rombios (located at
  375. # F0000-FFFFF) and the videobios (located at C0000-C7FFF).
  376. # Those ROM images will be initialized by the bios if they contain
  377. # the right signature (0x55AA) and a valid checksum.
  378. # It can also be a convenient way to upload some arbitrary code/data
  379. # in the simulation, that can be retrieved by the boot loader
  380. #=======================================================================
  381. #optromimage1: file=optionalrom.bin, address=0xd0000
  382. #optromimage2: file=optionalrom.bin, address=0xd1000
  383. #optromimage3: file=optionalrom.bin, address=0xd2000
  384. #optromimage4: file=optionalrom.bin, address=0xd3000
  385. #optramimage1: file=/path/file1.img, address=0x0010000
  386. #optramimage2: file=/path/file2.img, address=0x0020000
  387. #optramimage3: file=/path/file3.img, address=0x0030000
  388. #optramimage4: file=/path/file4.img, address=0x0040000
  389. #=======================================================================
  390. # VGA:
  391. # This defines parameters related to the VGA display
  392. #
  393. # EXTENSION
  394. # Here you can specify the display extension to be used. With the value
  395. # 'none' you can use standard VGA with no extension. Other supported
  396. # values are 'vbe' for Bochs VBE and 'cirrus' for Cirrus SVGA support.
  397. #
  398. # UPDATE_FREQ
  399. # This parameter specifies the number of display updates per second.
  400. # The VGA update timer now uses the realtime engine and the default
  401. # value is 5. This parameter can be changed at runtime.
  402. #
  403. # REALTIME
  404. # If set to 1, the VGA timer is based on realtime, otherwise it is based
  405. # on the ips setting. If the host is slow (low ips, update_freq) and the
  406. # guest uses HLT appropriately, setting this to 0 and "clock: sync=none"
  407. # may improve the responsiveness of the guest GUI when the guest is
  408. # otherwise idle. The default value is 1.
  409. #
  410. # Examples:
  411. # vga: extension=cirrus, update_freq=10
  412. #=======================================================================
  413. #vga: extension=vbe, update_freq=5, realtime=1
  414. #=======================================================================
  415. # VOODOO:
  416. # This defines the Voodoo Graphics emulation (experimental). Currently
  417. # supported models are 'voodoo1' and 'voodoo2'. The Voodoo2 support is
  418. # not yet complete.
  419. #
  420. # Examples:
  421. # voodoo: enabled=1, model=voodoo1
  422. #=======================================================================
  423. #voodoo: enabled=1, model=voodoo1
  424. #=======================================================================
  425. # KEYBOARD:
  426. # This defines parameters related to the emulated keyboard
  427. #
  428. # TYPE:
  429. # Type of keyboard return by a "identify keyboard" command to the
  430. # keyboard controller. It must be one of "xt", "at" or "mf".
  431. # Defaults to "mf". It should be ok for almost everybody. A known
  432. # exception is french macs, that do have a "at"-like keyboard.
  433. #
  434. # SERIAL_DELAY:
  435. # Approximate time in microseconds that it takes one character to
  436. # be transferred from the keyboard to controller over the serial path.
  437. #
  438. # PASTE_DELAY:
  439. # Approximate time in microseconds between attempts to paste
  440. # characters to the keyboard controller. This leaves time for the
  441. # guest os to deal with the flow of characters. The ideal setting
  442. # depends on how your operating system processes characters. The
  443. # default of 100000 usec (.1 seconds) was chosen because it works
  444. # consistently in Windows.
  445. # If your OS is losing characters during a paste, increase the paste
  446. # delay until it stops losing characters.
  447. #
  448. # KEYMAP:
  449. # This enables a remap of a physical localized keyboard to a
  450. # virtualized us keyboard, as the PC architecture expects.
  451. #
  452. # USER_SHORTCUT:
  453. # This defines the keyboard shortcut to be sent when you press the "user"
  454. # button in the headerbar. The shortcut string is a combination of maximum
  455. # 3 key names (listed below) separated with a '-' character.
  456. # Valid key names:
  457. # "alt", "bksl", "bksp", "ctrl", "del", "down", "end", "enter", "esc",
  458. # "f1", ... "f12", "home", "ins", "left", "menu", "minus", "pgdwn", "pgup",
  459. # "plus", "power", "print", "right", "scrlck", "shift", "space", "tab", "up"
  460. # and "win".
  461. # Examples:
  462. # keyboard: type=mf, serial_delay=200, paste_delay=100000
  463. # keyboard: keymap=gui/keymaps/x11-pc-de.map
  464. # keyboard: user_shortcut=ctrl-alt-del
  465. #=======================================================================
  466. #keyboard: type=mf, serial_delay=250
  467. #=======================================================================
  468. # MOUSE:
  469. # This defines parameters for the emulated mouse type, the initial status
  470. # of the mouse capture and the runtime method to toggle it.
  471. #
  472. # TYPE:
  473. # With the mouse type option you can select the type of mouse to emulate.
  474. # The default value is 'ps2'. The other choices are 'imps2' (wheel mouse
  475. # on PS/2), 'serial', 'serial_wheel', 'serial_msys' (one com port requires
  476. # setting 'mode=mouse') and 'bus' (if present). To connect a mouse to an
  477. # USB port, see the 'usb_uhci', 'usb_ohci' or 'usb_xhci' options (requires
  478. # PCI and USB support).
  479. #
  480. # ENABLED:
  481. # The Bochs gui creates mouse "events" unless the 'enabled' option is
  482. # set to 0. The hardware emulation itself is not disabled by this.
  483. # Unless you have a particular reason for enabling the mouse by default,
  484. # it is recommended that you leave it off. You can also toggle the mouse
  485. # usage at runtime (RFB, SDL, Win32, wxWidgets and X11 - see below).
  486. #
  487. # TOGGLE:
  488. # The default method to toggle the mouse capture at runtime is to press the
  489. # CTRL key and the middle mouse button ('ctrl+mbutton'). This option allows
  490. # to change the method to 'ctrl+f10' (like DOSBox), 'ctrl+alt' (like QEMU)
  491. # or 'f12' (replaces win32 'legacyF12' option).
  492. #
  493. # Examples:
  494. # mouse: enabled=1
  495. # mouse: type=imps2, enabled=1
  496. # mouse: type=serial, enabled=1
  497. # mouse: enabled=0, toggle=ctrl+f10
  498. #=======================================================================
  499. mouse: enabled=0
  500. #=======================================================================
  501. # PCI:
  502. # This option controls the presence of a PCI chipset in Bochs. Currently it only
  503. # supports the i430FX and i440FX chipsets. You can also specify the devices
  504. # connected to PCI slots. Up to 5 slots are available. For these combined PCI/ISA
  505. # devices assigning to slot is mandatory if you want to emulate the PCI model:
  506. # cirrus, ne2k and pcivga. These PCI-only devices are also supported, but they
  507. # are auto-assigned if you don't use the slot configuration: e1000, es1370,
  508. # pcidev, pcipnic, usb_ohci, usb_xhci and voodoo.
  509. #
  510. # Example:
  511. # pci: enabled=1, chipset=i440fx, slot1=pcivga, slot2=ne2k
  512. #=======================================================================
  513. pci: enabled=1, chipset=i440fx
  514. #=======================================================================
  515. # CLOCK:
  516. # This defines the parameters of the clock inside Bochs:
  517. #
  518. # SYNC:
  519. # This defines the method how to synchronize the Bochs internal time
  520. # with realtime. With the value 'none' the Bochs time relies on the IPS
  521. # value and no host time synchronization is used. The 'slowdown' method
  522. # sacrifices performance to preserve reproducibility while allowing host
  523. # time correlation. The 'realtime' method sacrifices reproducibility to
  524. # preserve performance and host-time correlation.
  525. # It is possible to enable both synchronization methods.
  526. #
  527. # RTC_SYNC:
  528. # If this option is enabled together with the realtime synchronization,
  529. # the RTC runs at realtime speed. This feature is disabled by default.
  530. #
  531. # TIME0:
  532. # Specifies the start (boot) time of the virtual machine. Use a time
  533. # value as returned by the time(2) system call or a string as returned
  534. # by the ctime(3) system call. If no time0 value is set or if time0
  535. # equal to 1 (special case) or if time0 equal 'local', the simulation
  536. # will be started at the current local host time. If time0 equal to 2
  537. # (special case) or if time0 equal 'utc', the simulation will be started
  538. # at the current utc time.
  539. #
  540. # Syntax:
  541. # clock: sync=[none|slowdown|realtime|both], time0=[timeValue|local|utc]
  542. #
  543. # Example:
  544. # clock: sync=none, time0=local # Now (localtime)
  545. # clock: sync=slowdown, time0=315529200 # Tue Jan 1 00:00:00 1980
  546. # clock: sync=none, time0="Mon Jan 1 00:00:00 1990" # 631148400
  547. # clock: sync=realtime, time0=938581955 # Wed Sep 29 07:12:35 1999
  548. # clock: sync=realtime, time0="Sat Jan 1 00:00:00 2000" # 946681200
  549. # clock: sync=none, time0=1 # Now (localtime)
  550. # clock: sync=none, time0=utc # Now (utc/gmt)
  551. #
  552. # Default value are sync=none, rtc_sync=0, time0=local
  553. #=======================================================================
  554. #clock: sync=none, time0=local
  555. #=======================================================================
  556. # CMOSIMAGE:
  557. # This defines image file that can be loaded into the CMOS RAM at startup.
  558. # The rtc_init parameter controls whether initialize the RTC with values stored
  559. # in the image. By default the time0 argument given to the clock option is used.
  560. # With 'rtc_init=image' the image is the source for the initial time.
  561. #
  562. # Example:
  563. # cmosimage: file=cmos.img, rtc_init=image
  564. #=======================================================================
  565. #cmosimage: file=cmos.img, rtc_init=time0
  566. #=======================================================================
  567. # private_colormap: Request that the GUI create and use it's own
  568. # non-shared colormap. This colormap will be used
  569. # when in the bochs window. If not enabled, a
  570. # shared colormap scheme may be used. Not implemented
  571. # on all GUI's.
  572. #
  573. # Examples:
  574. # private_colormap: enabled=1
  575. # private_colormap: enabled=0
  576. #=======================================================================
  577. private_colormap: enabled=0
  578. #=======================================================================
  579. # FLOPPYA:
  580. # Point this to pathname of floppy image file or device
  581. # This should be of a bootable floppy(image/device) if you're
  582. # booting from 'a' (or 'floppy').
  583. #
  584. # You can set the initial status of the media to 'ejected' or 'inserted'.
  585. # floppya: 2_88=path, status=ejected (2.88M 3.5" media)
  586. # floppya: 1_44=path, status=inserted (1.44M 3.5" media)
  587. # floppya: 1_2=path, status=ejected (1.2M 5.25" media)
  588. # floppya: 720k=path, status=inserted (720K 3.5" media)
  589. # floppya: 360k=path, status=inserted (360K 5.25" media)
  590. # floppya: 320k=path, status=inserted (320K 5.25" media)
  591. # floppya: 180k=path, status=inserted (180K 5.25" media)
  592. # floppya: 160k=path, status=inserted (160K 5.25" media)
  593. # floppya: image=path, status=inserted (guess media type from image size)
  594. # floppya: 1_44=vvfat:path, status=inserted (use directory as VFAT media)
  595. # floppya: type=1_44 (1.44M 3.5" floppy drive, no media)
  596. #
  597. # The path should be the name of a disk image file. On Unix, you can use a raw
  598. # device name such as /dev/fd0 on Linux. On win32 platforms, use drive letters
  599. # such as a: or b: as the path. The parameter 'image' works with image files
  600. # only. In that case the size must match one of the supported types.
  601. # The parameter 'type' can be used to enable the floppy drive without media
  602. # and status specified. Usually the drive type is set up based on the media type.
  603. # The optional parameter 'write_protected' can be used to control the media
  604. # write protect switch. By default it is turned off.
  605. #=======================================================================
  606. floppya: 1_44=/dev/fd0, status=inserted
  607. #floppya: image=../1.44, status=inserted
  608. #floppya: 1_44=/dev/fd0H1440, status=inserted
  609. #floppya: 1_2=../1_2, status=inserted
  610. #floppya: 1_44=a:, status=inserted
  611. #floppya: 1_44=a.img, status=inserted, write_protected=1
  612. #floppya: 1_44=/dev/rfd0a, status=inserted
  613. #=======================================================================
  614. # FLOPPYB:
  615. # See FLOPPYA above for syntax
  616. #=======================================================================
  617. #floppyb: 1_44=b:, status=inserted
  618. #floppyb: 1_44=b.img, status=inserted
  619. #=======================================================================
  620. # ATA0, ATA1, ATA2, ATA3
  621. # ATA controller for hard disks and cdroms
  622. #
  623. # ata[0-3]: enabled=[0|1], ioaddr1=addr, ioaddr2=addr, irq=number
  624. #
  625. # These options enables up to 4 ata channels. For each channel
  626. # the two base io addresses and the irq must be specified.
  627. #
  628. # ata0 and ata1 are enabled by default with the values shown below
  629. #
  630. # Examples:
  631. # ata0: enabled=1, ioaddr1=0x1f0, ioaddr2=0x3f0, irq=14
  632. # ata1: enabled=1, ioaddr1=0x170, ioaddr2=0x370, irq=15
  633. # ata2: enabled=1, ioaddr1=0x1e8, ioaddr2=0x3e0, irq=11
  634. # ata3: enabled=1, ioaddr1=0x168, ioaddr2=0x360, irq=9
  635. #=======================================================================
  636. ata0: enabled=1, ioaddr1=0x1f0, ioaddr2=0x3f0, irq=14
  637. ata1: enabled=1, ioaddr1=0x170, ioaddr2=0x370, irq=15
  638. ata2: enabled=0, ioaddr1=0x1e8, ioaddr2=0x3e0, irq=11
  639. ata3: enabled=0, ioaddr1=0x168, ioaddr2=0x360, irq=9
  640. #=======================================================================
  641. # ATA[0-3]-MASTER, ATA[0-3]-SLAVE
  642. #
  643. # This defines the type and characteristics of all attached ata devices:
  644. # type= type of attached device [disk|cdrom]
  645. # mode= only valid for disks [flat|concat|external|dll|sparse|vmware3]
  646. # [vmware4|undoable|growing|volatile|vpc]
  647. # [vbox|vvfat]
  648. # path= path of the image / directory
  649. # cylinders= only valid for disks
  650. # heads= only valid for disks
  651. # spt= only valid for disks
  652. # status= only valid for cdroms [inserted|ejected]
  653. # biosdetect= type of biosdetection [none|auto], only for disks on ata0 [cmos]
  654. # translation=type of translation of the bios, only for disks [none|lba|large|rechs|auto]
  655. # model= string returned by identify device command
  656. # journal= optional filename of the redolog for undoable, volatile and vvfat disks
  657. #
  658. # Point this at a hard disk image file, cdrom iso file, or physical cdrom
  659. # device. To create a hard disk image, try running bximage. It will help you
  660. # choose the size and then suggest a line that works with it.
  661. #
  662. # In UNIX it may be possible to use a raw device as a Bochs hard disk,
  663. # but WE DON'T RECOMMEND IT. In Windows there is no easy way.
  664. #
  665. # In windows, the drive letter + colon notation should be used for cdroms.
  666. # Depending on versions of windows and drivers, you may only be able to
  667. # access the "first" cdrom in the system. On MacOSX, use path="drive"
  668. # to access the physical drive.
  669. #
  670. # The path is mandatory for hard disks. Disk geometry autodetection works with
  671. # images created by bximage if CHS is set to 0/0/0 (cylinders are calculated
  672. # using heads=16 and spt=63). For other hard disk images and modes the
  673. # cylinders, heads, and spt are mandatory. In all cases the disk size reported
  674. # from the image must be exactly C*H*S*512.
  675. #
  676. # Default values are:
  677. # mode=flat, biosdetect=auto, translation=auto, model="Generic 1234"
  678. #
  679. # The biosdetect option has currently no effect on the bios
  680. #
  681. # Examples:
  682. # ata0-master: type=disk, mode=flat, path=10M.sample, cylinders=306, heads=4, spt=17
  683. # ata0-slave: type=disk, mode=flat, path=20M.sample, cylinders=615, heads=4, spt=17
  684. # ata1-master: type=disk, mode=flat, path=30M.sample, cylinders=615, heads=6, spt=17
  685. # ata1-slave: type=disk, mode=flat, path=46M.sample, cylinders=940, heads=6, spt=17
  686. # ata2-master: type=disk, mode=flat, path=62M.sample, cylinders=940, heads=8, spt=17
  687. # ata2-slave: type=disk, mode=flat, path=112M.sample, cylinders=900, heads=15, spt=17
  688. # ata3-master: type=disk, mode=flat, path=483M.sample, cylinders=1024, heads=15, spt=63
  689. # ata3-slave: type=cdrom, path=iso.sample, status=inserted
  690. #=======================================================================
  691. ata0-master: type=disk, mode=flat, path="30M.sample"
  692. #ata0-master: type=disk, mode=flat, path="30M.sample", cylinders=615, heads=6, spt=17
  693. #ata0-master: type=disk, mode=flat, path="c.img", cylinders=0 # autodetect
  694. #ata0-slave: type=disk, mode=vvfat, path=/bochs/images/vvfat, journal=vvfat.redolog
  695. #ata0-slave: type=cdrom, path=D:, status=inserted
  696. #ata0-slave: type=cdrom, path=/dev/cdrom, status=inserted
  697. #ata0-slave: type=cdrom, path="drive", status=inserted
  698. #ata0-slave: type=cdrom, path=/dev/rcd0d, status=inserted
  699. #=======================================================================
  700. # BOOT:
  701. # This defines the boot sequence. Now you can specify up to 3 boot drives,
  702. # which can be 'floppy', 'disk', 'cdrom' or 'network' (boot ROM).
  703. # Legacy 'a' and 'c' are also supported.
  704. # Examples:
  705. # boot: floppy
  706. # boot: cdrom, disk
  707. # boot: network, disk
  708. # boot: cdrom, floppy, disk
  709. #=======================================================================
  710. #boot: floppy
  711. boot: disk
  712. #=======================================================================
  713. # FLOPPY_BOOTSIG_CHECK: disabled=[0|1]
  714. # Enables or disables the 0xaa55 signature check on boot floppies
  715. # Defaults to disabled=0
  716. # Examples:
  717. # floppy_bootsig_check: disabled=0
  718. # floppy_bootsig_check: disabled=1
  719. #=======================================================================
  720. floppy_bootsig_check: disabled=0
  721. #=======================================================================
  722. # LOG:
  723. # Give the path of the log file you'd like Bochs debug and misc. verbiage
  724. # to be written to. If you don't use this option or set the filename to
  725. # '-' the output is written to the console. If you really don't want it,
  726. # make it "/dev/null" (Unix) or "nul" (win32). :^(
  727. #
  728. # Examples:
  729. # log: ./bochs.out
  730. # log: /dev/tty
  731. #=======================================================================
  732. #log: /dev/null
  733. log: bochsout.txt
  734. #=======================================================================
  735. # LOGPREFIX:
  736. # This handles the format of the string prepended to each log line.
  737. # You may use those special tokens :
  738. # %t : 11 decimal digits timer tick
  739. # %i : 8 hexadecimal digits of cpu current eip (ignored in SMP configuration)
  740. # %e : 1 character event type ('i'nfo, 'd'ebug, 'p'anic, 'e'rror)
  741. # %d : 5 characters string of the device, between brackets
  742. #
  743. # Default : %t%e%d
  744. # Examples:
  745. # logprefix: %t-%e-@%i-%d
  746. # logprefix: %i%e%d
  747. #=======================================================================
  748. #logprefix: %t%e%d
  749. #=======================================================================
  750. # LOG CONTROLS
  751. #
  752. # Bochs has four severity levels for event logging.
  753. # panic: cannot proceed. If you choose to continue after a panic,
  754. # don't be surprised if you get strange behavior or crashes.
  755. # error: something went wrong, but it is probably safe to continue the
  756. # simulation.
  757. # info: interesting or useful messages.
  758. # debug: messages useful only when debugging the code. This may
  759. # spit out thousands per second.
  760. #
  761. # For events of each level, you can choose to exit Bochs ('fatal'), 'report'
  762. # or 'ignore'. On some guis you have the additional choice 'ask'. A gui dialog
  763. # appears asks how to proceed.
  764. #
  765. # It is also possible to specify the 'action' to do for each Bochs facility
  766. # separately (e.g. crash on panics from everything except the cdrom, and only
  767. # report those). See the 'log function' module list in the user documentation.
  768. #
  769. # If you are experiencing many panics, it can be helpful to change
  770. # the panic action to report instead of fatal. However, be aware
  771. # that anything executed after a panic is uncharted territory and can
  772. # cause bochs to become unstable. The panic is a "graceful exit," so
  773. # if you disable it you may get a spectacular disaster instead.
  774. #=======================================================================
  775. panic: action=ask
  776. error: action=report
  777. info: action=report
  778. debug: action=ignore, pci=report # report BX_DEBUG from module 'pci'
  779. #=======================================================================
  780. # DEBUGGER_LOG:
  781. # Give the path of the log file you'd like Bochs to log debugger output.
  782. # If you really don't want it, make it /dev/null or '-'. :^(
  783. #
  784. # Examples:
  785. # debugger_log: ./debugger.out
  786. #=======================================================================
  787. #debugger_log: /dev/null
  788. #debugger_log: debugger.out
  789. debugger_log: -
  790. #=======================================================================
  791. # COM1, COM2, COM3, COM4:
  792. # This defines a serial port (UART type 16550A). In the 'term' mode you can
  793. # specify a device to use as com1. This can be a real serial line, or a pty.
  794. # To use a pty (under X/Unix), create two windows (xterms, usually). One of
  795. # them will run bochs, and the other will act as com1. Find out the tty the com1
  796. # window using the `tty' command, and use that as the `dev' parameter.
  797. # Then do `sleep 1000000' in the com1 window to keep the shell from
  798. # messing with things, and run bochs in the other window. Serial I/O to
  799. # com1 (port 0x3f8) will all go to the other window.
  800. # In socket* and pipe* (win32 only) modes Bochs becomes either socket/named pipe
  801. # client or server. In client mode it connects to an already running server (if
  802. # connection fails Bochs treats com port as not connected). In server mode it
  803. # opens socket/named pipe and waits until a client application connects to it
  804. # before starting simulation. This mode is useful for remote debugging (e.g.
  805. # with gdb's "target remote host:port" command or windbg's command line option
  806. # -k com:pipe,port=\\.\pipe\pipename). Socket modes use simple TCP communication,
  807. # pipe modes use duplex byte mode pipes.
  808. # Other serial modes are 'null' (no input/output), 'file' (output to a file
  809. # specified as the 'dev' parameter), 'raw' (use the real serial port - under
  810. # construction for win32), 'mouse' (standard serial mouse - requires
  811. # mouse option setting 'type=serial', 'type=serial_wheel' or 'type=serial_msys').
  812. #
  813. # Examples:
  814. # com1: enabled=1, mode=null
  815. # com1: enabled=1, mode=mouse
  816. # com2: enabled=1, mode=file, dev=serial.out
  817. # com3: enabled=1, mode=raw, dev=com1
  818. # com3: enabled=1, mode=socket-client, dev=localhost:8888
  819. # com3: enabled=1, mode=socket-server, dev=localhost:8888
  820. # com4: enabled=1, mode=pipe-client, dev=\\.\pipe\mypipe
  821. # com4: enabled=1, mode=pipe-server, dev=\\.\pipe\mypipe
  822. #=======================================================================
  823. #com1: enabled=1, mode=term, dev=/dev/ttyp9
  824. #=======================================================================
  825. # PARPORT1, PARPORT2:
  826. # This defines a parallel (printer) port. When turned on and an output file is
  827. # defined the emulated printer port sends characters printed by the guest OS
  828. # into the output file. On some platforms a device filename can be used to
  829. # send the data to the real parallel port (e.g. "/dev/lp0" on Linux, "lpt1" on
  830. # win32 platforms).
  831. #
  832. # Examples:
  833. # parport1: enabled=1, file="parport.out"
  834. # parport2: enabled=1, file="/dev/lp0"
  835. # parport1: enabled=0
  836. #=======================================================================
  837. parport1: enabled=1, file="parport.out"
  838. #=======================================================================
  839. # SOUND:
  840. # This defines the lowlevel sound driver(s) for the wave (PCM) input / output
  841. # and the MIDI output feature and (if necessary) the devices to be used.
  842. # It can have several of the following properties.
  843. # All properties are in the format sound: property=value
  844. #
  845. # waveoutdrv:
  846. # This defines the driver to be used for the waveout feature.
  847. # Possible values are 'file' (all wave data sent to file), 'dummy' (no
  848. # output) and the platform-dependant drivers 'alsa', 'oss', 'osx', 'sdl'
  849. # and 'win'.
  850. # waveout:
  851. # This defines the device to be used for wave output (if necessary) or
  852. # the output file for the 'file' driver.
  853. # waveindrv:
  854. # This defines the driver to be used for the wavein feature.
  855. # Possible values are 'dummy' (recording silence) and platform-dependent
  856. # drivers 'alsa', 'oss' and 'win'.
  857. # wavein:
  858. # This defines the device to be used for wave output (if necessary).
  859. # midioutdrv:
  860. # This defines the driver to be used for the MIDI output feature.
  861. # Possible values are 'file' (all MIDI data sent to file), 'dummy' (no
  862. # output) and platform-dependent drivers 'alsa', 'oss', 'osx' and 'win'.
  863. # midiout:
  864. # This defines the device to be used for MIDI output (if necessary).
  865. # driver:
  866. # This defines the driver to be used for all sound features with one
  867. # property. Possible values are 'default' (platform default) and all
  868. # other choices described above. Overriding one or more settings with
  869. # the specific driver parameter is possible.
  870. #
  871. # Example for different drivers:
  872. # sound: waveoutdrv=sdl, waveindrv=alsa, midioutdrv=dummy
  873. #=======================================================================
  874. sound: driver=default, waveout=/dev/dsp. wavein=, midiout=
  875. #=======================================================================
  876. # SPEAKER:
  877. # This defines the PC speaker output mode. In the 'sound' mode the beep
  878. # is generated by the square wave generator which is a part of the
  879. # lowlevel sound support. The 'system' mode is only available on Linux
  880. # and Windows. On Linux /dev/console is used for output and on Windows
  881. # the Beep() function. The 'gui' mode forwards the beep to the related
  882. # gui methods (currently only used by the Carbon gui).
  883. #=======================================================================
  884. speaker: enabled=1, mode=sound
  885. #=======================================================================
  886. # SB16:
  887. # This defines the SB16 sound emulation. It can have several of the
  888. # following properties.
  889. # All properties are in the format sb16: property=value
  890. #
  891. # enabled:
  892. # This optional property controls the presence of the SB16 emulation.
  893. # The emulation is turned on unless this property is used and set to 0.
  894. # midimode: This parameter specifies what to do with the MIDI output.
  895. # 0 = no output
  896. # 1 = output to device specified with the sound option (system dependent)
  897. # 2 = MIDI or raw data output to file (depends on file name extension)
  898. # 3 = dual output (mode 1 and 2 at the same time)
  899. # midifile: This is the file where the midi output is stored (midimode 2 or 3).
  900. # wavemode: This parameter specifies what to do with the PCM output.
  901. # 0 = no output
  902. # 1 = output to device specified with the sound option (system dependent)
  903. # 2 = VOC, WAV or raw data output to file (depends on file name extension)
  904. # 3 = dual output (mode 1 and 2 at the same time)
  905. # wavefile: This is the file where the wave output is stored (wavemode 2 or 3).
  906. # loglevel:
  907. # 0=no log
  908. # 1=resource changes, midi program and bank changes
  909. # 2=severe errors
  910. # 3=all errors
  911. # 4=all errors plus all port accesses
  912. # 5=all errors and port accesses plus a lot of extra info
  913. # log: The file to write the sb16 emulator messages to.
  914. # dmatimer:
  915. # microseconds per second for a DMA cycle. Make it smaller to fix
  916. # non-continuous sound. 750000 is usually a good value. This needs a
  917. # reasonably correct setting for the IPS parameter of the CPU option.
  918. #
  919. # Examples for output modes:
  920. # sb16: midimode=2, midifile="output.mid", wavemode=1 # MIDI to file
  921. # sb16: midimode=1, wavemode=3, wavefile="output.wav" # wave to file and device
  922. #=======================================================================
  923. #sb16: midimode=1, wavemode=1, loglevel=2, log=sb16.log, dmatimer=600000
  924. #=======================================================================
  925. # ES1370:
  926. # This defines the ES1370 sound emulation (recording and playback - except
  927. # DAC1+DAC2 output at the same time). The parameter 'enabled' controls the
  928. # presence of the device. The wave and MIDI output can be sent to device, file
  929. # or both using the parameters 'wavemode', 'wavefile', 'midimode' and
  930. # 'midifile'. See the description of these parameters at the SB16 directive.
  931. #
  932. # Examples:
  933. # es1370: enabled=1, wavemode=1 # use 'sound' parameters
  934. # es1370: enabled=1, wavemode=2, wavefile=output.voc # send output to file
  935. #=======================================================================
  936. #es1370: enabled=1, wavemode=1
  937. #=======================================================================
  938. # ne2k: NE2000 compatible ethernet adapter
  939. #
  940. # Format:
  941. # ne2k: enabled=1, ioaddr=IOADDR, irq=IRQ, mac=MACADDR, ethmod=MODULE,
  942. # ethdev=DEVICE, script=SCRIPT, bootrom=BOOTROM
  943. #
  944. # IOADDR, IRQ: You probably won't need to change ioaddr and irq, unless there
  945. # are IRQ conflicts. These arguments are ignored when assign the ne2k to a
  946. # PCI slot.
  947. #
  948. # MAC: The MAC address MUST NOT match the address of any machine on the net.
  949. # Also, the first byte must be an even number (bit 0 set means a multicast
  950. # address), and you cannot use ff:ff:ff:ff:ff:ff because that's the broadcast
  951. # address. For the ethertap module, you must use fe:fd:00:00:00:01. There may
  952. # be other restrictions too. To be safe, just use the b0:c4... address.
  953. #
  954. # ETHDEV: The ethdev value is the name of the network interface on your host
  955. # platform. On UNIX machines, you can get the name by running ifconfig. On
  956. # Windows machines, you must run niclist to get the name of the ethdev.
  957. # Niclist source code is in misc/niclist.c and it is included in Windows
  958. # binary releases.
  959. #
  960. # SCRIPT: The script value is optional, and is the name of a script that
  961. # is executed after bochs initialize the network interface. You can use
  962. # this script to configure this network interface, or enable masquerading.
  963. # This is mainly useful for the tun/tap devices that only exist during
  964. # Bochs execution. The network interface name is supplied to the script
  965. # as first parameter. The 'slirp' module uses this parameter to specify
  966. # a config file for setting up an alternative IP configuration or additional
  967. # features.
  968. #
  969. # BOOTROM: The bootrom value is optional, and is the name of the ROM image
  970. # to load. Note that this feature is only implemented for the PCI version of
  971. # the NE2000.
  972. #
  973. # If you don't want to make connections to any physical networks,
  974. # you can use the following 'ethmod's to simulate a virtual network.
  975. # null: All packets are discarded, but logged to a few files.
  976. # vde: Virtual Distributed Ethernet
  977. # vnet: ARP, ICMP-echo(ping), DHCP and read/write TFTP are simulated.
  978. # The virtual host uses 192.168.10.1.
  979. # DHCP assigns 192.168.10.2 to the guest.
  980. # TFTP uses the 'ethdev' value for the root directory and doesn't
  981. # overwrite files.
  982. #
  983. #=======================================================================
  984. # ne2k: ioaddr=0x300, irq=9, mac=fe:fd:00:00:00:01, ethmod=fbsd, ethdev=en0 #macosx
  985. # ne2k: ioaddr=0x300, irq=9, mac=b0:c4:20:00:00:00, ethmod=fbsd, ethdev=xl0
  986. # ne2k: ioaddr=0x300, irq=9, mac=b0:c4:20:00:00:00, ethmod=linux, ethdev=eth0
  987. # ne2k: ioaddr=0x300, irq=9, mac=b0:c4:20:00:00:01, ethmod=win32, ethdev=MYCARD
  988. # ne2k: ioaddr=0x300, irq=9, mac=fe:fd:00:00:00:01, ethmod=tap, ethdev=tap0
  989. # ne2k: ioaddr=0x300, irq=9, mac=fe:fd:00:00:00:01, ethmod=tuntap, ethdev=/dev/net/tun0, script=./tunconfig
  990. # ne2k: ioaddr=0x300, irq=9, mac=b0:c4:20:00:00:01, ethmod=null, ethdev=eth0
  991. # ne2k: ioaddr=0x300, irq=9, mac=b0:c4:20:00:00:01, ethmod=vde, ethdev="/tmp/vde.ctl"
  992. # ne2k: ioaddr=0x300, irq=9, mac=b0:c4:20:00:00:01, ethmod=vnet, ethdev="c:/temp"
  993. # ne2k: mac=b0:c4:20:00:00:01, ethmod=slirp, script=slirp.conf, bootrom=ne2k_pci.rom
  994. #=======================================================================
  995. # pcipnic: Bochs/Etherboot pseudo-NIC
  996. #
  997. # Format:
  998. # pcipnic: enabled=1, mac=MACADDR, ethmod=MODULE, ethdev=DEVICE, script=SCRIPT,
  999. # bootrom=BOOTROM
  1000. #
  1001. # The pseudo-NIC accepts the same syntax (for mac, ethmod, ethdev, script,
  1002. # bootrom) and supports the same networking modules as the NE2000 adapter.
  1003. #=======================================================================
  1004. #pcipnic: enabled=1, mac=b0:c4:20:00:00:00, ethmod=vnet
  1005. #=======================================================================
  1006. # e1000: Intel(R) 82540EM Gigabit Ethernet adapter
  1007. #
  1008. # Format:
  1009. # e1000: enabled=1, mac=MACADDR, ethmod=MODULE, ethdev=DEVICE, script=SCRIPT
  1010. # bootrom=BOOTROM
  1011. #
  1012. # The E1000 accepts the same syntax (for mac, ethmod, ethdev, script, bootrom)
  1013. # and supports the same networking modules as the NE2000 adapter.
  1014. #=======================================================================
  1015. #e1000: enabled=1, mac=52:54:00:12:34:56, ethmod=slirp, script=slirp.conf
  1016. #=======================================================================
  1017. # USB_UHCI:
  1018. # This option controls the presence of the USB root hub which is a part
  1019. # of the i440FX PCI chipset. With the portX parameter you can connect devices
  1020. # to the hub (currently supported: 'mouse', 'tablet', 'keypad', 'disk', 'cdrom'
  1021. # 'hub' and 'printer').
  1022. #
  1023. # If you connect the mouse or tablet to one of the ports, Bochs forwards the
  1024. # mouse movement data to the USB device instead of the selected mouse type.
  1025. # When connecting the keypad to one of the ports, Bochs forwards the input of
  1026. # the numeric keypad to the USB device instead of the PS/2 keyboard.
  1027. #
  1028. # To connect a 'flat' mode image as an USB hardisk you can use the 'disk' device
  1029. # with the path to the image separated with a colon. To use other disk image modes
  1030. # similar to ATA disks the syntax 'disk:mode:filename' must be used (see below).
  1031. #
  1032. # To emulate an USB cdrom you can use the 'cdrom' device name and the path to
  1033. # an ISO image or raw device name also separated with a colon. An option to
  1034. # insert/eject media is available in the runtime configuration.
  1035. #
  1036. # The device name 'hub' connects an external hub with max. 8 ports (default: 4)
  1037. # to the root hub. To specify the number of ports you have to add the value
  1038. # separated with a colon. Connecting devices to the external hub ports is only
  1039. # available in the runtime configuration.
  1040. #
  1041. # The device 'printer' emulates the HP Deskjet 920C printer. The PCL data is
  1042. # sent to a file specified in bochsrc.txt. The current code appends the PCL
  1043. # code to the file if the file already existed. It would probably be nice to
  1044. # overwrite the file instead, asking user first.
  1045. #
  1046. # The optionsX parameter can be used to assign specific options to the device
  1047. # connected to the corresponding USB port. Currently this feature is used to
  1048. # set the speed reported by device ('low', 'full', 'high' or 'super'). The
  1049. # availabe speed choices depend on both HC and device. For the USB 'disk' device
  1050. # the optionsX parameter can be used to specify an alternative redolog file
  1051. # (journal) of some image modes. For 'vvfat' mode USB disks the optionsX
  1052. # parameter can be used to specify the disk size (range 128M ... 128G). If the
  1053. # size is not specified, it defaults to 504M.
  1054. #=======================================================================
  1055. #usb_uhci: enabled=1
  1056. #usb_uhci: enabled=1, port1=mouse, port2=disk:usbstick.img
  1057. #usb_uhci: enabled=1, port1=hub:7, port2=disk:growing:usbdisk.img
  1058. #usb_uhci: enabled=1, port2=disk:undoable:usbdisk.img, options2=journal:redo.log
  1059. #usb_uhci: enabled=1, port2=disk:vvfat:vvfat, options2=speed:full
  1060. #usb_uhci: enabled=1, port1=printer:printdata.bin, port2=cdrom:image.iso
  1061. #=======================================================================
  1062. # USB_OHCI:
  1063. # This option controls the presence of the USB OHCI host controller with a
  1064. # 2-port hub. The portX parameter accepts the same device types with the same
  1065. # syntax as the UHCI controller (see above). The optionsX parameter is also
  1066. # available on OHCI.
  1067. #=======================================================================
  1068. #usb_ohci: enabled=1
  1069. #usb_ohci: enabled=1, port1=printer:usbprinter.bin
  1070. #=======================================================================
  1071. # USB_XHCI:
  1072. # This option controls the presence of the experimental USB xHCI host controller
  1073. # with a 4-port hub. The portX parameter accepts the same device types with the
  1074. # same syntax as the UHCI controller (see above). The optionsX parameter is
  1075. # also available on xHCI. NOTE: port 1 and 2 are USB3 and only support
  1076. # super-speed devices, but port 3 and 4 are USB2 and support speed settings
  1077. # low, full and high.
  1078. #=======================================================================
  1079. #usb_xhci: enabled=1
  1080. #=======================================================================
  1081. # PCIDEV:
  1082. # PCI host device mapping
  1083. #=======================================================================
  1084. #pcidev: vendor=0x1234, device=0x5678
  1085. #=======================================================================
  1086. # GDBSTUB:
  1087. # Enable GDB stub. See user documentation for details.
  1088. # Default value is enabled=0.
  1089. #=======================================================================
  1090. #gdbstub: enabled=0, port=1234, text_base=0, data_base=0, bss_base=0
  1091. #=======================================================================
  1092. # MAGIC_BREAK:
  1093. # This enables the "magic breakpoint" feature when using the debugger.
  1094. # The useless cpu instruction XCHG BX, BX causes Bochs to enter the
  1095. # debugger mode. This might be useful for software development.
  1096. #
  1097. # Example:
  1098. # magic_break: enabled=1
  1099. #=======================================================================
  1100. #magic_break: enabled=1
  1101. #=======================================================================
  1102. # DEBUG_SYMBOLS:
  1103. # This loads symbols from the specified file for use in Bochs' internal
  1104. # debugger. Symbols are loaded into global context. This is equivalent to
  1105. # issuing ldsym debugger command at start up.
  1106. #
  1107. # Example:
  1108. # debug_symbols: file="kernel.sym"
  1109. # debug_symbols: file="kernel.sym", offset=0x80000000
  1110. #=======================================================================
  1111. #debug_symbols: file="kernel.sym"
  1112. #print_timestamps: enabled=1
  1113. #=======================================================================
  1114. # PORT_E9_HACK:
  1115. # The 0xE9 port doesn't exists in normal ISA architecture. However, we
  1116. # define a convention here, to display on the console of the system running
  1117. # Bochs anything that is written to it. The idea is to provide debug output
  1118. # very early when writing BIOS or OS code for example, without having to
  1119. # bother with setting up a serial port or etc. Reading from port 0xE9 will
  1120. # will return 0xe9 to let you know if the feature is available.
  1121. # Leave this 0 unless you have a reason to use it.
  1122. #
  1123. # Example:
  1124. # port_e9_hack: enabled=1
  1125. #=======================================================================
  1126. #port_e9_hack: enabled=1
  1127. #=======================================================================
  1128. # other stuff
  1129. #=======================================================================
  1130. #load32bitOSImage: os=nullkernel, path=../kernel.img, iolog=../vga_io.log
  1131. #load32bitOSImage: os=linux, path=../linux.img, iolog=../vga_io.log, initrd=../initrd.img
  1132. #=======================================================================
  1133. # fullscreen: ONLY IMPLEMENTED ON AMIGA
  1134. # Request that Bochs occupy the entire screen instead of a
  1135. # window.
  1136. #
  1137. # Examples:
  1138. # fullscreen: enabled=0
  1139. # fullscreen: enabled=1
  1140. #=======================================================================
  1141. #fullscreen: enabled=0
  1142. #screenmode: name="sample"
  1143. #=======================================================================
  1144. # USER_PLUGIN:
  1145. # Load user-defined plugin. This option is available only if Bochs is
  1146. # compiled with plugin support. Maximum 8 different plugins are supported.
  1147. # See the example in the Bochs sources how to write a plugin device.
  1148. #=======================================================================
  1149. #user_plugin: name=testdev
  1150. #=======================================================================
  1151. # for Macintosh, use the style of pathnames in the following
  1152. # examples.
  1153. #
  1154. # vgaromimage: :bios:VGABIOS-elpin-2.40
  1155. # romimage: file=:bios:BIOS-bochs-latest, address=0xf0000
  1156. # floppya: 1_44=[fd:], status=inserted
  1157. #=======================================================================
  1158. #=======================================================================
  1159. # MEGS
  1160. # Set the number of Megabytes of physical memory you want to emulate.
  1161. # The default is 32MB, most OS's won't need more than that.
  1162. # The maximum amount of memory supported is 2048Mb.
  1163. # The 'MEGS' option is deprecated. Use 'MEMORY' option instead.
  1164. #=======================================================================
  1165. #megs: 256
  1166. #megs: 128
  1167. #megs: 64
  1168. #megs: 32
  1169. #megs: 16
  1170. #megs: 8