PDA

View Full Version : Dapper + QEMU + KQEMU


Txukie
February 22nd, 2006, 05:43 AM
Hello, I know there is another post on the subject with a very good how-to, but it is based on Breezy and I use Dapper, that's why I open this post to see if someone can help me, and then maybe do a specific Dapper how-to.
I have tried countless times to compile QEMU and KQEMU under Dapper kernel 2.6.15-15-686 without any success.
I have changed the configure script to set "cc=gcc-3.4" and "host-cc=gcc-4.0" (have tried "host-cc=gcc-3.4" too without success).
I have chmod -R 755 the source folder. I have set the kernel path correctly under configure too.
Configure runs fine and detects kqemu, but during make I get the famous "cannot find file kqemu.mod.c" error. I have tried with qemu 0.8.0 and kqemu 0.7.2 and with CVS version of qemu and unstable kqemu with the same result.
Trying to modprobe kqemu gives me an error i cant remember (not on my computer now), maybe i should delete the module? If so what is the best way of doing it?
Please I beg you to help me, I really need to get this going to set sandboxes to test stuff and make manuals for the community!

Txukie
February 22nd, 2006, 05:33 PM
Up!

No one?:cry:

Txukie
February 23rd, 2006, 03:15 PM
Up!

Please somebody just try compiling it!

Txukie
February 27th, 2006, 12:00 PM
Up!

:cry:

tonyr
February 27th, 2006, 05:26 PM
What HOWTO did you use? I don't know if this helps, but here is a related thread,
although it is also based on Breezy. It refers to a new automated script, which
I haven't looked at yet. I am just now getting into development in the
Debian/Ubuntu environment, and this deep-end looks just about as deep as
any other deep-end I could jump into.

http://oui.com.br/n/content.php?article.21

tonyr
February 27th, 2006, 06:19 PM
That script that is mentioned in the link I posted earlier seems to work. The
compile completed successfully. There was a warning at the end about not
being able to find a the file .kqemu-mod.o.cmd, and that did not seem to hold
up the process. There were some problems with the install step, perhaps
due to missing install support on my machine. I will look into that.

Perhaps you should look at the script and contact the author if you have more
questions.

My platform:
Dell Inspiron 2650 laptop, P4M 1.5GHz 512MbRam
Dapper Flight 4, kubuntu, upgraded as of yesterday,
kernel 2.6.15-16-686

tony

tonyr
February 27th, 2006, 07:25 PM
The original script assumes that the QEMU and KQEMU versions are the same,
0.7.2. I modified the script to use qemu-0.8.0 and kqemu-0.7.2. The compile
result was the same, success with install failure. I am attaching .bz2 files with
the modified scriptand my build log (with install failure).

tony

tonyr
February 27th, 2006, 11:08 PM
If you can log in as root, the script might run to completion successfully. I haven't
tried that, since I haven't modified my system to allow root logins (I use
the New Root Shell session selection in Konsole).

If you run the script and it fails like mine did, go to the qemu-0.8.0 directory
(it should be in /root/qemu-src/) and run sudo make install. I found that
as a suggestion while looking for anything I could find about the kind of
failure that is being reported. It succeeded. The mystery of why that works
when the script does not is left as a puzzle for the reader. There may be
things after the install step that were not done. I didn't look into that.

- tony

tonyr
February 28th, 2006, 01:18 PM
There is a problem with checkinstall/installwatch. checkinstall looks for
installwatch.so as /usr/lib/installwatch.so. The
installwatch package has installwatch.so as
/usr/lib/installwatch/installwatch.so. I don't know what the correct
resolution here is. I'll start another thread and/or submit a bug.

There is another checkinstall problem having to do with mkdir -p failures.
I haven't explored this one in detail yet.

- tony

tonyr
February 28th, 2006, 02:12 PM
Both failures (installwatch.so location, mkdir -p) are already
reported as bugs: #29536 and #6567.

- tony

Txukie
March 3rd, 2006, 03:08 PM
Found a fix and managed to get it working, seems that the problem was with checkinstall and its compatibility with newer versions of glibc
Just install newer version
http://asic-linux.com.mx/~izto/checkinstall/files/deb/checkinstall_1.6.0-1_i386.deb

tonyr
March 3rd, 2006, 03:20 PM
Glad to hear it! Looks like we were all watching the same threads about
checkinstall.

- tony

mrjohnston
March 22nd, 2006, 12:51 PM
I modified the original qemu script now to add in some features (like recognizing the k7 kernel) and made it work with dapper to compile kqemu properly to load with the kernel. I made it available below. Please feel free to let me know if you have any issues with it on dapper.

jahtooth
April 1st, 2006, 04:32 PM
@mrjohnston: Thanks for the updated script. I have made a quick fix so that it would still work on non-k7 kernels ;)

Also fixed a bug in the bash syntax used in the previous script:

if [ $KERNEL=="i686" ]; ### will always evaluate to true...wrong

if [ $KERNEL == "i686" ]; ### ... might not!

adamkane
April 26th, 2006, 08:33 PM
If you have an AMD system, these automatic scripts don't really work. I have an AMD Athlon system and uname -m command, which is used in these scripts, tells me I have an Intel Pentium system, which is incorrect.

You have to install the correct linux headers and related files, and then run a version of the insQEMU.sh script without kernel detection:
http://www.ubuntuforums.org/showthread.php?t=154265

Without the correct linux headers and related files installed, you will receive the "can't stat kqemu.ko" error.