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

时间:2022-10-31 12:00:03
http://www.cnblogs.com/linucos/archive/2012/02/21/2361550.html

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) 其他问题参考

http://www.cnblogs.com/soli/archive/2009/09/21/1571466.html

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

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

 

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

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

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

dd if=Image of=/dev/fd0

(本文完)


<script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"16"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>
阅读(2337) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~
评论热议