linux下安装bochs

 - by Hector

一、准备工作

bochs是由C++编写的,我们要安装相应的编译环境

sudo apt-get install build-essential

如果要图形界面,

sudo apt-get install xorg-dev

安装bison,

sudo apt-get install bison

到bochs官方网站下载源码包bochs-2.3.7.tar.gz

tar xvfz bochs-2.3.7.tar.gz解压产生文件夹bochs-2.3.7,生成目录/bochs-2.3.7

二、configure

在目录/bochs-2.3.7/下执行

./configure –with-x11 –enable-debugger –enable-disasm –enable-pci –enable-pcidev –enable-plugins –enable-ne2000 –enable-pnic

configure后的选项作为参考,你可以用./configure –help查看全部选项,bochs官方网站上有详细说明。

如果configure过程中出现这个问题:

  • checking for gtk+-2.0 >= 2.0.0… Package gtk+-2.0 was not found in the pkg-config search path. Perhaps you should add the directory containing `gtk+-2.0.pc’ to the PKG_CONFIG_PATH environment variable No package ‘gtk+-2.0’ found     configure: error: Library requirements (gtk+-2.0 >= 2.0.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.

解决办法为:安装libgtk2.0-dev

sudo apt-get install libgtk2.0-dev

三、使用

使用bochs命令,默认会在当前目录顺序寻找以下文件作为默认到配置文件

.bochsrc

bochsrc

bochsrc.txt

bochsrc.bxrc(仅win有效)

Leave a comment