Aug 9, 2011

compile qemu under ubuntu

For some reason, I have to build qemu from the source code.
This is some note of how to do this.

My environment:
ubuntu 10.10
gcc 4.4.5


1.
download the source code of the qemu from the following link.
http://wiki.qemu.org/Download
I choose version 0.15

2.
install some require libraries and tools.
sudo apt-get install build-essential checkinstall 
sudo apt-get install zliblg-dev libSDL-dev

3.
extract the tar.gz.
tar -xvf qemu-0.15.0.tar.gz

4.
cd to the directory and configure.
./configure

5.
build the source code.
./make

6.
install the qemu. You can use make install, but I recommend using the checkinstall.
It is easier to manage the code u build.
(Since I can't find the uninstall tag in the Makefile of qemu. Therefore, I use checkinstall instead of make install.)

sudo checkinstall -D --install=no
sudo dpkg -i $package_name
P.S
a.
-D will create a debian package for the debian distribution.
If u want to build rpm , just use -R instead of -D 
b.
dpkg is the utility to install a deb package. If u want to uninstall a package use -r.


reference website: 
http://hpclab.cs.pu.edu.tw/wiki/index.php/QEMU%28Ubuntu%29
http://sites.google.com/site/embedded2009/weekly-small-project-list/build-qemu

http://www.linuxjournal.com/content/using-checkinstall-build-packages-source
http://www.falkotimme.com/howtos/checkinstall/


No comments:

Post a Comment

Labels