码迷,mamicode.com
首页 > 系统相关 > 详细

ubuntu 環境下 bochs 的安裝

时间:2018-06-01 00:57:57      阅读:249      评论:0      收藏:0      [点我收藏+]

标签:src   boot   image   editable   project   nbsp   art   selected   one   

https://blog.csdn.net/liu0808/article/details/53086578(轉載)
##bochs安装步骤及模板摘自狄泰软件的Delphi Tang 老师的操作系统课件PPT##

1. bochs 安裝步驟

  1. https://sourceforge.net/projects/bochs/files/ 下載bochs tar
  2. sudo tar xvf bochs-2.x.x.tar.gz
  3. cd bochs-2.x.x
  4. ./configure --enable-debugger --enable-disasm
  5. make
  6. sudo make install
  7. 确定bochs 安装位置(which bochs) 找到romimage 和map 对应路径
    我的ubuntu 安装位置为/usr/local/bin/bochs
    romimage 位置在 /usr/local/share/bochs/BIOS-bochs-latest
    map 位置在 /usr/local/share/bochs/keymaps/x11-pc-us.map
  8. 确定vgabios 是否已经安装(whereis vgabios)并确定vgaromimage的位置
    我的vgaromimage的位置在:/usr/share/vgabios/vgabios.bin

2.狄泰的唐老师提供的bochsrc文件内容模板如下:

###############################################################
# Configuration file for Bochs (Delphi Tang provided)
###############################################################
# 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/share/vgabios/vgabios.bin
# what disk images will be used
floppya: 1_44=a.img, status=inserted
# choose the boot disk.
boot: floppy
# where do we send log messages?
# log: bochsout.txt
# disable the mouse
mouse: enabled=0
# enable key mapping, using US layout as default.
keyboard_mapping: enabled=1, map=/usr/local/share/bochs/keymaps/x11-pc-us.map

3. configure /make 時會出現的問題 (轉載)

结果出错,解决的办法是:

  1. 问题1:
    checking for C compiler default output file name… configure: error: C compiler cannot create executables
    解决办法:
    [thornbird@thornbird bochs-2.4]$ sudo apt-get install libc6-dev

  2. 问题2:
    checking how to run the C++ preprocessor... /lib/cpp
    configure: error: C++ preprocessor "/lib/cpp" fails sanity check
    See `config.log‘ for more details.
    解决方法:
    [thornbird@thornbird bochs-2.4]$ sudo apt-get install build-essential

  3. 问题3: **找不到makefile(問題5 也會引發這個問題)**
    [thornbird@thornbird bochs-2.4]$ make
    make: * 没有指明目标并且找不到 makefile.停止。
    解决方法:
    [thornbird@thornbird bochs-2.4]$ sudo apt-get install build-essential

  4. 问题4:
    checking for wxWidgets library version...
    checking for default gui on this platform... x11
    ERROR: X windows gui was selected, but X windows libraries were not found.
    解决方法: 配置的时候加上"--with-nogui "
    或者改成:[thornbird@thornbird bochs-2.4]$sudo apt-get install xorg-dev (建议)

  5. 问题5:**找不到gtk**
    ./configure 時會出現這個問題說找不到gtk
    Package gtk+-2.0 was not found in the pkg-config search path.Perhaps you should add the directory containing `gtk+-2.0.pc‘to the PKG_CONFIG_PATH environment variableNo package ‘gtk+-2.0‘ foundERROR: pkg-config was not found, or unable to access the gtk+-2.0 package.Install pkg-config and the gtk+ development package,or disable the gui debugger, or the wxWidgets display library (whichever is being used).
    解决方法:
    [thornbird@thornbird bochs-2.4]$sudo apt-get install libgtk2.0-dev

  6. 问题6:**无法获取"./bochsdbg" 的文件状态(stat)**
    install: 无法获取"./bochsdbg" 的文件状态(stat): 没有该文件或目录
    解决办法:需要在make后,将bochs拷贝一份,命名为bochsdbg

<wiz_tmp_tag id="wiz-table-range-border" contenteditable="false" style="display: none;">

附件列表

 

ubuntu 環境下 bochs 的安裝

标签:src   boot   image   editable   project   nbsp   art   selected   one   

原文地址:https://www.cnblogs.com/Seven-Deadly-Sins/p/0af40faae776cd570b57aea4ac0901e0.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!