仮想マシンの2.6.9バージョンとBochsのを解決するプロセスをインストールするときに、私の問題について

更新:2019年7月2日

実験環境を構築するために、「64ビットオペレーティングシステムの設計と実装」プロセスを読んで多くの困難に遭遇しました。

私のテスト環境:このオペレーティングシステムのパートナーにはほとんど関心がある場合には、作られた実験的なカリ - liunx仮想マシンをインストールするには、インストールされている次vmware15.0

kailオペレーティングシステムイメージ:

リンクします。https://pan.baidu.com/s/1jkYI2RQ_lcgCPaENMQwEYg
抽出コード:94s9


===================== ======================テキスト

1、インストールBochsの

Bochsののさまざまなバージョンをダウンロードしてください:ポータル0             Bochsのユーザーマニュアル:ポータル1つの               configureオプションの意味:ポータル2

kail Linuxオペレーティングシステムでは、私たちはコンパイルするソースコードをダウンロードする必要がデバッグ機能を実現するために、Bochsの-2.6.9.tar.gzを選びました。

それとも、2000年3月、Bochsのソースコードのいずれかのバージョン以降取得するためにSVNのチェックアウトコマンドを使用することができます。コマンドは次のとおりです。

SVNの共同http://svn.code.sf.net/p/bochs/code/tags/tagname/bochs Bochsの

コーデックのダウンロード:

Bochsの-2.6.8.tar.gz -xvfタール

comfigureラインは、Enterキーを押しますファイルを含むディレクトリでコマンドを開きます。

./configure --with-X11 --with-WX --enable-プラグイン--enable-デバッガ--enable-デバッガGUI --enable-readlineの--enable-DISASM --enable-XPM --enable-ショー--enable-アイドルハック--enable-CPUレベル= 6 --enable-FPU --enable-x86-64で--enable-VMX = 2 --enableロギング--enableアサートチェックを-ips  - -enable-SVM --enable-AVX --enable-x86のデバッガ--enableアライメント・チェック--enable-構成-MSRS --enable長-PHYアドレス--enable-A20ピン--enable-大ramfile --enable-繰り返し-スピードアップ--enable-高速機能の呼び出し--enable-ハンドラチェイン--enable-すべての最適化--enable-PCI --enable-iodebug --enable-USB 

次の表は、私はいくつかのパラメータを変更した文書によると、関連するパラメータの特定の意味を説明します:

去除掉了: - 有効-CPP --enable-SMP --enable-た3DNow --enable-モニタMWAIT --enable-ブードゥー教は--enable-ltdlインストール--enable-evexを--enable-トレースリンク 

            表3-7。(オプション)ディスプレイライブラリーを選択するためのオプションを設定します

オプション 注釈
--with-X11 X Windowsユーザーインターフェイスを使用してください。多くのオペレーティングシステムでは、Bochsのは、デフォルトではXウィンドウを使用します。
--with-win32の ネイティブのWin32 GUIを使用してください。これは、Win32プラットフォームでのデフォルトです。
--with-炭素 カーボンGUIでのMacOS X用にコンパイルします。正しいのMacOS Xは、コンパイルオプションのための.conf.macosxファイルを参照してください。警告:このBochsの機能はまだ維持されていないと失敗することがあります。
--with-AmigaOSの AmigaのMorphOSのためにコンパイルします。このコードは、ニコライBenalalによって書かれています。
--with-RFB AT&Tのと話をするRFBプロトコルのサポートを有効に  VNCビューア参照してください  セクション3.4.9  詳細については。
--with-vncsrv LibVNCServerライブラリを使用して、拡張RFB(VNC)GUIのサポートを有効にします。参照してください  セクション3.4.10  詳細については。
--with-SDL SDL 1.2.xののGUIインターフェイスのサポートを有効にします。参照  セクション3.4.11を
--with-SDL2 SDL 2.xのGUIインターフェイスのサポートを有効にします。参照  セクション3.4.12を
--with-用語 cursesライブラリとGUIテキストのみ使用してください。ほぼ確実にデバッガやtextconfigインタフェースで正しく動作しません。
--with-のMacOS マッキントッシュ/ CodeWarriorの環境を使用してください。これは、あなたが本当のコンパイル環境への上に構成されたコードを転送することができるように、configure実行をサポートするプラットフォーム上で設定し実行するためです。警告:このBochsの機能はまだ維持されていないと失敗することがあります。
--with-WX wxWidgetsの構成とディスプレイインターフェイスのサポートを有効にします。参照  セクション3.4.13を
--with-SVGA Use SVGALIB library for Linux. This allows a full-screen text and graphics display without X windows. The SVGALIB port was written by Igor Popik. WARNING: This Bochs feature is not maintained yet and may fail.
--with-nogui No native GUI; just use blank stubs. This is if you don't care about having video output, but are just running tests.
--with-all-libs Automatically detect which libraries are installed on your system and enable them. This option is still experimental; it might enable libraries that are not usable and cause the compile to fail. If you have trouble, just list the --with-* options for the specific display libraries that you want.

            Table 3-8. Configure Options (General)

Option Default Comments
--enable-plugins no Plugins are shared libraries that can be loaded on demand. Example: the serial device is implemented as a plugin. In Unix, the serial plugin is called libbx_serial.so. When Bochs reads its configuration file, if the serial device is enabled it loads libbx_serial.so. See the Features section for supported platforms.
--enable-debugger no Compile in support for Bochs internal command-line debugger. This has nothing to do with x86 hardware debug support. It is a more powerful and non-intrusive native debugger. Enabling this will of course slow down the emulation. You only need this option if you know you need it. After you have run ./configure, you may want to edit config.h to customize the debugger further; see Section 8.14 for more information.
--enable-debugger-gui yes if debugger is on Enable support for the gui frontend of the Bochs debugger. This feature is supported on Windows hosts and on hosts with GTK2 installed.
--enable-readline detected by configure Compile the debugger with the GNU readline library, which gives command line editing and history.
--enable-gdb-stub no Enable support for the remote GDB stub. See Using Bochs and the remote GDB stub. NOTE: This feature cannot be used if the Bochs debugger is also enabled. WARNING: This Bochs feature is not maintained yet and may fail.
--enable-disasm yes Compile in support for built-in disassembler. Bochs has a built-in disassembler, which is useful if you either run the built-in debugger (--enable-debugger), or want disassembly of the current instruction when there is a panic in bochs.
--enable-docbook detected Build the docbook documentation in doc/docbook. The configure script will enable this option automatically if you have a program called docbook2html installed.
--enable-instrumentation=directory no Compile in support for instrumentation. This allows you to collect instrumentation data from bochs as it executes code. You have to create your own instrumentation library and define the instrumentation macros (hooks in bochs) to either call your library functions or not, depending upon whether you want to collect each piece of data.
--enable-xpm yes Enables the check for the XPM library. This option is only valid if the x display library is enabled (--with-x11).
--enable-show-ips yes Enables logging of measured IPS, see the ips parameter of the cpu option.
--enable-logging yes By default, Bochs generates logfile output that can be configured with bochsrc options and at runtime. Use --disable-logging to turn off this feature completely.
--enable-assert-checks yes if debugger is on BX_ASSERT event causes a panic on assertion failure if enabled (logging feature must be enabled, too).
--enable-cpp no Use .cpp as C++ suffix. Renames all the .cc files to .cpp for use with compilers which want that, like older MS C++ compilers. Don't use this option unless you know you need it.
--enable-idle-hack no Enables Roland Mainz's experimental idle code, which is intended to keep Bochs from always using 100% of CPU time. When Bochs is waiting around for an interrupt, the idle code uses a select() loop and some X11 tricks to wait until user input arrives. This is designed to keep Bochs responsive while still yielding to other processes when Bochs is idle. It only works with X11 or term GUI.

            Table 3-9. Configure Options (CPU & Memory)

Option Default Comments
--enable-cpu-level={3,4,5,6} 6 Select which CPU level to emulate. Choices are 3,4,5,6 which mean to target 386, 486, Pentium, or Pentium Pro and later emulation.
--enable-smp no Compile in support for SMP simulation. This allows you to boot Linux and maybe other OSes in SMP mode, and bochs will simulate all the different CPUs and communication between them. Do not expect this option to speed up your simulation! On the contrary, it has to spend extra time simulating the different CPUs (even if they're mostly idle) and the communication between them. Use it to try out an SMP OS if you don't have an SMP machine, or to debug SMP OS drivers. Refer to Section 8.9 for more details on SMP in Bochs.
--enable-fpu yes If you want to compile Bochs to make use of the FPU emulator written by Stanislav Shwartsman, use this option.
--enable-3dnow no 3DNow! instruction set support (incomplete)
--enable-x86-64 no Add support for x86-64 instruction set, written by Peter Tattam and Stanislav Shwartsman.
--enable-vmx no Intel Virtualization Extensions (VMX) support
--enable-svm no AMD SVM (Secure Virtual Machine) extensions emulation support
--enable-avx no AVX instructions support
--enable-x86-debugger no X86 debugger support. If the software you run in bochs needs to use the x86 hardware debugging facilities such as DR0..DR7, instruction and data breakpoints etc., then you should use this option. Otherwise don't use it, as it will slow down the emulation.
--enable-monitor-mwait no MONITOR/MWAIT instructions support (still experimental)
--enable-alignment-check yes if cpu level >= 4 support for alignment check in the CPU and #AC exception
--enable-configurable-msrs no support for user configurations of emulated MSR registers (see example in msrs.def)
--enable-long-phy-address no support for guest physical address larger than 32 bit
--enable-a20-pin yes support for the A20 pin
--enable-large-ramfile yes support for guest memory larger than the host supports
--enable-repeat-speedups no enable support repeated I/O and memory copy speedups
--enable-fast-function-calls no enable support for fast function calls (gcc on x86 only)
--enable-handlers-chaining no enable support for handlers chaining optimization
--enable-all-optimizations no Turn on the enables for all speed optimizations that the developers believe are safe to use: --enable-repeat-speedups, --enable-fast-function-calls, --enable-handlers-chaining.

            Table 3-10. Configure Options (Devices)

Option Default Comments
--enable-cdrom yes Enable use of a real CDROM/DVD drive. The cdrom emulation and the portable ISO image file support are always present. You can use this option to compile in support for accessing the media in your workstation's cdrom drive. The supported platforms are Linux, Solaris, FreeBSD, OpenBSD, MacOS X and Windows. For other platforms, a small amount of code specific to your platform must be written.
--enable-sb16 no Enable Sound Blaster emulation. The available lowlevel sound interfaces are autodetected. See section Using Sound for supported platforms and more info. This option also enables the standard PC gameport which is a part of the SB16. If you don't want to use it, you might use --disable-gameport.
--enable-es1370 no Enable ES1370 sound emulation. Just like the SB16 option, the available lowlevel sound interfaces are autodetected and the gameport is turned on.
--enable-gameport no Enables the standard PC gameport. This option is only necessary if you want to have a gameport, but no SB16 or ES1370 (see above). The connection to a real joystick is currently supported on Linux and win32 only.
--enable-ne2000 no Enable NE2000 network card support. This requires a low-level component to be written for each OS (supported on FreeBSD, OpenBSD, Linux, and Windows 9x/NT/2K/XP). When enabled and configured, the NE2000 device model can talk to any computer on the network EXCEPT FOR the local host. Exception: Under most circumstances, Bochs can talk to the local host on Windows, and in the ethertap interface for Linux.
--enable-pnic no Enable PCI pseudo NIC (network card) support.
--enable-e1000 no Enable Intel(R) 82540EM Gigabit Ethernet adapter support.
--enable-clgd54xx no Enable Cirrus Logic GD54xx (CL-GD5430 ISA or CL-GD5446 PCI) video card support. For more information see Section 8.20.
--enable-voodoo no Enable experimental 3dfx Voodoo Graphics emulation. Currently only the Voodoo1 model is known to work (Voodoo2 is under construction).
--enable-iodebug yes if debugger is on Dave Poirier has written an experimental interface to the debugger using I/O ports, so that software running in the guest OS can access features of the debugger. You only want this option if you are developing guest OS code for use in Bochs. In other words, most people don't. Also, it should only be used with --enable-debugger. See the developer documentation for details.
--enable-pci yes Enable limited i440FX / i430FX PCI support. This is still incomplete, but usable.
--enable-pcidev no Enable PCI host device mapping support. This requires --enable-pci to be set as well as Linux 2.4, 2.6 or 3.x as host. WARNING: This Bochs feature is not maintained yet and may fail.
--enable-usb no Enable i440FX PCI USB support (UHCI). The host controller with 2-port root hub and 8 USB device types are available.
--enable-usb-ohci no Enable USB OHCI support. The host controller with 2-port root hub is available (USB device types: same as UHCI).
--enable-usb-ehci no Enable USB EHCI support. The host controller with 6-port root hub is available (USB device types: same as UHCI).
--enable-usb-xhci no Enable USB xHCI support. The host controller with 4-port root hub is available (USB device types: same as UHCI).
--enable-raw-serial no Enable support for the serial port emulation to access to the host's serial port. This feature is partly implemented for Windows hosts only.

 

等待结束后,输入命令:

make

2、不得不说一下make命令:

我们先要配置好configure文件用于生成makefile文件。然后,make。如果你安装失败需要重新make,建议先运行:make all-clean,最后make install

3、此处根据个人编译环境不同可能报错如下:

<1> 出现

1“ERROR: X windows gui was selected, but X windows libraries were not found.

解决办法:

sudo apt-get install libx11-dev xserver-xorg-dev xorg-dev

 

<2> 出现

1 “ERROR: 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).”
2 ERROR: 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)

解决办法:

sudo apt-get install libgtk2.0-dev

<3> 出现

 1 checking for C compiler default output file name… configure: error: C compiler cannot create executables

解决⽅法:

sudo apt-get install libc6-dev


<4> 出现 

1 configure: error: C++ preprocessor "/lib/cpp" fails sanity check

解决⽅法

sudo apt-get install build-essential

<5> 出现

 1 X windows gui was selected, but X windows libraries were not found.

解决⽅法:

sudo apt-get install xorg-dev

⼤家在解决完⼀项之后再次输⼊:./configure .......

等待完成输入: 

make

<6>如果提⽰:

/usr/bin/ld: gui/libgui.a(gtk_enh_dbg_osdep.o): undefined reference to symbol pthread_create@@GLIBC_2.1
//lib/i386-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line collect2: error:ld
returned 1 exit statusmake: *** [bochs]

解决⽅法:
在⽂件管理器的搜索栏⾥搜索:makefile
会搜出很多名叫“makefile”的⽂件,找到⼤⼩为29kb的那个“makefile”,注意,有的图标上会带着⼀个锁,
有的没有,我们找不带锁的那个,打开后下拉到90⾏左右,内容为:

LIBS = -lm -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -latk-1.0 -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lfontconfig -lfreetype


在这条指令后⾯加上:-lz -lrt -lpthread,完整的如下:

LIBS = -lm -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -latk-1.0 -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lfontconfig -lfreetype -lz -lrt -lpthread

保存后退出,此时再次在命令⾏⾥输⼊:

make

 

 <7> 如果你启用了‘--enable-cpp’将会出现:

make: *** No rule to make target 'misc/bximage.cc', needed by 'misc/bximage.o'.  Stop.

 解决方法:

cp misc/bximage.cpp misc/bximage.cc

cp iodev/hdimage/hdimage.cpp iodev/hdimage/hdimage.cc

cp iodev/hdimage/vmware3.cpp iodev/hdimage/vmware3.cc

cp iodev/hdimage/vmware4.cpp iodev/hdimage/vmware4.cc

cp iodev/hdimage/vpc-img.cpp iodev/hdimage/vcp-img.cc

cp iodev/hdimage/vbox.cpp iodev/hdimage/vbox.cc

继续出现:

 

我猜测这是我之前选择 --enable-cpp 搞出来的事情,所以我们还是不要--enable-cpp了,重新configure一下,再来过。

可以看到安装成功后的目录结构:

おすすめ

転載: www.cnblogs.com/Brandon0807/p/11122234.html