bochs下载地址
在http://www.libsdl.org安装,或者使用Homebrew来进行安装。Homebrew的安装命令brew install sdl。
简单的解压命令tar -xvf bochs-2.6.tar.gz后,Configure需要的参数:
./configure --enable-ne2000 \ --enable-all-optimizations \ --enable-cpu-level=6 \ --enable-x86-64 \ --enable-vmx=2 \ --enable-pci \ --enable-usb \ --enable-usb-ohci \ --enable-e1000 \ --enable-debugger \ --enable-disasm \ --disable-debugger-gui \ --with-sdl \ --prefix=$HOME/opt/bochs其中,–disable-debugger-gui被加入的原因是,debugger GUI需要使用GTK+库,但是Mac OS X默认没有安装GTK+,所以就不启用debugger GUI了。
Configure好以后,常规的安装。
make make install安装完成后,可以加入环境变量一些内容
export BXSHARE="$HOME/opt/bochs/share/bochs" export PATH="$PATH:$HOME/opt/bochs/bin"在bochs的安装目录下,有share/doc/bochs/bochsrc-sample.txt这个配置文件模板,可以拷贝出来修改,目前先做一个配置文件如下:
############################################################### # Configuration file for Bochs(Linux) ############################################################### # filename of ROM images romimage: file=$BXSHARE/BIOS-bochs-latest # VGAROMIMAGE # You now need to load a VGA ROM BIOS into C0000. vgaromimage: file=$BXSHARE/VGABIOS-lgpl-latest # what disk images will be used # 磁盘文件位置 floppya: 1_44=/Users/yzr/codework/YangOS/os.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. 注意map的路径 keyboard_mapping: enabled=0, map=$BXSHARE/keymaps/x11-pc-us.map # how much memory the emulated machine will have megs: 32在shell中运行bochs打开bochs
选 2 ,输入配置文件位置
或者命令行直接
bochs -f 配置文件路径进入后按 c 启动
bochs 可以按住 ctrl 和鼠标中键移动指针.
