我安装的2.6.8 版本
注意运行教程中的代码会出现无法引导的问题,得创建 test.asm 文件然后用 nasm进行编译,写 a.img 中。重新启动
dlopen failed for module ‘usb_uhci’ (libbx_usb_uhci.so): file not found
- 在config 中去除 ----enable-usb 找不到解决办法,干脆不用了
Unknown x11 option ‘gui_debug’
没有图形化调试窗口,干脆直接不用图形化
在 .bochsrc 中删除 options=“gui_debug”
总之,以能跑起来为原则
当输入dump_cpu时,显示“syntax error at ‘dump_cpu’”
这是因为bochs 2.3.5 以上的版本没有dump_cpu了,可以用r,fp,mmx,sse,dreg,sreg,creg命令代替。
dw %2 &0FFFFh 是什么意思?
这个是nasm的宏参数,%2是宏接受的第二个参数,位与上ffff就是只保留%2的低16位
这里贴一下我可以顺利跑起来的配置
plugin_ctrl: unmapped=1, biosdev=1, speaker=1, extfpuirq=1, parallel=1, serial=1, iodebug=1
config_interface: textconfig
#使用GUI调试
display_library: x
cpu: model=core2_penryn_t9600, count=1, ips=50000000, reset_on_triple_fault=1, ignore_bad_msrs=1, msrs="msrs.def"
cpu: cpuid_limit_winnt=0
cpuid: x86_64=1, mmx=1, sep=1, simd=sse4_2, apic=xapic, aes=1, movbe=1, xsave=1
cpuid: family=6, model=0x1a, stepping=5
romimage: file=$BXSHARE/BIOS-bochs-latest
vgaromimage: file=$BXSHARE/VGABIOS-lgpl-latest
vga: extension=vbe, update_freq=5
keyboard: type=mf, serial_delay=250, paste_delay=100000, user_shortcut=none
mouse: type=ps2, enabled=0, toggle=ctrl+mbutton
pci: enabled=1, chipset=i440fx
clock: sync=none, time0=local, rtc_sync=0
private_colormap: enabled=0
#软盘启动的配置,a.img为软盘名
floppya: type=1_44, 1_44=a.img, status=inserted, write_protected=0
# 硬盘启动配置,a.img为硬盘名,根据硬盘大小不同需改变后三个参数的值
#ata0-master: type=disk, mode=flat, path=a.img, cylinders=130, heads=16, spt=63
#ata0-slave: type=none
#ata0-master: type=none
#ata1-slave: type=none
# 软盘启动/硬盘启动
boot: floppy
# boot: disk
floppy_bootsig_check: disabled=0
log: -
logprefix: %t%e%d
panic: action=ask
error: action=report
info: action=report
debug: action=ignore
debugger_log: -
com1: enabled=1, mode=null
com2: enabled=0
com3: enabled=0
com4: enabled=0
parport1: enabled=1, file=none
parport2: enabled=0
speaker: enabled=1, mode=system
magic_break: enabled=0
print_timestamps: enabled=0
port_e9_hack: enabled=0
megs: 2048