您的位置:首页 > 运维架构 > Linux

Ubuntu10.04搭建linux-0.11编译环境(1.bochs安装和使用)

2012-02-21 16:34 1136 查看
oldlinux发布的bochs配置文件与Ubuntu10.04上的bochs版本不匹配,造成配置文件解析的一系列问题,本文解决此类问题.

1. 安装bochs


sudo apt-get install bochs vgabios bochs-x bochsbios bochs-doc bochs-sdl

如有问题,找到合适源即可.

2. 获取可启动的linux-0.11 系统

1. 下载压缩包

http://oldlinux.org/Linux.old/bochs/linux-0.11-devel-060625.zip

2. 解压

unzip linux-0.11-devel-060625.zip

3. 进入

cd linux-0.11-devel-060625

3. 测试下载过来的镜像

在linux-0.11-devel-060625目录下

执行 bochs -f bochsrc-hd.bxrc

----- 发生错误以及解决办法 -----

(1) >>PANIC<< bochsrc-hd.bxrc:37: vgaromimage directive malformed.

A. 注释掉相应行

B. 改成:vgaromimage: file=/usr/share/bochs/VGABIOS-lgpl-latest

(2) >>PANIC<< bochsrc-hd.bxrc:284: directive 'floppy_command_delay' not understood

A. 注释掉相应行

(3) bochsrc-hd.bxrc:194: unknown parameter for parport1 ignored.

A. 注释掉

B. 改成:parport1: enabled=1, file="parport.out"

(4) >>PANIC<< bochsrc-hd.bxrc:307: directive 'ips' not understood

A. 注释掉

B. 改成:cpu: count=1, ips=1000000

(5) dlopen failed for module 'x': file not found

A. 配置文件顶部增加:

config_interface: textconfig
display_library: sdl

(来源于bochs默认配置文件 /etc/bochs-init/bochsrc)

(6) ROM: System BIOS must end at 0xfffff

A. romimage: file=$BXSHARE/BIOS-bochs-latest, address=0xf0000 改成 romimage: file=/usr/share/bochs/BIOS-bochs-latest

(7) 其他问题参考

/article/5010804.html

-----------------------------------------------------------------------------

重新执行 bochs -f bochsrc-hd.bxrc 即可.

注意:实际上,如果是以学习为目的的话,至此已经可以在现有的环境下学习linux-0.11的源码了,上边下载的镜像中,包含了linux-0.11源码,可以直接编译.

编译后,只需要把Image镜像写入到启动盘即可.

写入启动盘的方法是:(假设fd0是启动软盘)

dd if=Image of=/dev/fd0

(本文完)
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: