搭建bochs模拟器

基于linux os搭建bochs运行环境

1、安装bochs

直接输入命令:

$ sudo apt-get install bochs
$ sudo apt-get install bochs-x

2、创建bochs配置文件:

1 #configuration file for Bochs
2
3 #how much memory the emulated machine will have
4 megs: 32
5
6 #filename of ROM images
7 romimage: file=$BXSHARE/BIOS-bochs-latest
8 vgaromimage: file=$BXSHARE/VGABIOS-lgpl-latest
9
10 #what disk images will be used
11 #floppya: 1_44=/dev/loop0, status=inserted
12 floppya: 1_44=floppy.img, status=inserted
13
14 #choose the boot disk
15 boot: floppy
16
17 #where do we send log messages
18 log: bochsout.txt
19
20 #disable the mouse
21 mouse: enabled=0
22
23 #enable key mapping, using US layout as default
24 keyboard_mapping: enabled=1, map=/usr/share/bochs/keymaps/x11-pc-us.map

这里文件路径可能会有差异

3、制作镜像

直接终端输入:

$ bximage

 

 注意三个选项,分别选择 fd(软盘)、1.44、镜像名称

4、image制作完成之后,以后可以将自己代码生成的二进制文件写入其中,

5、启动bochs运行,效果如下:

 

 

 

参考文档:

搭建 bochs 运行环境_zhangji-CSDN博客

 

posted @ 2021-08-11 18:06  hunterDing  阅读(221)  评论(0编辑  收藏  举报