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了

相关推荐
码农君莫笑1 小时前
linux运行程序和批处理详解
linux·命令窗口
网安CILLE1 小时前
2025年——【寒假】自学黑客计划(网络安全)
linux·网络·python·安全·web安全·网络安全·ddos
Juttt2 小时前
【Linux】进程状态
linux·运维·服务器
WG_172 小时前
Linux:Makefile 以及实现第一个程序:进度条
linux·运维·服务器
码农君莫笑2 小时前
linux 文件权限设置详解
linux·运维·服务器
索然无味io2 小时前
应急响应之入侵排查(下)
linux·windows·笔记·学习·网络安全·安全威胁分析
流星白龙4 小时前
【Linux】9.Linux第一个小程序进度条
linux·运维·小程序
qq_243050794 小时前
Thc-Ipv6攻击工具包 全参数详细解析!Kali Linux入门教程!黑客渗透测试!
linux·运维·网络·安全·web安全·网络安全·系统安全
lida20035 小时前
Open FPV VTX开源之ardupilot配置
linux·开源·openipc·msposd
lida20035 小时前
Open FPV VTX开源之betaflight配置
linux·开源·betaflight·openipc·msposd