How to compile and install Bochs and QEMU on Linux

Both Bochs and QEMU are open source emulator software (also known as virtual machine software), commonly used to run and debug operating systems.

 

Ready to work:

1. A computer or virtual machine with Ubuntu system (64-bit version 16.04.3 used in this article)

2. The build-essential package must be installed

3. Download software (source code): Bochs 2.6.9 / QEMU 2.10.1

 

Compile and install Bochs:

Open a terminal and enter the following command:

cd ~/Downloads/bochs-2.6.9
sudo apt-get install libgtk2.0-dev
./configure --enable-debugger --enable-disasm
make all
sudo make install

The parameters of the configure command above are not much to talk about. The first is to enable the debugging function, and the second is to enable the disassembly function.

At this point, Bochs is compiled and installed.

 

Compile and install QEMU:

Enter the following command:

cd ~/Downloads/qemu-2.10.1
sudo apt-get install bison flex
./configure --target-list=i386-softmmu,x86_64-softmmu,i386-linux-user,x86_64-linux-user --enable-debug --enable-kvm
make all
sudo make install

The parameters of the configure command above are not much talked about. The first one is to specify the target architecture to be compiled. Here are four parameters related to the x86 architecture (including the i386 and x86_64 architectures), and the second one is to enable the debugging function. Three is to enable KVM acceleration.

At this point, QEMU is compiled and installed.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325585440&siteId=291194637
Recommended