- 论坛徽章:
- 0
|
本帖最后由 1100379091 于 2016-01-02 12:37 编辑
我的操作系统是centos6.4,安装了Bochs,Nasm
在实践《Orange's 一个操作系统实现》第一个例子时
创建了虚拟的软盘Hello.img
并编译了boot.bin并导入了Hello.img
输入bochs -f bochsrc
选择【6】
结果程序执行到
[BIOS ] Booting from 0000:7C00
后就死在那边,不在执行下去了。。。
具体输出如下:
00000000000i[ ] installing nogui module as the Bochs GUI
00000000000i[ ] Bochs x86 Emulator 2.3.5
00000000000i[ ] Build from CVS snapshot, on September 16, 2007
00000000000i[ ] System configuration
00000000000i[ ] processors: 1 (cores=1, HT threads=1)
00000000000i[ ] A20 line support: yes
00000000000i[ ] APIC support: no
00000000000i[ ] CPU configuration
00000000000i[ ] level: 5
00000000000i[ ] TLB enabled: yes
00000000000i[ ] SMP support: no
00000000000i[ ] FPU support: yes
00000000000i[ ] MMX support: yes
00000000000i[ ] SSE support: no
00000000000i[ ] CLFLUSH support: no
00000000000i[ ] v8086 mode support: yes
00000000000i[ ] VME support: yes
00000000000i[ ] 3dnow! support: no
00000000000i[ ] PAE support: no
00000000000i[ ] PGE support: no
00000000000i[ ] PSE support: yes
00000000000i[ ] x86-64 support: no
00000000000i[ ] SEP support: no
00000000000i[ ] Optimization configuration
00000000000i[ ] Guest2HostTLB support: no
00000000000i[ ] RepeatSpeedups support: no
00000000000i[ ] Icache support: no
00000000000i[ ] Host Asm support: yes
00000000000i[ ] Fast function calls: no
00000000000i[ ] Devices configuration
00000000000i[ ] NE2000 support: no
00000000000i[ ] PCI support: no
00000000000i[ ] SB16 support: no
00000000000i[ ] USB support: no
00000000000i[ ] VGA extension support: vbe
00000000000i[MEM0 ] allocated memory at 0xb54d3008. after alignment, vector=0xb54d4000
00000000000i[MEM0 ] 32.00MB
00000000000i[MEM0 ] rom at 0xfffe0000/131072 ('/usr/local/share/bochs/BIOS-bochs-latest')
00000000000i[MEM0 ] rom at 0xc0000/38400 ('/usr/local/share/bochs/VGABIOS-lgpl-latest')
00000000000i[CMOS ] Using local time for initial clock
00000000000i[CMOS ] Setting initial clock to: Sat Oct 3 00:02:48 2015 (time0=144380176
00000000000i[DMA ] channel 4 used by cascade
00000000000i[DMA ] channel 2 used by Floppy Drive
00000000000i[FDD ] tried to open 'hello.img' read/write: Permission denied
00000000000i[FDD ] fd0: 'hello.img' ro=1, h=2,t=80,spt=18
00000000000i[MEM0 ] Register memory access handlers: 000a0000-000bffff
00000000000i[VGA ] interval=40000
00000000000i[MEM0 ] Register memory access handlers: e0000000-e07fffff
00000000000i[VGA ] VBE Bochs Display Extension Enabled
00000000000i[ ] init_mem of 'harddrv' plugin device by virtual method
00000000000i[ ] init_mem of 'keyboard' plugin device by virtual method
00000000000i[ ] init_mem of 'serial' plugin device by virtual method
00000000000i[ ] init_mem of 'parallel' plugin device by virtual method
00000000000i[ ] init_mem of 'extfpuirq' plugin device by virtual method
00000000000i[ ] init_mem of 'speaker' plugin device by virtual method
00000000000i[ ] init_dev of 'harddrv' plugin device by virtual method
00000000000i[HD ] Using boot sequence floppy, none, none
00000000000i[HD ] Floppy boot signature check is enabled
00000000000i[ ] init_dev of 'keyboard' plugin device by virtual method
00000000000i[KBD ] will paste characters every 1000 keyboard ticks
00000000000i[ ] init_dev of 'serial' plugin device by virtual method
00000000000i[SER ] com1 at 0x03f8 irq 4
00000000000i[ ] init_dev of 'parallel' plugin device by virtual method
00000000000i[PAR ] parallel port 1 at 0x0378 irq 7
00000000000i[ ] init_dev of 'extfpuirq' plugin device by virtual method
00000000000i[ ] init_dev of 'speaker' plugin device by virtual method
00000000000i[SPEAK] Failed to open /dev/console: Permission denied
00000000000i[SPEAK] Deactivating beep on console
00000000000i[ ] register state of 'harddrv' plugin device by virtual method
00000000000i[ ] register state of 'keyboard' plugin device by virtual method
00000000000i[ ] register state of 'serial' plugin device by virtual method
00000000000i[ ] register state of 'parallel' plugin device by virtual method
00000000000i[ ] register state of 'extfpuirq' plugin device by virtual method
00000000000i[ ] register state of 'speaker' plugin device by virtual method
00000000000i[SYS ] bx_pc_system_c::Reset(HARDWARE) called
00000000000i[ ] reset of 'harddrv' plugin device by virtual method
00000000000i[ ] reset of 'keyboard' plugin device by virtual method
00000000000i[ ] reset of 'serial' plugin device by virtual method
00000000000i[ ] reset of 'parallel' plugin device by virtual method
00000000000i[ ] reset of 'extfpuirq' plugin device by virtual method
00000000000i[ ] reset of 'speaker' plugin device by virtual method
00000003442i[BIOS ] $Revision: 1.183 $ $Date: 2007/09/10 20:00:29 $
00000317569i[KBD ] reset-disable command received
00000336179i[BIOS ] Starting rombios32
00000337002i[BIOS ] ram_size=0x02000000
00000337611i[BIOS ] Found 1 cpu(s)
00000624884i[VBIOS] VGABios $Id: vgabios.c,v 1.66 2006/07/10 07:47:51 vruppert Exp $
00000624955i[VGA ] VBE known Display Interface b0c0
00000624987i[VGA ] VBE known Display Interface b0c4
00000627912i[VBIOS] VBE Bios $Id: vbe.c,v 1.58 2006/08/19 09:39:43 vruppert Exp $
00001072160i[BIOS ] Booting from 0000:7C00
(程序死在这里,没有后续输出)
配置如下
###############################################################
# Configuration file for Bochs
###############################################################
# how much memory the emulated machine will have
megs: 32
# filename of ROM images
romimage: file=/usr/local/share/bochs/BIOS-bochs-latest
vgaromimage: file=/usr/local/share/bochs/VGABIOS-lgpl-latest
(没有找到vgabios.bin,网上查到用VGABIOS-lgpl-latest替代,不知道是否这个原因引起)
# what disk images will be used
floppya: 1_44=hello.img, status=inserted
# choose the boot disk.
boot: floppy
# where do we send log messages?
log: bochsout.log
# disable the mouse
mouse: enabled=0
# enable key mapping, using US layout as default.
keyboard_mapping: enabled=1, map=/usr/share/bochs/keymaps/x11-pc-us.map
求助一下,是什么问题导致的,如何解决? |
|