Ubuntu編譯運行 Linux-0.00

http://oldlinux.org/Linux.old/bochs/ 下載 Linux0.00 源碼 linux-0.00-050613.zip, 並解壓:

解壓 linux-0.00-rh9.tar.gz:

得到這三個文件:

修改 head.s,在最開始添加 .code32,否則會出現“Error: invalid instruction suffix for...”等錯誤:

修改 Makefile,在head.o:下面一行添加 as --32 -o head.o head.s(注意前面要使用TAB,不能用空格),否則會出現“ld: i386:x86-64 architecture of input file `head.o' is incompatible with i386 output”錯誤:

使用make編譯,生成Image文件:

新建linux-0.00.bxrc文件,內容如下:

romimage: file=/usr/share/bochs/BIOS-bochs-latest
megs: 16
vgaromimage: file=/usr/share/vgabios/vgabios.bin
floppya: 1_44="Image", status=inserted
boot: a
log: bochsout.txt
vga_update_interval: 300000
keyboard_serial_delay: 200
keyboard_paste_delay: 100000
mouse: enabled=0
private_colormap: enabled=0
fullscreen: enabled=0
screenmode: name="sample"

保存後,使用bochs運行:

bochs -f linux-0.00.bxrc

bochs 安裝見 https://www.cnblogs.com/raina/p/13212177.html

出現黑屏後,輸入c並回車繼續:

運行結果如圖:

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章