网上的安装的博客总是有问题
操作系统的环境: Centos7bochs: bochs-2.6.9
sudo su 获得root权限.
提前安装的软件有:
1 sudo yum install gtk2 gtk2-devel2 sudo yum install libXt libXt-devel3 sudo yum install libXpm libXpm-devel4 sudo yum install glibc-headers5 sudo yum install gcc-c++
从 https://sourceforge.net/projects/bochs/files/ 上下载bochs-2.6.9.tar.gz
解压.tar.gz文件.
cd bochs-2.6.9/
在命令行中输入:
./configure --with-x11 --with-wx --enable-debugger --enable-disasm --enable-all-optimizations --enable-readline --enable-long-phy-address --enable-ltdl-install --enable-idle-hack --enable-plugins --enable-a20-pin --enable-x86-64 --enable-smp --enable-cpu-level=6 --enable-large-ramfile --enable-repeat-speedups --enable-fast-function-calls --enable-handlers-chaining --enable-trace-linking --enable-configurable-msrs --enable-show-ips --enable-cpp --enable-debugger-gui --enable-iodebug --enable-logging --enable-assert-checks --enable-fpu --enable-vmx=2 --enable-svm --enable-3dnow --enable-alignment-check --enable-monitor-mwait --enable-avx --enable-evex --enable-x86-debugger --enable-pci --enable-usb --enable-voodoo
vi .bochsrc
将书本提供的bochsrc的内容替换.bochsrc的内容
# configuration file generated by Bochsplugin_ctrl: unmapped=1, biosdev=1, speaker=1, extfpuirq=1, parallel=1, serial=1, iodebug=1config_interface: textconfigdisplay_library: x#memory: host=2048, guest=2048romimage: file="/usr/local/share/bochs/BIOS-bochs-latest"vgaromimage: file="/usr/local/share/bochs/VGABIOS-lgpl-latest"boot: floppyfloppy_bootsig_check: disabled=0floppya: type=1_44, 1_44="boot.img", status=inserted, write_protected=0# no floppybata0: enabled=1, ioaddr1=0x1f0, ioaddr2=0x3f0, irq=14ata0-master: type=noneata0-slave: type=noneata1: enabled=1, ioaddr1=0x170, ioaddr2=0x370, irq=15ata1-master: type=noneata1-slave: type=noneata2: enabled=0ata3: enabled=0pci: enabled=1, chipset=i440fxvga: extension=vbe, update_freq=5cpu: count=1:1:1, ips=4000000, quantum=16, model=corei7_haswell_4770, reset_on_triple_fault=1, cpuid_limit_winnt=0, ignore_bad_msrs=1, mwait_is_nop=0, msrs="msrs.def"cpuid: x86_64=1,level=6, mmx=1, sep=1, simd=avx512, aes=1, movbe=1, xsave=1,apic=x2apic,sha=1,movbe=1,adx=1,xsaveopt=1,avx_f16c=1,avx_fma=1,bmi=bmi2,1g_pages=1,pcid=1,fsgsbase=1,smep=1,smap=1,mwait=1,vmx=1cpuid: family=6, model=0x1a, stepping=5, vendor_string="GenuineIntel", brand_string="Intel(R) Core(TM) i7-4770 CPU (Haswell)"print_timestamps: enabled=0debugger_log: -magic_break: enabled=0port_e9_hack: enabled=0private_colormap: enabled=0clock: sync=none, time0=local, rtc_sync=0# no cmosimage# no loaderlog: -logprefix: %t%e%ddebug: action=ignoreinfo: action=reporterror: action=reportpanic: action=askkeyboard: type=mf, serial_delay=250, paste_delay=100000, user_shortcut=nonemouse: type=ps2, enabled=0, toggle=ctrl+mbuttonspeaker: enabled=1, mode=systemparport1: enabled=1, file=noneparport2: enabled=0com1: enabled=1, mode=nullcom2: enabled=0com3: enabled=0com4: enabled=0megs: 2048
程序有些错误, 执行一下的命令, 防止后续出现错误.
cp misc/bximage.cpp misc/bximage.cccp iodev/hdimage/hdimage.cpp iodev/hdimage/hdimage.cccp iodev/hdimage/vmware3.cpp iodev/hdimage/vmware3.cccp iodev/hdimage/vmware4.cpp iodev/hdimage/vmware4.cccp iodev/hdimage/vpc-img.cpp iodev/hdimage/vpc-img.cccp iodev/hdimage/vbox.cpp iodev/hdimage/vbox.cc
开始安装:
make
make install
成功完成安装
最后:
使用./bximage 或 ./bochs
运行程序.直接在命令行中输入bximage或者是bochs是无法执行的.
其他博客中提到的运行bximage的方法, 试过都有问题, 可能是他使用的操作系统是Ubuntu的原因.