forked from mirrors/nixpkgs
* KVM updated to version 74. This one finally has good performance
for userspace networking / Samba again. * vmtools: use KVM 74 and Linux 2.6.26, and use virtio for networking / disk access. svn path=/nixpkgs/trunk/; revision=12768
This commit is contained in:
parent
73d2e4f49d
commit
74087918ff
|
@ -5,12 +5,12 @@ with pkgs;
|
|||
rec {
|
||||
|
||||
|
||||
inherit (kernelPackages) kernel klibcShrunk;
|
||||
inherit (kernelPackages_2_6_26) kernel klibcShrunk;
|
||||
|
||||
|
||||
modulesClosure = makeModulesClosure {
|
||||
inherit kernel;
|
||||
rootModules = ["cifs" "ne2k_pci" "nls_utf8" "ata_piix" "sd_mod"];
|
||||
rootModules = ["cifs" "virtio_net" "virtio_pci" "virtio_blk" "virtio_balloon" "nls_utf8"];
|
||||
};
|
||||
|
||||
|
||||
|
@ -78,8 +78,7 @@ rec {
|
|||
mknod /dev/null c 1 3
|
||||
mknod /dev/zero c 1 5
|
||||
mknod /dev/tty c 5 0
|
||||
mknod /dev/sda b 8 0
|
||||
mknod /dev/hda b 3 0
|
||||
mknod /dev/vda b 253 0
|
||||
|
||||
ipconfig 10.0.2.15:::::eth0:none
|
||||
|
||||
|
@ -88,7 +87,7 @@ rec {
|
|||
if test -z "$mountDisk"; then
|
||||
mount -t tmpfs none /fs
|
||||
else
|
||||
mount -t ext2 /dev/sda /fs
|
||||
mount -t ext2 /dev/vda /fs
|
||||
fi
|
||||
|
||||
mkdir -p /fs/hostfs
|
||||
|
@ -168,7 +167,8 @@ rec {
|
|||
qemuCommandLinux = ''
|
||||
qemu-system-x86_64 \
|
||||
-nographic -no-reboot \
|
||||
-smb / -hda $diskImage \
|
||||
-net nic,model=virtio -net user -smb / \
|
||||
-drive file=$diskImage,if=virtio,boot=on \
|
||||
-kernel ${kernel}/vmlinuz \
|
||||
-initrd ${initrd}/initrd \
|
||||
-append "console=ttyS0 panic=1 command=${stage2Init} tmpDir=$TMPDIR out=$out mountDisk=$mountDisk" \
|
||||
|
@ -221,8 +221,8 @@ rec {
|
|||
|
||||
createRootFS = ''
|
||||
mkdir /mnt
|
||||
${e2fsprogs}/sbin/mke2fs -F /dev/sda
|
||||
${klibcShrunk}/bin/mount -t ext2 /dev/sda /mnt
|
||||
${e2fsprogs}/sbin/mke2fs -F /dev/vda
|
||||
${klibcShrunk}/bin/mount -t ext2 /dev/vda /mnt
|
||||
|
||||
if test -e /mnt/.debug; then
|
||||
exec ${bash}/bin/sh
|
||||
|
|
|
@ -3,11 +3,11 @@
|
|||
assert stdenv.isLinux;
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "kvm-73";
|
||||
name = "kvm-74";
|
||||
|
||||
src = fetchurl {
|
||||
url = mirror://sourceforge/kvm/kvm-73.tar.gz;
|
||||
sha256 = "1bpdwvnb027zj1q3q9fpsbka2f84nzirihh31dzxprm0p89hlpnd";
|
||||
url = mirror://sourceforge/kvm/kvm-74.tar.gz;
|
||||
sha256 = "0gnd5r9wb8mar3jh8gv46vdm3qkbgiwzkim5ki67kx3ca71g0m24";
|
||||
};
|
||||
|
||||
patches = [
|
||||
|
@ -15,7 +15,7 @@ stdenv.mkDerivation {
|
|||
./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.patch
|
||||
./readonly-kernel-r2.patch
|
||||
];
|
||||
|
||||
configureFlags = "--with-patched-kernel --kerneldir=${kernelHeaders}";
|
|
@ -5346,7 +5346,7 @@ let
|
|||
inherit fetchurl stdenv libxml2;
|
||||
};
|
||||
|
||||
kvm = kvm57;
|
||||
kvm = kvm74;
|
||||
|
||||
kvm57 = import ../os-specific/linux/kvm/57.nix {
|
||||
inherit fetchurl zlib e2fsprogs SDL alsaLib;
|
||||
|
@ -5354,7 +5354,7 @@ let
|
|||
kernelHeaders = kernelHeaders_2_6_23;
|
||||
};
|
||||
|
||||
kvm73 = import ../os-specific/linux/kvm/73.nix {
|
||||
kvm74 = import ../os-specific/linux/kvm/74.nix {
|
||||
inherit fetchurl stdenv zlib e2fsprogs SDL alsaLib pkgconfig rsync;
|
||||
kernelHeaders = kernelHeaders_2_6_26;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue