從 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
出現黑屏後,輸入c
並回車繼續:
運行結果如圖: