歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> Ubuntu 11.10 x64編譯安裝Bochs 2.5.1

Ubuntu 11.10 x64編譯安裝Bochs 2.5.1

日期:2017/2/28 15:59:40   编辑:Linux教程

眾所周知Apt-get安裝的bochs是不帶調試功能的,必須通過源碼編譯加上--enable-debugger才行。

現在Ubuntu源上的bochs版本是2.4.6,但是bochs網站已經發布了2.5.1,因此我們直接編譯安裝bochs2.5.1。

  1. 編譯源碼
    1. http://bochs.sourceforge.net/ 下載最新的源碼並解壓
    2. ./configure --with-x11 --with-wx --enable-debugger --enable-disasm --enable-all-optimizations --enable-readline --enable-long-phy-address --enable-debugger-gui
      1. 如果是64位系統上編譯bochs,一定要加上--enable-long-phy-address選項,否則運行中會出現bochs exception(): 3rd (13) exception with no resolution, shutdown status is
    1. make
    1. $cp bochs bochsdbg,編譯沒有產生bochsdbg,所以這裡手動拷貝一份
    2. sudo make install
  1. 編譯bochs源碼報錯的處理
    1. checking for C compiler default output file name… configure: error: C compiler cannot create executables
      sudo apt-get install build-essential libc6-dev
    1. ERROR: X windows gui was selected, but X windows libraries were not found.
      sudo apt-get install xorg-dev libgtk2.0-dev
    1. install: cannot stat `./bios/VGABIOS*':
      在源碼的bios目錄下(/xxxx/bochs-2.5.1/bios),建立符號鏈接ln -s /usr/share/vgabios/vgabios.bin VGABIOS-lgpl-latest
    1. undefined reference to 'XStringToKeysym'
      configure時加上--with-x11,--with-x11 --with-wx --enable-debugger --enable-disasm --enable-all-optimizations --enable-readline --enable-long-phy-address --enable-debugger-gui
    1. 如果configure時,提示--with-wx有問題,sudo apt-get install libwxgtk2.8-dev libx11-xcb-dev
  1. 源碼make install以後,再通過sudo apt-get install bochs安裝普通bochs
  1. 普通安裝的bochs在/usr/bin/bochs,而源碼安裝的在/usr/local/bin/bochs,/usr/local/bin在PATH中的優先級比/usr/bin高,因此每次執行bochs實際執行的是源碼安裝的那個,我們可以把/usr/local/bin/bochs重命名。
    這樣保證我們執行bochs時是普通安裝的,執行bochsdbg是源碼安裝的。
  1. 源碼安裝使用中遇到的問題
    1. (.:7444): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",
      1. sudo apt-get install gtk2-engines-pixbuf 解決
    1. 使用過程中死機(-_-!)
      1. config_interface和display_library注釋掉
      2. 或者config_interface = textconfig,display_library=x, options="gui_debug" ,總之別用wx
  1. bochs2.5.1配置文件的樣本是源碼目錄下的.bochsrc
Copyright © Linux教程網 All Rights Reserved