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了

相关推荐
M78佐菲8 小时前
c语言学习笔记:排序与查找方法整理
linux·c语言·笔记·学习·算法
ltl9 小时前
QUIC 协议拆解(上):为什么 TCP 改不动了
linux
Linux-lucky10 小时前
28-Linux学习之旅之Maven与Nexus制品库
linux·运维·学习·nginx·tomcat·maven
敲代码还房贷13 小时前
VMware17 + Ubuntu22.04 共享 完整步骤
linux·python·ubuntu
King of fraud13 小时前
Linux 下 MySQL 基础操作:创建用户、数据库与权限管理实战
linux·数据库·mysql
实心儿儿14 小时前
Linux —— 传输层协议TCP
linux·服务器·tcp/ip
祖力5514 小时前
Linux应用软件编程:目录IO与framebuffer
linux·运维·算法·framebuffer·目录io
词却14 小时前
Linux基础:常用基本命令与软件包管理
linux
2401_8906034015 小时前
Linux 进程控制
linux·运维·服务器
啦啦啦啦啦zzzz16 小时前
时间轮定时器
linux·服务器·网络·c++·定时器