A simple instruction list to compile QEMU on Linux
Error message: linux/compiler.h: No such file or directory
Download and extract the current QEMU release source code & the current kqemu
wget http://www.qemu.com/qemu-0.8.2.tar.gz wget http://www.qemu.com/kqemu-1.3.0pre9.tar.gz tar xzvf qemu-0.8.2.tar.gz tar xzvf kqemu-1.3.0pre9.tar.gz
Configure and compile qemu
for a faster build only specify the targets you need. i.e.: ./configure --target-list=i386-softmmu,x86_64-softmmu
./configure will give you a list of target names
see ./configure --help for other build options
cd qemu-0.8.2 ./configure make sudo make install
If compilation fails in usb-linux.c with "linux/compiler.h: No such file or directory" then remove the line starting with #include <linux/compiler.h> in usb-linux.c. This is a hack on the part of QEMU intended as a workaround for some distros with broken headers.
Configure and compile kqemu
You will need either an appropriate kernel-headers package (ubuntu/debian systems) or a configured kernel source tree with symlink at /usr/src/linux
cd kqemu-1.3.0pre9 ./configure make sudo make install sudo modprobe kqemu major=0
Verify /dev/kqemu exists and that it is read/writable to the users that need it (perhaps c-rw-rw-rw)
Start QEMU
Check that kqemu is running in qemu by Ctrl-Alt-2, then typing help, and using the command that shows the kqemu status (I think it's "info kqemu").
If kqemu is not working, try
rmmod kqemu
modprobe kqemu major=0
verify /dev/kqemu exists and that it is read/writable to the users that need it (perhaps c-rw-rw-rw)
Start QEMU
Check that kqemu is running in QEMU by Ctrl-Alt-2, then typing help, and using the command that shows the kqemu status (I think it's "info kqemu").
For more help with kqemu see here
Article based on: http://qemu-forum.ipi.fi/viewtopic.php?t=571&start=15.
See http://qemu-buch.de/d/Installation for further information.
Hosted by http://qemu-buch.de