parent
945c70202f
commit
00e311e438
@ -1,58 +0,0 @@ |
||||
{ stdenv, fetchurl, attr, zlib, SDL, alsaLib, pkgconfig, pciutils, libuuid, vde2 |
||||
, libjpeg, libpng, ncurses, python, glib, libaio, mesa, perl, texinfo |
||||
, spice, spice_protocol, spiceSupport ? false }: |
||||
|
||||
assert stdenv.isLinux; |
||||
|
||||
let version = "1.2.0"; in |
||||
|
||||
stdenv.mkDerivation rec { |
||||
name = "qemu-kvm-${version}"; |
||||
|
||||
src = fetchurl { |
||||
url = "mirror://sourceforge/kvm/qemu-kvm/${version}/${name}.tar.gz"; |
||||
sha256 = "018vb5nmk2fsm143bs2bl2wirhasd4b10d7jchl32zik4inbk2p9"; |
||||
}; |
||||
|
||||
buildInputs = |
||||
[ attr zlib SDL alsaLib pkgconfig pciutils libuuid vde2 libjpeg libpng |
||||
ncurses python glib libaio mesa texinfo perl |
||||
] ++ stdenv.lib.optionals spiceSupport [ spice_protocol spice ]; |
||||
|
||||
patches = [ ./fix-librt-check.patch ./fix-usb-passthrough.patch ]; |
||||
|
||||
postPatch = '' |
||||
patchShebangs . |
||||
sed '/qtest_add_func.*check_time/d' -i tests/rtc-test.c |
||||
'' # disable tests that meddle with system time, they seem to work bad, maybe due to newer glib |
||||
+ stdenv.lib.optionalString spiceSupport '' |
||||
for i in configure spice-qemu-char.c ui/spice-input.c ui/spice-core.c ui/qemu-spice.h; do |
||||
substituteInPlace $i --replace '#include <spice.h>' '#include <spice/spice.h>' |
||||
done |
||||
''; |
||||
|
||||
configureFlags = |
||||
[ "--audio-drv-list=alsa" |
||||
"--smbd=smbd" # use `smbd' from $PATH |
||||
"--enable-docs" |
||||
"--python=${python}/bin/python" |
||||
] ++ stdenv.lib.optional spiceSupport "--enable-spice"; |
||||
|
||||
postInstall = |
||||
'' |
||||
# Libvirt expects us to be called `qemu-kvm'. Otherwise it will |
||||
# set the domain type to "qemu" rather than "kvm", which can |
||||
# cause architecture selection to misbehave. |
||||
ln -sv $(cd $out/bin && echo qemu-system-*) $out/bin/qemu-kvm |
||||
''; |
||||
|
||||
doCheck = true; |
||||
|
||||
enableParallelBuilding = true; |
||||
|
||||
meta = { |
||||
homepage = http://www.linux-kvm.org/; |
||||
description = "A full virtualization solution for Linux on x86 hardware containing virtualization extensions"; |
||||
platforms = stdenv.lib.platforms.linux; |
||||
}; |
||||
} |
@ -1,72 +0,0 @@ |
||||
commit 8bacde8d86a09699207d85d4bab06162aed18dc4
|
||||
Author: Natanael Copa <natanael.copa@gmail.com>
|
||||
Date: Wed Sep 12 09:06:51 2012 +0000
|
||||
|
||||
configure: properly check if -lrt and -lm is needed
|
||||
|
||||
Fixes build against uClibc.
|
||||
|
||||
uClibc provides 2 versions of clock_gettime(), one with realtime
|
||||
support and one without (this is so you can avoid linking in -lrt
|
||||
unless actually needed). This means that the clock_gettime() don't
|
||||
need -lrt. We still need it for timer_create() so we check for this
|
||||
function in addition.
|
||||
|
||||
We also need check if -lm is needed for isnan().
|
||||
|
||||
Both -lm and -lrt are needed for libs_qga.
|
||||
|
||||
Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
|
||||
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index 7656c32..9ab13db 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -2671,17 +2671,44 @@ fi
|
||||
|
||||
|
||||
##########################################
|
||||
+# Do we need libm
|
||||
+cat > $TMPC << EOF
|
||||
+#include <math.h>
|
||||
+int main(void) { return isnan(sin(0.0)); }
|
||||
+EOF
|
||||
+if compile_prog "" "" ; then
|
||||
+ :
|
||||
+elif compile_prog "" "-lm" ; then
|
||||
+ LIBS="-lm $LIBS"
|
||||
+ libs_qga="-lm $libs_qga"
|
||||
+else
|
||||
+ echo
|
||||
+ echo "Error: libm check failed"
|
||||
+ echo
|
||||
+ exit 1
|
||||
+fi
|
||||
+
|
||||
+##########################################
|
||||
# Do we need librt
|
||||
+# uClibc provides 2 versions of clock_gettime(), one with realtime
|
||||
+# support and one without. This means that the clock_gettime() don't
|
||||
+# need -lrt. We still need it for timer_create() so we check for this
|
||||
+# function in addition.
|
||||
cat > $TMPC <<EOF
|
||||
#include <signal.h>
|
||||
#include <time.h>
|
||||
-int main(void) { return clock_gettime(CLOCK_REALTIME, NULL); }
|
||||
+int main(void) {
|
||||
+ timer_create(CLOCK_REALTIME, NULL, NULL);
|
||||
+ return clock_gettime(CLOCK_REALTIME, NULL);
|
||||
+}
|
||||
EOF
|
||||
|
||||
if compile_prog "" "" ; then
|
||||
:
|
||||
-elif compile_prog "" "-lrt" ; then
|
||||
+# we need pthread for static linking. use previous pthread test result
|
||||
+elif compile_prog "" "-lrt $pthread_lib" ; then
|
||||
LIBS="-lrt $LIBS"
|
||||
+ libs_qga="-lrt $libs_qga"
|
||||
fi
|
||||
|
||||
if test "$darwin" != "yes" -a "$mingw32" != "yes" -a "$solaris" != yes -a \
|
@ -1,45 +0,0 @@ |
||||
https://bugs.launchpad.net/qemu/+bug/1033727
|
||||
|
||||
From: Hans de Goede <hdegoede@redhat.com>
|
||||
Date: Wed, 12 Sep 2012 13:08:40 +0000 (+0200)
|
||||
Subject: uhci: Don't queue up packets after one with the SPD flag set
|
||||
X-Git-Tag: v1.3.0-rc0~483^2
|
||||
X-Git-Url: http://git.qemu.org/?p=qemu.git;a=commitdiff_plain;h=72a04d0c178f01908d74539230d9de64ffc6da19
|
||||
Bug-Debian: http://bugs.debian.org/683983
|
||||
|
||||
uhci: Don't queue up packets after one with the SPD flag set
|
||||
|
||||
Don't queue up packets after a packet with the SPD (short packet detect)
|
||||
flag set. Since we won't know if the packet will actually be short until it
|
||||
has completed, and if it is short we should stop the queue.
|
||||
|
||||
This fixes a miniature photoframe emulating a USB cdrom with the windows
|
||||
software for it not working.
|
||||
|
||||
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
||||
---
|
||||
|
||||
diff --git a/hw/usb/hcd-uhci.c b/hw/usb/hcd-uhci.c
|
||||
index c7c8786..cdc8bc3 100644
|
||||
--- a/hw/usb/hcd-uhci.c
|
||||
+++ b/hw/usb/hcd-uhci.c
|
||||
@@ -1000,6 +1000,9 @@ static void uhci_fill_queue(UHCIState *s, UHCI_TD *td)
|
||||
}
|
||||
assert(ret == TD_RESULT_ASYNC_START);
|
||||
assert(int_mask == 0);
|
||||
+ if (ptd.ctrl & TD_CTRL_SPD) {
|
||||
+ break;
|
||||
+ }
|
||||
plink = ptd.link;
|
||||
}
|
||||
}
|
||||
@@ -1097,7 +1100,7 @@ static void uhci_process_frame(UHCIState *s)
|
||||
|
||||
case TD_RESULT_ASYNC_START:
|
||||
trace_usb_uhci_td_async(curr_qh & ~0xf, link & ~0xf);
|
||||
- if (is_valid(td.link)) {
|
||||
+ if (is_valid(td.link) && !(td.ctrl & TD_CTRL_SPD)) {
|
||||
uhci_fill_queue(s, &td);
|
||||
}
|
||||
link = curr_qh ? qh.link : td.link;
|
Loading…
Reference in new issue