安裝bochs並配置linux0.11

1、安裝bochs

在bochs.sourceforge.net下載bochs源代碼包並解壓縮html

./configure --enable-debugger --enable-disasmlinux

出現錯誤一:ios

ERROR: pkg-config was not found, or unable to access the gtk+-2.0 package.shell

Install pkg-config and the gtk+ development package,ubuntu

or disable the gui debugger, or the wxWidgets display library (whichever is being used).windows

解決方法:ui

安裝 libgtk2.0-devspa

$ sudo apg-get install libgtk2.0-dev .net

 出現錯誤二:debug

ERROR: X windows gui was selected, but X windows libraries were not found.

解決方法:

安裝 xorg-dev


make

出現錯誤一:找不到 gtk/gtk.h

解決方法:

使用pkg-config --cflags gtk+-2.0單獨編譯該文件吧。

好比:gcc/g++ `pkg-config --cflags gtk+-2.0` -c source.c -o source.o



sudo make install

注:在Debian環境下執行make時出現瞭如下錯誤:error: undefined reference to 'pthread_create',是由於鏈接器選項中沒有連接libpthread庫,須要手動修改Nakefile文件,在LIBS中加入-lpthread選項。

2、配置linux0.11內核

能夠從網上下載,需下載兩個,一個用於啓動,一個爲文件系統(真正的linux內核)

http://www.oldlinux.org/Linux.old/images/bootimage-0.11-20040305

http://www.oldlinux.org/Linux.old/images/rootimage-0.11-20040305

3、配置bochs啓動文件

#文件名隨便,本例設爲bochsrc

megs: 32

romimage: file=/home/burdock/opt/bochs/bios/BIOS-bochs-latest

vgaromimage: file=/home/burdock/opt/bochs/bios/VGABIOS-lgpl-latest

vga: extension=vbe

floppya: 1_44=/home/burdock/opt/linux0.11/bootimage-0.11-20040305,status=inserted  #注意路徑必定要寫全

floppyb: 1_44=/home/burdock/opt/linux0.11/rootimage-0.11-20040305,status=inserted  #注意路徑必定要寫全

boot: a

log: bochsout.txt

mouse: enabled=0

vga_update_interval: 150000

i440fxsupport: enabled=1

4、啓動bochs進入linux 0.11

bochs   -q   -f   bochsrc配置文件的位置

若啓動後虛擬機黑屏無反應,說明進入了調試模式,在shell中輸入c並回車

若啓動後虛擬機提示趙不到啓動設備floppy錯誤,則應該是bochsrc配置錯誤,此時注意bootimage必定寫上絕對路徑

若啓動後提示插入floppy,則進入調試模式後有13個選項,選擇1,輸入rootimage了絕對路徑並回車,輸入13並回車。。。OK!!!

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

本位基於ubuntu,bochs-20120521.tar.gz 有疑問留言後在下方評論解決


能夠參考這篇:http://wangcong.org/articles/bochs.html

IBM的這一篇也很詳細:http://www.ibm.com/developerworks/cn/linux/l-bochs/

相關文章
相關標籤/搜索