bochs+gdb调试linux0.11环境搭建

环境准备

Centos6.8_x86

bochs-2.2.1.tar.gz

linux0.11源码

linux0.11源码

安装bochs

复制代码
tar zxvf bochs-2.2.1.tar.gz
cd bochs-2.2.1
./configure --enable-plugins --enable-disasm --enable-gdb-stub
make

ERROR1

.../bochs.h: In member function 'char* iofunctions::getaction(int)':

.../bochs.h:342: warning: deprecated conversion from string constant to 'char*'

.../bochs.h:342: warning: deprecated conversion from string constant to 'char*'

.../bochs.h:342: warning: deprecated conversion from string constant to 'char*'

.../bochs.h:342: warning: deprecated conversion from string constant to 'char*'

In file included from iodev.h:531,

from devices.cc:30:

.../iodev/harddrv.h: At global scope:

.../iodev/harddrv.h:290: error: extra qualification 'sparse_image_t::' on member 'get_physical_offset'

.../iodev/harddrv.h:295: error: extra qualification 'sparse_image_t::' on member 'set_virtual_page'

devices.cc: In constructor 'bx_devices_c::bx_devices_c()':

devices.cc:50: warning: deprecated conversion from string constant to 'char*'

make1: *** devices.o Error 1

make1: Leaving directory `/root/package/bochs-2.2.1/iodev'
解决

注释掉继续make

ERROR2

g++ -shared -nostdlib /usr/lib/gcc/i686-redhat-linux/4.4.7/.../.../.../crti.o /usr/lib/gcc/i686-redhat-linux/4.4.7/crtbeginS.o .libs/x.o -lSM -lICE -lX11 -lXpm -L/usr/lib/gcc/i686-redhat-linux/4.4.7 -L/usr/lib/gcc/i686-redhat-linux/4.4.7/.../.../... -lstdc++ -lm -lc -lgcc_s /usr/lib/gcc/i686-redhat-linux/4.4.7/crtendS.o /usr/lib/gcc/i686-redhat-linux/4.4.7/.../.../.../crtn.o -Wl,-soname -Wl,libbx_x.so.0 -o .libs/libbx_x.so.0.0.0

/usr/bin/ld: cannot find -lXpm

collect2: ld returned 1 exit status

make1: *** libbx_x.la Error 1

make1: Leaving directory `/root/package/bochs-2.2.1/gui'
解决

yum install -y libXpm libXpm-devel

继续make

复制代码
make install

成功

试运行

复制代码
bochs -q -f bochsrc-hd.bxrc

ERROR3

复制代码
dlopen failed for module 'x': file not found

解决

复制代码
yum -y groupinstall "KDE Desktop"

至此,bochs已经可以运行linux0.11了

相关推荐
Felven5 小时前
stress-ng 与 fio 性能测试工具使用指南
linux·测试工具·fio·stress-ng
huainingning6 小时前
RJ SW Console口忘记密码处理方法
linux·运维·服务器
布裘7 小时前
【银河麒麟】桌面系统循环登录,无法进入桌面?
linux·运维·服务器
慧都小项7 小时前
程序到了Linux才出错?用CLion把调试接到目标环境
linux·运维·服务器
Ruiery9 小时前
Linux 6.6内核内存管理深度解析(一):物理内存初始化 — memblock 怎么把内存交给 buddy
linux·运维·服务器
天蓝蓝的本我9 小时前
conda日常用到的命令积累1-登录linux,安装pycharm
linux·pycharm·conda
Android系统攻城狮9 小时前
Linux Gstreamer深度解析之gst_audio_encoder_get_frame_max调用流程与实战(五十九)
linux·运维·服务器·gstreamer音视频·音视频进阶·gstreamer音视频进阶
忆挽篱笙歌10 小时前
makefil
linux·运维·服务器
菜_小_白11 小时前
codex
linux·vscode·ai
zhangrelay11 小时前
用ROS2Lyrical实验报告册思路重做蓝桥云课ROS1实验并改进
linux·笔记·学习·ubuntu·机器人