歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> Bochs 在Windows和Linux下配置對比

Bochs 在Windows和Linux下配置對比

日期:2017/2/28 16:14:46   编辑:Linux教程
Bochs是一個x86硬件平台的開源模擬器。它可以模擬各種硬件的配置。Bochs模擬的是整個PC平台,包括I/O設備、內存和BIOS。更為有趣的是,甚至可以不使用PC硬件來運行Bochs。事實上,它可以在任何編譯運行Bochs的平台上模擬x86硬件。通過改變配置,可以指定使用的CPU(386、486或者586),以及內存大小等。一句話,Bochs是電腦裡的“PC”。根據需要,Bochs還可以模擬多台PC,此外,它甚至還有自己的電源按鈕。

Windows下bochs的配置文件說明

###############################################################
# bochsrc.txt file for zieckey's first OS boot disk image.
###############################################################

# how much memory the emulated machine will have 對內存的設置
megs: 32

# filename of ROM images 配置ROM的選項,也即BIOS的設置,一個是ROM一個是顯存ROM,注意路徑問題
romimage: file=../BIOS-bochs-latest, address=0xf0000
vgaromimage: file=../VGABIOS-lgpl-latest

# what disk images will be used 配置軟盤鏡像
floppya: 1_44=boot.img, status=inserted
#floppyb: 1_44=floppyb.img, status=inserted

# hard disk 配置硬盤鏡像,也即軟盤存在於硬盤上的位置
ata0: enabled=1, ioaddr1=0x1f0, ioaddr2=0x3f0, irq=14
#ata0-master: type=disk, path="hd10meg.img", cylinders=306, heads=4, spt=17 這是dlxlinux的實例

# choose the boot disk. 配置啟動目錄,從軟盤啟動
boot: floppy

# default config interface is textconfig.
#config_interface: textconfig
#config_interface: wx

#display_library: x
# other choices: win32 sdl wx carbon amigaos beos macintosh nogui rfb term svga

# where do we send log messages? 配置bochs的日志文件
log: bochsout.log

# disable the mouse, since DLX is text only 配置鼠標,不要使用鍵盤的配置項
mouse: enabled=0

Linux下bochs的配置文件說明

基本同Windows的配置項

###############################################################
# Configuration file for Bochs
###############################################################

# how much memory the emulated machine will have
megs: 32

# filename of ROM images
romimage: file=/usr/share/bochs/BIOS-bochs-latest
vgaromimage: /usr/share/vgabios/vgabios.bin 注意路徑與windows下使用的文件的區分

# what disk images will be used
floppya: 1_44=freedos.img, status=inserted
floppyb: 1_44=pm.img, status=inserted

# choose the boot disk.
boot: a

# where do we send log messages?
# log: bochsout.txt

# disable the mouse
mouse: enabled=0

# enable key mapping, using US layout as default.
keyboard_mapping: enabled=1, map=/usr/share/bochs/keymaps/x11-pc-us.map 注意路徑問題

Copyright © Linux教程網 All Rights Reserved