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*'

make[1]: *** [devices.o] Error 1

make[1]: 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

make[1]: *** [libbx_x.la] Error 1

make[1]: 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了

相关推荐
麟城Lincoln37 分钟前
【RHCSA-Linux考试题目笔记(自用)】servera的题目
linux·笔记·考试·rhcsa
寻月隐君1 小时前
保姆级教程:Zsh + Oh My Zsh 终极配置,让你的 Ubuntu 终端效率倍增
linux·后端·命令行
XM-54581 小时前
2025微信小程序wxapkg解包全攻略
linux·运维·小程序
朗晴2 小时前
文本编辑器VIM的使用方法!
linux·运维·服务器
2401_826097629 小时前
JavaEE-Linux环境部署
java·linux·java-ee
(:满天星:)11 小时前
第31篇:块设备与字符设备管理深度解析(基于OpenEuler 24.03)
linux·运维·服务器·网络·centos
爱莉希雅&&&11 小时前
shell编程之awk命令详解
linux·服务器·git
笑稀了的野生俊11 小时前
在服务器中下载 HuggingFace 模型:终极指南
linux·服务器·python·bash·gpu算力
渡我白衣11 小时前
Linux操作系统之文件(四):文件系统(上)
linux
ZZH1120KQ11 小时前
Linux系统安全及应用
linux·运维·系统安全