安装带调试功能的bochs

学习操作系统,下载了bochs最新版本,但是不会编译安装,老是出错,用了一会简单的无调试功能的bochs但是感觉缺少点什么,想用带调试功能的,网上搜索了好多资料,终于自己完成了编译安装的bochs,不容易啊,赶紧分享一下,linux版本是ubuntu 9.04 虚拟己版本是bochs 2.4.1

不带调试功能的简单安装方法:
sudo apt-get install bochs

带调试功能的bochs安装

sudo apt-get install build-essential  安装编译环境

tar vxzf bochs-2.4.1.tar.gz
cd bochs-2.3.5
./configure --enable-debugger --enable-disasm
这一步问题出来了,没注意配置时出现的问题就接着make了,导致make的时候,老是说83行遗漏分隔符。后来注意到了configure 的时候最后一行出现了一句:

> ERROR: X windows gui was selected, but X windows libraries were not found.

后来解决了, sudo aptitude install xorg-dev
(参考http://blog.163.com/i.kenting/blog/static/1226902032009625102310341/)

When install bochs, While I compile come file with ./configure there give a msg:

> configure: WARNING: Bochs for wxWidgets cannot be compiled here, disabling it

> checking for default gui on this platform... x11

> ERROR: X windows gui was selected, but X windows libraries were not found.

I just follow this :

You need to install the development libraries. To compile a wxWidgets

program you need libwxbase2.4-dev, libwxbase2.4-dev, and

libwxgtk2.4-contrib-dev (for a wx2.4 program) or libwxgtk2.6-dev (for a

wx2.6 program). For an X11 program you need x-window-system-dev, which

should pull in all the dependencies you need.

but I couldn't install the x-window-system-dev with: sudo apt-get install x-window-system-dev

the to solved this just:

sudo aptitude install xorg-dev  everything is fine with the ./configure now .

 

sudo apt-get install xorg-dev无法安装,吼吼,又学到了个aptitude 。

再./configure 试试,晕,又有错误,错误提示是
checking for display libraries...  X11
Package gtk+-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk+-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk+-2.0' found
ERROR: pkg-config was not found, or unable to access the gtk+-2.0 package.
Install pkg-config and the gtk+ development package,
or disable the gui debugger, or the wxWidgets display library (whichever is being used).

这个安装了个 gtk就解决了 
sudo aptitude install libgtk2.0-dev (这个是自己猜的,安装上果然可以了,呵呵,还有点天分)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
好的,以下是在Ubuntu安装Bochs的步骤: 1. 打开终端,输入以下命令以安装Bochs: ``` sudo apt-get install bochs bochs-x bochs-sdl ``` 2. 安装完成后,可以通过以下命令检查Bochs是否已经成功安装: ``` bochs -help ``` 如果出现了Bochs的帮助信息,则说明Bochs已经成功安装。 3. 接下来,可以通过以下命令启动Bochs: ``` bochs ``` 这将启动Bochs模拟器,并进入Bochs的命令行界面。 4. 如果需要使用Bochs来运行操作系统,则需要为Bochs配置一个虚拟机。可以通过创建一个Bochsrc文件来配置虚拟机。以下是一个简单的Bochsrc文件示例: ``` # configuration file generated by Bochs # http://bochs.sourceforge.net/ # how much memory the emulated machine will have megabytes: 32 # filename of ROM image romimage: file=/usr/share/bochs/BIOS-bochs-latest, address=0xf0000 # boot from floppy disk image boot: floppy # filename of floppy disk image floppy: 1_44=a.img, status=inserted # enable VGA graphics card vga: extension=vbe, update_freq=5 # enable sound card sb16: enabled=1, irq=7, dma=1, hdma=5, sbtype=sb16, sbbase=0x220, midi=none # enable network card ne2k: ioaddr=0x300, irq=9, mac=fe:fd:00:00:00:01, ethmod=linux # enable serial port com1: enabled=1, mode=term # enable parallel port lpt1: enabled=1 # enable keyboard keyboard: type=mf # enable mouse mouse: enabled=1 ``` 在这个示例中,Bochs将会模拟一台拥有32MB内存、启动盘为a.img、使用VGA显卡、SB16声卡、NE2000网卡、COM1串口、LPT1并口、MF键盘和鼠标的虚拟机。 5. 将Bochsrc文件保存到任意位置,并在启动Bochs时指定该文件的路径: ``` bochs -f /path/to/bochsrc ``` 这将启动Bochs,并使用指定的Bochsrc文件来配置虚拟机。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值