mac 安装 bochs

来源:互联网 发布:手机团购软件 编辑:程序博客网 时间:2024/05/16 06:03

mac 安装 bochs

bochs下载地址

0x01 安装SDL库

在http://www.libsdl.org安装,或者使用Homebrew来进行安装。Homebrew的安装命令brew install sdl。

0x02 Configure Bochs

简单的解压命令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了。

0x03 Building and Installing Bochs

Configure好以后,常规的安装。

makemake 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 mousemouse: 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 havemegs: 32

在shell中运行bochs打开bochs

选 2 ,输入配置文件位置

或者命令行直接

bochs -f 配置文件路径

进入后按 c 启动

bochs 可以按住 ctrl 和鼠标中键移动指针.

0 0
原创粉丝点击