谢谢http://blog.csdn.net/jamesjxin/article/details/7090444 没有你我不知道还要折腾多久
bochs官网为http://bochs.sourceforge.net/
我是在看自己动手写操作系统,按照书上说的安装的时候会有错误,解决方案如下:
先解压,进入bochs目录
先安装gcc-c++ gtk2-devel libX11-devel几个包 :yum install cc-c++ gtk2-devel libX11-devel
不然./configure --enable-debugger --enable-disasm
这里据说会报错。。但是我之前没安gtk2-devel的时候这快没错,下一步死了!!!
make的时候出现如下错误 :
gui/libgui.a(gtk_enh_dbg_osdep.o): In function `MakeGTKthreads()':
/home/jiaxin/JOS/bochs-20111218/gui/gtk_enh_dbg_osdep.cc:2110: undefined reference to `pthread_create'
collect2: ld returned 1 exit status
make: *** [bochs] 错误 1
解决办法:在bochs文件夹下的Makefile的LIBS=…… -lpthread(新加的)
再执行make、make install安装成功
安装成功后需要配置bochsrc
小白的我找了好久也没有找到目录bochsrc所在,所以自己建了一个
内容跟书上的差不多,romimage等的目录改了
如下
###############################################################
# 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=a.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_mapping: enabled=1, map=/usr/local/share/bochs/keymaps/x11-pc-us.map
然后就没有然后拉~