Bochs简介

安装

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

参考

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • Alchemical Symbols ⭕🟪🧧🥬🟥🟦🟧 ←↑→↓↖↙↗↘↕⏤unicode=Geometric Sh...
    平知阅读 1,910评论 1 1
  • afinalAfinal是一个android的ioc,orm框架 https://github.com/yangf...
    passiontim阅读 15,568评论 2 45
  • 上一篇讲解了Ubuntu的配置, 这次讲解如何配置bochs虚拟机 bochs配置 下载 bochs 2.6.2 ...
    烟花笑寂寞阅读 316评论 0 0
  • 16宿命:用概率思维提高你的胜算 以前的我是风险厌恶者,不喜欢去冒险,但是人生放弃了冒险,也就放弃了无数的可能。 ...
    yichen大刀阅读 6,112评论 0 4
  • 公元:2019年11月28日19时42分农历:二零一九年 十一月 初三日 戌时干支:己亥乙亥己巳甲戌当月节气:立冬...
    石放阅读 6,925评论 0 2