Author: eelco
Date: Fri Sep 10 16:27:39 2010
New Revision: 23729
URL: https://svn.nixos.org/websvn/nix/?rev=23729&sc=1

Log:
* Add a branch of the Linux kernel that can be used in Xen's Dom0.
  From 
http://git.kernel.org/?p=linux/kernel/git/jeremy/xen.git;a=shortlog;h=refs/heads/xen/stable-2.6.32.x

Added:
   nixpkgs/trunk/pkgs/os-specific/linux/kernel/linux-2.6.32-xen.nix
      - copied, changed from r23720, 
nixpkgs/trunk/pkgs/os-specific/linux/kernel/linux-2.6.32.nix
Modified:
   nixpkgs/trunk/pkgs/os-specific/linux/kernel/generic.nix
   nixpkgs/trunk/pkgs/top-level/all-packages.nix

Modified: nixpkgs/trunk/pkgs/os-specific/linux/kernel/generic.nix
==============================================================================
--- nixpkgs/trunk/pkgs/os-specific/linux/kernel/generic.nix     Fri Sep 10 
15:47:06 2010        (r23728)
+++ nixpkgs/trunk/pkgs/os-specific/linux/kernel/generic.nix     Fri Sep 10 
16:27:39 2010        (r23729)
@@ -27,9 +27,6 @@
 , # Whether to build a User-Mode Linux kernel.
   userModeLinux ? false
 
-, # Whether to build a Xen kernel.
-  xen ? false
-
 , # Allows you to set your own kernel version suffix (e.g.,
   # "-my-kernel").
   localVersion ? ""
@@ -93,7 +90,6 @@
   # Should we trust platform.kernelArch? We can only do
   # that once we differentiate i686/x86_64 in platforms.
   arch =
-    if xen then "xen" else
     if userModeLinux then "um" else
     if stdenv.system == "i686-linux" then "i386" else
     if stdenv.system == "x86_64-linux" then "x86_64" else

Copied and modified: 
nixpkgs/trunk/pkgs/os-specific/linux/kernel/linux-2.6.32-xen.nix (from r23720, 
nixpkgs/trunk/pkgs/os-specific/linux/kernel/linux-2.6.32.nix)
==============================================================================
--- nixpkgs/trunk/pkgs/os-specific/linux/kernel/linux-2.6.32.nix        Fri Sep 
10 14:06:56 2010        (r23720, copy source)
+++ nixpkgs/trunk/pkgs/os-specific/linux/kernel/linux-2.6.32-xen.nix    Fri Sep 
10 16:27:39 2010        (r23729)
@@ -190,6 +190,10 @@
       X86_CHECK_BIOS_CORRUPTION y
       X86_MCE y
 
+      # Enable Xen Dom0 support.
+      XEN_DOM0 y
+      XEN_PCI_PASSTHROUGH y
+
       ${if kernelPlatform ? kernelExtraConfig then 
kernelPlatform.kernelExtraConfig else ""}
       ${extraConfig}
     '';
@@ -198,17 +202,19 @@
 import ./generic.nix (
 
   rec {
-    version = "2.6.32.21";
+    version = "2.6.32.21-xen-2968b25";
   
     src = fetchurl {
-      url = "mirror://kernel/linux/kernel/v2.6/linux-${version}.tar.bz2";
-      sha256 = "14hc1ky8ww95qq7c9w9r8yvapx583kbf6fkd6d80kv3rll49xyil";
+      url = "http://nixos.org/tarballs/linux-${version}.tar.bz2";;
+      sha256 = "06dxwchyxvfwg35y78bs0bm91ah6jlb6pjkqwgdnsgfjnxhibfx9";
     };
 
     config = configWithPlatform stdenv.platform;
     configCross = configWithPlatform stdenv.cross.platform;
 
     features.iwlwifi = true;
+
+    meta.description = "Linux kernel suitable for Xen Domain 0";
   }
 
   // removeAttrs args ["extraConfig"]

Modified: nixpkgs/trunk/pkgs/top-level/all-packages.nix
==============================================================================
--- nixpkgs/trunk/pkgs/top-level/all-packages.nix       Fri Sep 10 15:47:06 
2010        (r23728)
+++ nixpkgs/trunk/pkgs/top-level/all-packages.nix       Fri Sep 10 16:27:39 
2010        (r23729)
@@ -4471,6 +4471,18 @@
       ];
   };
 
+  linux_2_6_32_xen = makeOverridable (import 
../os-specific/linux/kernel/linux-2.6.32-xen.nix) {
+    inherit fetchurl stdenv perl mktemp module_init_tools ubootChooser;
+    kernelPatches =
+      [ kernelPatches.fbcondecor_2_6_31
+        kernelPatches.sec_perm_2_6_24
+        kernelPatches.aufs2_2_6_32
+        kernelPatches.cifs_timeout
+        kernelPatches.no_xsave
+        kernelPatches.dell_rfkill
+      ];
+  };
+
   linux_2_6_32_systemtap = makeOverridable (import 
../os-specific/linux/kernel/linux-2.6.32.nix) {
     inherit fetchurl stdenv perl mktemp module_init_tools ubootChooser;
     extraConfig =
@@ -4663,6 +4675,8 @@
   linuxPackages_2_6_32 = recurseIntoAttrs (linuxPackagesFor linux_2_6_32 
pkgs.linuxPackages_2_6_32);
   linuxPackages_2_6_32_systemtap =
     recurseIntoAttrs (linuxPackagesFor linux_2_6_32_systemtap 
pkgs.linuxPackages_2_6_32_systemtap);
+  linuxPackages_2_6_32_xen =
+    recurseIntoAttrs (linuxPackagesFor linux_2_6_32_xen 
pkgs.linuxPackages_2_6_32_systemtap);
   linuxPackages_2_6_33 = recurseIntoAttrs (linuxPackagesFor linux_2_6_33 
pkgs.linuxPackages_2_6_33);
   linuxPackages_2_6_34 = recurseIntoAttrs (linuxPackagesFor linux_2_6_34 
pkgs.linuxPackages_2_6_34);
   linuxPackages_2_6_35 = recurseIntoAttrs (linuxPackagesFor linux_2_6_35 
pkgs.linuxPackages_2_6_35);
_______________________________________________
nix-commits mailing list
[email protected]
http://mail.cs.uu.nl/mailman/listinfo/nix-commits

Reply via email to