Ubuntu10.04搭建linux-0.11編譯環境(1.bochs安裝和使用)

來源:互聯網
上載者:User

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) 其他問題參考

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

(本文完)

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.