Bochs的安装需要通过源码进行。
下载bochs-2.6.9.tar.gz后,解压到任意目录下,进入bochs-2.6.9,打开命令行
安装编译程序依赖的包
sudo apt-get install build-essential
打开调试功能的开关
./configure --enable-debugger --enable-disasm
在此过程中如果出现错误,请先检查所需的支持是否都安装了。
如有错误,依赖包安装好后,需重新configure
编译
sudo make
安装
sudo make install
配置
在你的工作目录下新建 .bochsrc 文件
这是我的文件内容
#configuration file for Bochs
#how much memory the emulated machine will have
megs: 32
#filename of ROM images
romimage:file=/usr/local/share/bochs/BIOS-bochs-latest
vgaromimage:file=/usr/local/share/bochs/VGABIOS-lgpl-latest
#what disk images will be used
floppya: 1_44=demo.img, status=inserted
#choose the boot disk.
boot: floppy
#where do we send log messages
log: bochsout.txt
#disable the mouse
mouse: enabled=0
#enable key mapping, using US layout as default
keyboard:keymap=/usr/local/share/bochs/keymaps/x11-pc-de.map
这里的romimage与vgaromimage路径,需要跟据实际情况进行调整,当然keyboard也是。
floppya: 1_44=demo.img, status=inserted
这里的demo.img可以换成自己的img名称。
boot: floppy
启动方式
log: bochsout.txt
日志文件
mouse: enabled=0
鼠标设置