美文网首页
Bochs简介

Bochs简介

作者: 诺之林 | 来源:发表于2021-09-28 08:54 被阅读0次

安装

Bochs is a highly portable open source IA-32 (x86) PC emulator written in C++, that runs on most popular platforms

brew install bochs

配置

vim ~/.zshrc
export BXSHARE="`brew --prefix bochs`/share/bochs"
export PATH="$PATH:`brew --prefix bochs`/bin"
vim bochsrc
# 设置虚拟机内存为32MB
megs: 32

# 设置BIOS镜像
romimage: file=$BXSHARE/BIOS-bochs-latest

# 设置VGA BIOS镜像
vgaromimage: file=$BXSHARE/VGABIOS-lgpl-latest

# 设置从硬盘启动
boot: disk 

# 设置日志文件
log: bochsout.txt

# 关闭鼠标
mouse: enabled=0

# 打开键盘
keyboard: type=mf, serial_delay=250

# 设置硬盘
ata0: enabled=1, ioaddr1=0x1f0, ioaddr2=0x3f0, irq=14

# 添加gdb远程调试支持
# gdbstub: enabled=1, port=1234, text_base=0, data_base=0, bss_base=0

运行

bochs -f bochsrc
This is the Bochs Configuration Interface, where you can describe the
machine that you want to simulate.  Bochs has already searched for a
configuration file (typically called bochsrc.txt) and loaded it if it
could be found.  When you are satisfied with the configuration, go
ahead and start the simulation.

You can also start bochs with the -q option to skip these menus.

1. Restore factory default configuration
2. Read options from...
3. Edit options
4. Save options to...
5. Restore the Bochs state from...
6. Begin simulation
7. Quit now

参考

相关文章

网友评论

      本文标题:Bochs简介

      本文链接:https://www.haomeiwen.com/subject/zroknltx.html