您的位置:首页 > 其它

ubuntu 12.04 13.04 下安装BOCHS注意事项

2013-08-12 16:41 246 查看
这些是必须要用的环境。

sudo apt-get install build-essential

sudo apt-get install g++

sudo apt-get install libgtk2.0-dev

安装命令
$tar-vxzf bochs-2.6.2tar.gz
$cd bochs-2.6.2
$./configure --enable-debugger --enable-disasm
$make
$sudo make install

错误:checking for default gui on this platform... x11

ERROR: X windows gui was selected, but X windows libraries were not found.

这个貌似只好换高版本的bochs了,按照网上可以成功的方法是不装界面的。

关于make报错:

错误:没有多线程库

/usr/bin/ld: gui/libgui.a(gtk_enh_dbg_osdep.o): undefined reference to symbol 'pthread_create@@GLIBC_2.1'

/usr/bin/ld: note: 'pthread_create@@GLIBC_2.4' is defined in DSO
/lib/libpthread.so.0 so try adding it to the linker command line

/lib/libpthread.so.0: could not read symbols: Invalid operation

collect2: error: ld returned 1 exit status

make: *** [bochs] Error 1

解决方法:

打开Makefile,在92行左右找到 LIBS = 。。。一行,在这一行最后面添加 -lpthread

(注意修改完成之后不能重新configure,不然添加的-lpthread会消失,添加后直接make就可以了)

运行bochs时错误:

错误 bochs-biin: symbol lookup error: /usr/lib/bochs/plugins/libbx_x.so: undefined symbol: XpmCreatePixmapFromData

sudo apt-get install bochs-sdl

在我们的bochsrc配置文件中,加入一句话:

display_library: sdl

再贴上一个配置文件 最主要的问题还是路径

###############################################################
# 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

# what disk images will be used
vgaromimage: file=/usr/local/share/bochs/VGABIOS-lgpl-latest

#虚拟镜像

# what disk images will be used

#软盘
#floppya: 1_44=a.img, status=inserted

#虚拟硬盘
ata0: enabled=1, ioaddr1=0x1f0, ioaddr2=0x3f0, irq=14
ata0-master: type=disk, path="a.img"
ata1: enabled=1, ioaddr1=0x170, ioaddr2=0x370, irq=15
ata1-master: type=none
ata1-slave: type=none
ata2: enabled=0
ata3: enabled=0

# choose the boot disk. #启动的介质
boot: disk #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_mapping: enabled=1, map=/usr/local/share/bochs/keymaps/x11-pc-us.map

红色地方标注都是要注意的地方 查找该文件究竟在哪里存放,还有可能是这个目录 /usr/share/bochs
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: