* Revert to KVM 76 in the VM build functions. The latest qemu-kvm has
weird performance and data corruption regressions in the build farm. svn path=/nixpkgs/trunk/; revision=17364
This commit is contained in:
parent
b08cf58c59
commit
251c7207cf
|
@ -5,10 +5,12 @@ with pkgs;
|
|||
rec {
|
||||
|
||||
|
||||
inherit (kernelPackages_2_6_27) kernel;
|
||||
inherit (kernelPackages_2_6_29) kernel;
|
||||
|
||||
klibcShrunk = pkgs.klibcShrunk.override { klibc = klibc_15; };
|
||||
|
||||
kvm = pkgs.kvm76;
|
||||
|
||||
|
||||
modulesClosure = makeModulesClosure {
|
||||
inherit kernel;
|
||||
|
@ -184,7 +186,7 @@ rec {
|
|||
vmRunCommand = qemuCommand: writeText "vm-run" ''
|
||||
export > saved-env
|
||||
|
||||
PATH=${coreutils}/bin:${qemu_kvm}/bin:${samba}/sbin
|
||||
PATH=${coreutils}/bin:${kvm}/bin:${samba}/sbin
|
||||
|
||||
diskImage=''${diskImage:-/dev/null}
|
||||
|
||||
|
|
|
@ -0,0 +1,38 @@
|
|||
{stdenv, fetchurl, kernelHeaders, zlib, e2fsprogs, SDL, alsaLib, pkgconfig, rsync}:
|
||||
|
||||
assert stdenv.isLinux;
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "kvm-76";
|
||||
|
||||
src = fetchurl {
|
||||
url = mirror://sourceforge/kvm/kvm-76.tar.gz;
|
||||
sha256 = "06gf2aic6n0b3fnd9vi0llyydr2w6qnx1k8imm710862xhncpssk";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Allow setting the path to Samba through $QEMU_SMBD_COMMAND.
|
||||
./smbd-path.patch
|
||||
# The makefile copies stuff from the kernel directory and then
|
||||
# tries to modify the copy, but it must be made writable first.
|
||||
./readonly-kernel-r2.patch
|
||||
];
|
||||
|
||||
configureFlags = "--with-patched-kernel --kerneldir=${kernelHeaders}";
|
||||
|
||||
# e2fsprogs is needed for libuuid.
|
||||
# rsync is a weird dependency used for copying kernel header files.
|
||||
buildInputs = [zlib e2fsprogs SDL alsaLib pkgconfig rsync];
|
||||
|
||||
preConfigure = ''
|
||||
for i in configure user/configure; do
|
||||
substituteInPlace $i --replace /bin/bash $shell
|
||||
done
|
||||
substituteInPlace libkvm/Makefile --replace kvm_para.h kvm.h # !!! quick hack
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = http://kvm.qumranet.com/;
|
||||
description = "A full virtualization solution for Linux on x86 hardware containing virtualization extensions";
|
||||
};
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
diff -rc kvm-74-orig/kernel/Makefile kvm-74/kernel/Makefile
|
||||
*** kvm-74-orig/kernel/Makefile 2008-08-27 10:53:37.000000000 +0200
|
||||
--- kvm-74/kernel/Makefile 2008-08-29 14:12:00.000000000 +0200
|
||||
***************
|
||||
*** 59,64 ****
|
||||
--- 59,65 ----
|
||||
-rsync -R \
|
||||
"$(LINUX)"/arch/$(ARCH_DIR)/include/asm/./kvm*.h \
|
||||
$T/include/asm-$(ARCH_DIR)/
|
||||
+ chmod -R u+w $T
|
||||
|
||||
set -e && for i in $(find $T -name '*.h'); do \
|
||||
$(call unifdef,$$i); done
|
||||
Only in kvm-74/kernel: Makefile~
|
||||
Only in kvm-74/kernel: Makefile.rej
|
|
@ -0,0 +1,48 @@
|
|||
diff -rc kvm-57-orig/qemu/vl.c kvm-57/qemu/vl.c
|
||||
*** kvm-57-orig/qemu/vl.c 2007-12-18 16:57:46.000000000 +0100
|
||||
--- kvm-57/qemu/vl.c 2008-08-26 13:17:57.000000000 +0200
|
||||
***************
|
||||
*** 141,147 ****
|
||||
#ifdef __sun__
|
||||
#define SMBD_COMMAND "/usr/sfw/sbin/smbd"
|
||||
#else
|
||||
! #define SMBD_COMMAND "/usr/sbin/smbd"
|
||||
#endif
|
||||
|
||||
//#define DEBUG_UNUSED_IOPORT
|
||||
--- 141,147 ----
|
||||
#ifdef __sun__
|
||||
#define SMBD_COMMAND "/usr/sfw/sbin/smbd"
|
||||
#else
|
||||
! #define SMBD_COMMAND "smbd"
|
||||
#endif
|
||||
|
||||
//#define DEBUG_UNUSED_IOPORT
|
||||
***************
|
||||
*** 3828,3838 ****
|
||||
slirp_init();
|
||||
}
|
||||
|
||||
! /* XXX: better tmp dir construction */
|
||||
! snprintf(smb_dir, sizeof(smb_dir), "/tmp/qemu-smb.%d", getpid());
|
||||
! if (mkdir(smb_dir, 0700) < 0) {
|
||||
! fprintf(stderr, "qemu: could not create samba server dir '%s'\n", smb_dir);
|
||||
! exit(1);
|
||||
}
|
||||
snprintf(smb_conf, sizeof(smb_conf), "%s/%s", smb_dir, "smb.conf");
|
||||
|
||||
--- 3828,3840 ----
|
||||
slirp_init();
|
||||
}
|
||||
|
||||
! while (1) {
|
||||
! snprintf(smb_dir, sizeof(smb_dir), "/tmp/qemu-smb.%d.%d", getpid(), random());
|
||||
! if (mkdir(smb_dir, 0700) == 0) break;
|
||||
! if (errno != EEXIST) {
|
||||
! fprintf(stderr, "qemu: could not create samba server dir '%s'\n", smb_dir);
|
||||
! exit(1);
|
||||
! }
|
||||
}
|
||||
snprintf(smb_conf, sizeof(smb_conf), "%s/%s", smb_dir, "smb.conf");
|
||||
|
||||
Only in kvm-57/qemu: vl.c~
|
|
@ -5644,7 +5644,12 @@ let
|
|||
inherit stdenv klibc;
|
||||
};
|
||||
|
||||
kvm = kvm86;
|
||||
kvm = kvm76;
|
||||
|
||||
kvm76 = import ../os-specific/linux/kvm/76.nix {
|
||||
inherit fetchurl stdenv zlib e2fsprogs SDL alsaLib pkgconfig rsync;
|
||||
inherit (glibc) kernelHeaders;
|
||||
};
|
||||
|
||||
kvm86 = import ../os-specific/linux/kvm/86.nix {
|
||||
inherit fetchurl stdenv zlib SDL alsaLib pkgconfig pciutils;
|
||||
|
|
Loading…
Reference in New Issue