Configuration style of the kernel changed.
The main goal is to remove code duplication. Some patches lost during this reorganizing. svn path=/nixpkgs/branches/stdenv-updates/; revision=9825
This commit is contained in:
parent
216657f62e
commit
aca855729f
37
pkgs/os-specific/linux/kernel/2.6.20.nix
Normal file
37
pkgs/os-specific/linux/kernel/2.6.20.nix
Normal file
@ -0,0 +1,37 @@
|
||||
args:
|
||||
(import ./meta.nix)
|
||||
( args //
|
||||
{
|
||||
version = "2.6.20.12";
|
||||
src_hash = { sha256 = "1s7vdpg2897q5pcyxxypqcnibwpbdawbimkf3pngmahj8wr9c03x"; };
|
||||
|
||||
systemPatches = [
|
||||
{ name = "paravirt-nvidia";
|
||||
patch = ./2.6.20-paravirt-nvidia.patch;
|
||||
}
|
||||
{ name = "skas-2.6.20-v9-pre9";
|
||||
patch = args.fetchurl {
|
||||
url = http://www.user-mode-linux.org/~blaisorblade/patches/skas3-2.6/skas-2.6.20-v9-pre9/skas-2.6.20-v9-pre9.patch.bz2;
|
||||
md5 = "02e619e5b3aaf0f9768f03ac42753e74";
|
||||
};
|
||||
extraConfig =
|
||||
"CONFIG_PROC_MM=y\n" +
|
||||
"# CONFIG_PROC_MM_DUMPABLE is not set\n";
|
||||
}
|
||||
{ name = "fbsplash-0.9.2-r5-2.6.20-rc6";
|
||||
patch = args.fetchurl {
|
||||
url = http://dev.gentoo.org/~spock/projects/gensplash/archive/fbsplash-0.9.2-r5-2.6.20-rc6.patch;
|
||||
sha256 = "11v4f85f4jnh9sbhqcyn47krb7l1czgzjw3w8wgbq14jm0sp9294";
|
||||
};
|
||||
extraConfig = "CONFIG_FB_SPLASH=y";
|
||||
}
|
||||
];
|
||||
|
||||
config = with args;
|
||||
if kernelConfig != null then kernelConfig else
|
||||
if userModeLinux then ./config-2.6.20-uml else
|
||||
if stdenv.system == "i686-linux" then ./config-2.6.20-i686-smp else
|
||||
if stdenv.system == "x86_64-linux" then ./config-2.6.20-x86_64-smp else
|
||||
abort "No kernel configuration for your platform!";
|
||||
}
|
||||
)
|
13
pkgs/os-specific/linux/kernel/2.6.21-ck.nix
Normal file
13
pkgs/os-specific/linux/kernel/2.6.21-ck.nix
Normal file
@ -0,0 +1,13 @@
|
||||
args:
|
||||
(import ./2.6.21.nix)
|
||||
( args //
|
||||
{
|
||||
extraPatches = (if (args ? extraPatches) args.extraPatches else []) ++
|
||||
[
|
||||
{
|
||||
name = "Con Kolivas Patch";
|
||||
patch = ./patch-2.6.21-ck1;
|
||||
}
|
||||
];
|
||||
}
|
||||
)
|
45
pkgs/os-specific/linux/kernel/2.6.21.nix
Normal file
45
pkgs/os-specific/linux/kernel/2.6.21.nix
Normal file
@ -0,0 +1,45 @@
|
||||
args:
|
||||
(import ./meta.nix)
|
||||
( args //
|
||||
{
|
||||
version = "2.6.21.7";
|
||||
src_hash = { sha256 = "1c8ndsz35qd8vyng3xsxjjkjv5bnzyvc9b5vd85fz5v0bjp8hx50"; };
|
||||
|
||||
systemPatches = [
|
||||
{ name = "ext3cow";
|
||||
patch = ./linux-2.6.21.7-ext3cow_wouter.patch;
|
||||
extraConfig =
|
||||
"CONFIG_EXT3COW_FS=m\n" +
|
||||
"CONFIG_EXT3COW_FS_XATTR=y\n" +
|
||||
"CONFIG_EXT3COW_FS_POSIX_ACL=y\n" +
|
||||
"CONFIG_EXT3COW_FS_SECURITY=y\n";
|
||||
}
|
||||
{ name = "paravirt-nvidia";
|
||||
patch = ./2.6.20-paravirt-nvidia.patch;
|
||||
}
|
||||
{ name = "skas-2.6.20-v9-pre9";
|
||||
patch = fetchurl {
|
||||
url = http://www.user-mode-linux.org/~blaisorblade/patches/skas3-2.6/skas-2.6.20-v9-pre9/skas-2.6.20-v9-pre9.patch.bz2;
|
||||
md5 = "02e619e5b3aaf0f9768f03ac42753e74";
|
||||
};
|
||||
extraConfig =
|
||||
"CONFIG_PROC_MM=y\n" +
|
||||
"# CONFIG_PROC_MM_DUMPABLE is not set\n";
|
||||
}
|
||||
{ name = "fbsplash-0.9.2-r5-2.6.21";
|
||||
patch = fetchurl {
|
||||
url = http://dev.gentoo.org/~dsd/genpatches/trunk/2.6.21/4200_fbsplash-0.9.2-r5.patch;
|
||||
sha256 = "00s8074fzsly2zpir885zqkvq267qyzg6vhsn7n1z2v1z78avxd8";
|
||||
};
|
||||
extraConfig = "CONFIG_FB_SPLASH=y";
|
||||
}
|
||||
];
|
||||
|
||||
config = with args;
|
||||
if kernelConfig != null then kernelConfig else
|
||||
if userModeLinux then ./config-2.6.21-uml else
|
||||
if stdenv.system == "i686-linux" then ./config-2.6.21-i686-smp else
|
||||
if stdenv.system == "x86_64-linux" then ./config-2.6.21-x86_64-smp else
|
||||
abort "No kernel configuration for your platform!";
|
||||
}
|
||||
)
|
13
pkgs/os-specific/linux/kernel/2.6.22-ck.nix
Normal file
13
pkgs/os-specific/linux/kernel/2.6.22-ck.nix
Normal file
@ -0,0 +1,13 @@
|
||||
args:
|
||||
(import ./2.6.22.nix)
|
||||
( args //
|
||||
{
|
||||
extraPatches = (if (args ? extraPatches) args.extraPatches else []) ++
|
||||
[
|
||||
{
|
||||
name = "Con Kolivas Patch";
|
||||
patch = ./patch-2.6.21-ck1;
|
||||
}
|
||||
];
|
||||
}
|
||||
)
|
28
pkgs/os-specific/linux/kernel/2.6.22.nix
Normal file
28
pkgs/os-specific/linux/kernel/2.6.22.nix
Normal file
@ -0,0 +1,28 @@
|
||||
args:
|
||||
(import ./meta.nix)
|
||||
( args //
|
||||
{
|
||||
version = "2.6.22.10";
|
||||
src_hash = { sha256 = "0kh196qzm54mvnbrdr9s2q86l9yn2321gnsl5xq44ai2idqp044g"; };
|
||||
|
||||
systemPatches = [
|
||||
{ name = "paravirt-nvidia";
|
||||
patch = ../os-specific/linux/kernel/2.6.22-paravirt-nvidia.patch;
|
||||
}
|
||||
{ name = "fbsplash-0.9.2-r5-2.6.21";
|
||||
patch = fetchurl {
|
||||
url = http://dev.gentoo.org/~dsd/genpatches/trunk/2.6.22/4200_fbsplash-0.9.2-r5.patch;
|
||||
sha256 = "0822wwlf2dqsap5qslnnp0yl1nbvvvb76l73w2dd8zsyn0bqg3px";
|
||||
};
|
||||
extraConfig = "CONFIG_FB_SPLASH=y";
|
||||
}
|
||||
];
|
||||
|
||||
config = with args;
|
||||
if kernelConfig != null then kernelConfig else
|
||||
if userModeLinux then ./config-2.6.22-uml else
|
||||
if stdenv.system == "i686-linux" then ./config-2.6.22-i686-smp else
|
||||
if stdenv.system == "x86_64-linux" then ./config-2.6.22-x86_64-smp else
|
||||
abort "No kernel configuration for your platform!";
|
||||
}
|
||||
)
|
41
pkgs/os-specific/linux/kernel/2.6.23.1.nix
Normal file
41
pkgs/os-specific/linux/kernel/2.6.23.1.nix
Normal file
@ -0,0 +1,41 @@
|
||||
args:
|
||||
(import ./meta.nix)
|
||||
( args //
|
||||
{
|
||||
version = "2.6.23.1";
|
||||
src_hash = { sha256 = "0737g83h7jbrlss8782b17mhc3nfn8qfbh5s71flz8pjxmbbmg1m"; };
|
||||
|
||||
systemPatches = [
|
||||
{ name = "paravirt-nvidia";
|
||||
patch = ./2.6.22-paravirt-nvidia.patch;
|
||||
}
|
||||
{ # resume with resume=swap:/dev/xx
|
||||
name = "tux on ice"; # (swsusp2)
|
||||
patch = args.fetchurl {
|
||||
url = "http://www.tuxonice.net/downloads/all/tuxonice-3.0-rc2-for-2.6.23.1.patch.bz2";
|
||||
sha256 = "ef86267b6f3d7e309221f5173a881afae1dfa57418be5b3963f2380b0633ca1a";
|
||||
};
|
||||
extraConfig = "
|
||||
CONFIG_SUSPEND2=y
|
||||
CONFIG_SUSPEND2_FILE=y
|
||||
CONFIG_SUSPEND2_SWAP=y
|
||||
CONFIG_CRYPTO_LZF=y
|
||||
";
|
||||
}
|
||||
{ name = "fbsplash-0.9.2-r5-2.6.21";
|
||||
patch = args.fetchurl {
|
||||
url = http://dev.gentoo.org/~dsd/genpatches/trunk/2.6.22/4200_fbsplash-0.9.2-r5.patch;
|
||||
sha256 = "0822wwlf2dqsap5qslnnp0yl1nbvvvb76l73w2dd8zsyn0bqg3px";
|
||||
};
|
||||
extraConfig = "CONFIG_FB_SPLASH=y";
|
||||
}
|
||||
];
|
||||
|
||||
config = with args;
|
||||
if kernelConfig != null then kernelConfig else
|
||||
if userModeLinux then ./config-2.6.23.1-uml else
|
||||
if stdenv.system == "i686-linux" then ./config-2.6.23.1-i686-smp else
|
||||
if stdenv.system == "x86_64-linux" then ./config-2.6.23.1-x86_64-smp else
|
||||
abort "No kernel configuration for your platform!";
|
||||
}
|
||||
)
|
3756
pkgs/os-specific/linux/kernel/config-2.6.23.1-i686-smp
Normal file
3756
pkgs/os-specific/linux/kernel/config-2.6.23.1-i686-smp
Normal file
File diff suppressed because it is too large
Load Diff
29
pkgs/os-specific/linux/kernel/default.nix
Normal file
29
pkgs/os-specific/linux/kernel/default.nix
Normal file
@ -0,0 +1,29 @@
|
||||
args:
|
||||
let
|
||||
getValue = aSet: aName: default:
|
||||
(if (aSet ? aName) then (builtins.getAttr aSet aName) else default);
|
||||
in
|
||||
|
||||
let
|
||||
newArgs = (args //
|
||||
{
|
||||
userModeLinux = getValue args "userModeLinux" false;
|
||||
|
||||
localVersion = getValue args "localVersion" "";
|
||||
|
||||
config = getValue args "configFile" null;
|
||||
|
||||
extraPatches = getValue args "extraPatches" [];
|
||||
|
||||
extraConfig = getValue args "extraConfig" [];
|
||||
});
|
||||
in
|
||||
args.stdenv.lib.listOfListsToAttrs [
|
||||
[ "recurseForDerivations" true ]
|
||||
[ "2.6.20" (import ./2.6.20.nix newArgs) ]
|
||||
[ "2.6.21" (import ./2.6.21.nix newArgs) ]
|
||||
[ "2.6.21-ck" (import ./2.6.21-ck.nix newArgs) ]
|
||||
[ "2.6.22" (import ./2.6.22.nix newArgs) ]
|
||||
[ "2.6.22-ck" (import ./2.6.22-ck.nix newArgs) ]
|
||||
[ "2.6.23.1" (import ./2.6.23.1.nix newArgs) ]
|
||||
]
|
@ -1,76 +0,0 @@
|
||||
{ stdenv, fetchurl, perl, mktemp, module_init_tools
|
||||
|
||||
# A list of patches to apply to the kernel. Each element of this list
|
||||
# should be an attribute set {name, patch} where `name' is a
|
||||
# symbolic name and `patch' is the actual patch. The patch may
|
||||
# optionally be compressed with gzip or bzip2.
|
||||
, kernelPatches ? []
|
||||
|
||||
, # Whether to build a User-Mode Linux kernel.
|
||||
userModeLinux ? false
|
||||
|
||||
, # Allows you to set your own kernel version suffix (e.g.,
|
||||
# "-my-kernel").
|
||||
localVersion ? ""
|
||||
|
||||
, # Your own kernel configuration file, if you don't want to use the
|
||||
# default.
|
||||
kernelConfig ? null
|
||||
}:
|
||||
|
||||
assert stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux";
|
||||
|
||||
let
|
||||
|
||||
lib = import ../../../lib;
|
||||
|
||||
version = "2.6.20.12";
|
||||
|
||||
in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = if userModeLinux then "user-mode-linux-${version}" else "linux-${version}";
|
||||
builder = ./builder.sh;
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://kernel/linux/kernel/v2.6/linux-${version}.tar.bz2";
|
||||
sha256 = "1s7vdpg2897q5pcyxxypqcnibwpbdawbimkf3pngmahj8wr9c03x";
|
||||
};
|
||||
|
||||
patches = map (p: p.patch) kernelPatches;
|
||||
extraConfig = lib.concatStrings (map (p: "\n" + (if p ? extraConfig then p.extraConfig else "") + "\n") kernelPatches);
|
||||
|
||||
config =
|
||||
if kernelConfig != null then kernelConfig else
|
||||
if userModeLinux then ./config-2.6.20-uml else
|
||||
if stdenv.system == "i686-linux" then ./config-2.6.20-i686-smp else
|
||||
if stdenv.system == "x86_64-linux" then ./config-2.6.20-x86_64-smp else
|
||||
abort "No kernel configuration for your platform!";
|
||||
|
||||
buildInputs = [perl mktemp];
|
||||
|
||||
arch =
|
||||
if userModeLinux then "um" else
|
||||
if stdenv.system == "i686-linux" then "i386" else
|
||||
if stdenv.system == "x86_64-linux" then "x86_64" else
|
||||
abort "Platform ${stdenv.system} is not supported.";
|
||||
|
||||
makeFlags = if userModeLinux then "ARCH=um SHELL=bash" else "";
|
||||
|
||||
inherit module_init_tools;
|
||||
|
||||
allowLocalVersion = false; # don't allow patches to set a suffix
|
||||
inherit localVersion; # but do allow the user to set one.
|
||||
|
||||
meta = {
|
||||
description =
|
||||
(if userModeLinux then
|
||||
"User-Mode Linux"
|
||||
else
|
||||
"The Linux kernel") +
|
||||
(if kernelPatches == [] then "" else
|
||||
" (with patches: "
|
||||
+ lib.concatStrings (lib.intersperse ", " (map (x: x.name) kernelPatches))
|
||||
+ ")");
|
||||
};
|
||||
}
|
@ -1,76 +0,0 @@
|
||||
{ stdenv, fetchurl, perl, mktemp, module_init_tools
|
||||
|
||||
# A list of patches to apply to the kernel. Each element of this list
|
||||
# should be an attribute set {name, patch} where `name' is a
|
||||
# symbolic name and `patch' is the actual patch. The patch may
|
||||
# optionally be compressed with gzip or bzip2.
|
||||
, kernelPatches ? []
|
||||
|
||||
, # Whether to build a User-Mode Linux kernel.
|
||||
userModeLinux ? false
|
||||
|
||||
, # Allows you to set your own kernel version suffix (e.g.,
|
||||
# "-my-kernel").
|
||||
localVersion ? ""
|
||||
|
||||
, # Your own kernel configuration file, if you don't want to use the
|
||||
# default.
|
||||
kernelConfig ? null
|
||||
}:
|
||||
|
||||
assert stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux";
|
||||
|
||||
let
|
||||
|
||||
lib = import ../../../lib;
|
||||
|
||||
version = "2.6.21.7";
|
||||
|
||||
in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = if userModeLinux then "user-mode-linux-${version}" else "linux-${version}";
|
||||
builder = ./builder.sh;
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://kernel/linux/kernel/v2.6/linux-${version}.tar.bz2";
|
||||
sha256 = "1c8ndsz35qd8vyng3xsxjjkjv5bnzyvc9b5vd85fz5v0bjp8hx50";
|
||||
};
|
||||
|
||||
patches = map (p: p.patch) kernelPatches;
|
||||
extraConfig = lib.concatStrings (map (p: "\n" + (if p ? extraConfig then p.extraConfig else "") + "\n") kernelPatches);
|
||||
|
||||
config =
|
||||
if kernelConfig != null then kernelConfig else
|
||||
if userModeLinux then ./config-2.6.21-uml else
|
||||
if stdenv.system == "i686-linux" then ./config-2.6.21-i686-smp else
|
||||
if stdenv.system == "x86_64-linux" then ./config-2.6.21-x86_64-smp else
|
||||
abort "No kernel configuration for your platform!";
|
||||
|
||||
buildInputs = [perl mktemp];
|
||||
|
||||
arch =
|
||||
if userModeLinux then "um" else
|
||||
if stdenv.system == "i686-linux" then "i386" else
|
||||
if stdenv.system == "x86_64-linux" then "x86_64" else
|
||||
abort "Platform ${stdenv.system} is not supported.";
|
||||
|
||||
makeFlags = if userModeLinux then "ARCH=um SHELL=bash" else "";
|
||||
|
||||
inherit module_init_tools;
|
||||
|
||||
allowLocalVersion = false; # don't allow patches to set a suffix
|
||||
inherit localVersion; # but do allow the user to set one.
|
||||
|
||||
meta = {
|
||||
description =
|
||||
(if userModeLinux then
|
||||
"User-Mode Linux"
|
||||
else
|
||||
"The Linux kernel") +
|
||||
(if kernelPatches == [] then "" else
|
||||
" (with patches: "
|
||||
+ lib.concatStrings (lib.intersperse ", " (map (x: x.name) kernelPatches))
|
||||
+ ")");
|
||||
};
|
||||
}
|
@ -1,84 +0,0 @@
|
||||
{ stdenv, fetchurl, perl, mktemp, module_init_tools
|
||||
|
||||
# A list of patches to apply to the kernel. Each element of this list
|
||||
# should be an attribute set {name, patch} where `name' is a
|
||||
# symbolic name and `patch' is the actual patch. The patch may
|
||||
# optionally be compressed with gzip or bzip2.
|
||||
, kernelPatches ? []
|
||||
|
||||
, # Whether to build a User-Mode Linux kernel.
|
||||
userModeLinux ? false
|
||||
|
||||
, # Allows you to set your own kernel version suffix (e.g.,
|
||||
# "-my-kernel").
|
||||
localVersion ? ""
|
||||
|
||||
, # Your own kernel configuration file, if you don't want to use the
|
||||
# default.
|
||||
kernelConfig ? null
|
||||
|
||||
, # A list of additional statements to be appended to the
|
||||
# configuration file.
|
||||
extraConfig ? []
|
||||
}:
|
||||
|
||||
assert stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux";
|
||||
|
||||
let
|
||||
|
||||
lib = import ../../../lib;
|
||||
|
||||
version = "2.6.22.10";
|
||||
|
||||
in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = if userModeLinux then "user-mode-linux-${version}" else "linux-${version}";
|
||||
builder = ./builder.sh;
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://kernel/linux/kernel/v2.6/linux-${version}.tar.bz2";
|
||||
sha256 = "0kh196qzm54mvnbrdr9s2q86l9yn2321gnsl5xq44ai2idqp044g";
|
||||
};
|
||||
|
||||
patches = map (p: p.patch) kernelPatches;
|
||||
extraConfig =
|
||||
let addNewlines = map (s: "\n" + s + "\n");
|
||||
configFromPatches =
|
||||
map (p: if p ? extraConfig then p.extraConfig else "") kernelPatches;
|
||||
in lib.concatStrings (addNewlines (configFromPatches ++ extraConfig));
|
||||
|
||||
config =
|
||||
if kernelConfig != null then kernelConfig else
|
||||
if userModeLinux then ./config-2.6.22-uml else
|
||||
if stdenv.system == "i686-linux" then ./config-2.6.22-i686-smp else
|
||||
if stdenv.system == "x86_64-linux" then ./config-2.6.22-x86_64-smp else
|
||||
abort "No kernel configuration for your platform!";
|
||||
|
||||
buildInputs = [perl mktemp];
|
||||
|
||||
arch =
|
||||
if userModeLinux then "um" else
|
||||
if stdenv.system == "i686-linux" then "i386" else
|
||||
if stdenv.system == "x86_64-linux" then "x86_64" else
|
||||
abort "Platform ${stdenv.system} is not supported.";
|
||||
|
||||
makeFlags = if userModeLinux then "ARCH=um SHELL=bash" else "";
|
||||
|
||||
inherit module_init_tools;
|
||||
|
||||
allowLocalVersion = false; # don't allow patches to set a suffix
|
||||
inherit localVersion; # but do allow the user to set one.
|
||||
|
||||
meta = {
|
||||
description =
|
||||
(if userModeLinux then
|
||||
"User-Mode Linux"
|
||||
else
|
||||
"The Linux kernel") +
|
||||
(if kernelPatches == [] then "" else
|
||||
" (with patches: "
|
||||
+ lib.concatStrings (lib.intersperse ", " (map (x: x.name) kernelPatches))
|
||||
+ ")");
|
||||
};
|
||||
}
|
@ -1,34 +1,12 @@
|
||||
{ stdenv, fetchurl, perl, mktemp, module_init_tools
|
||||
|
||||
# A list of patches to apply to the kernel. Each element of this list
|
||||
# should be an attribute set {name, patch} where `name' is a
|
||||
# symbolic name and `patch' is the actual patch. The patch may
|
||||
# optionally be compressed with gzip or bzip2.
|
||||
, kernelPatches ? []
|
||||
|
||||
, # Whether to build a User-Mode Linux kernel.
|
||||
userModeLinux ? false
|
||||
|
||||
, # Allows you to set your own kernel version suffix (e.g.,
|
||||
# "-my-kernel").
|
||||
localVersion ? ""
|
||||
|
||||
, # Your own kernel configuration file, if you don't want to use the
|
||||
# default.
|
||||
kernelConfig ? null
|
||||
|
||||
, # A list of additional statements to be appended to the
|
||||
# configuration file.
|
||||
extraConfig ? []
|
||||
}:
|
||||
args: with args;
|
||||
|
||||
assert stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux";
|
||||
|
||||
let
|
||||
|
||||
lib = import ../../../lib;
|
||||
|
||||
version = "2.6.23.1";
|
||||
lib = stdenv.lib;
|
||||
addNewlines = map (s: "\n" + s + "\n");
|
||||
kernelPatches = systemPatches ++ extraPatches;
|
||||
|
||||
in
|
||||
|
||||
@ -36,24 +14,18 @@ stdenv.mkDerivation {
|
||||
name = if userModeLinux then "user-mode-linux-${version}" else "linux-${version}";
|
||||
builder = ./builder.sh;
|
||||
|
||||
src = fetchurl {
|
||||
src = fetchurl ( {
|
||||
url = "mirror://kernel/linux/kernel/v2.6/linux-${version}.tar.bz2";
|
||||
sha256 = "0737g83h7jbrlss8782b17mhc3nfn8qfbh5s71flz8pjxmbbmg1m";
|
||||
};
|
||||
} // src_hash );
|
||||
|
||||
patches = map (p: p.patch) kernelPatches;
|
||||
|
||||
extraConfig =
|
||||
let addNewlines = map (s: "\n" + s + "\n");
|
||||
configFromPatches =
|
||||
let configFromPatches =
|
||||
map (p: if p ? extraConfig then p.extraConfig else "") kernelPatches;
|
||||
in lib.concatStrings (addNewlines (configFromPatches ++ extraConfig));
|
||||
|
||||
config =
|
||||
if kernelConfig != null then kernelConfig else
|
||||
if userModeLinux then ./config-2.6.23-uml else
|
||||
if stdenv.system == "i686-linux" then ./config-2.6.23-i686-smp else
|
||||
if stdenv.system == "x86_64-linux" then ./config-2.6.23-x86_64-smp else
|
||||
abort "No kernel configuration for your platform!";
|
||||
config = configFile;
|
||||
|
||||
buildInputs = [perl mktemp];
|
||||
|
@ -2943,192 +2943,18 @@ rec {
|
||||
|
||||
systemKernel = kernel;
|
||||
|
||||
kernel = (if (getConfig ["kernel" "version"] "2.6.21") == "2.6.22" then
|
||||
kernel_2_6_22 else if (getConfig ["kernel" "version"] "2.6.21") == "2.6.23" then
|
||||
kernel_2_6_23 else kernel_2_6_21);
|
||||
kernel = getVersion "kernel" kernel_alts;
|
||||
|
||||
kernel_2_6_20 = import ../os-specific/linux/kernel/linux-2.6.20.nix {
|
||||
kernel_alts = import ../os-specific/linux/kernel {
|
||||
inherit fetchurl stdenv perl mktemp module_init_tools;
|
||||
kernelPatches = [
|
||||
{ name = "paravirt-nvidia";
|
||||
patch = ../os-specific/linux/kernel/2.6.20-paravirt-nvidia.patch;
|
||||
}
|
||||
{ name = "skas-2.6.20-v9-pre9";
|
||||
patch = fetchurl {
|
||||
url = http://www.user-mode-linux.org/~blaisorblade/patches/skas3-2.6/skas-2.6.20-v9-pre9/skas-2.6.20-v9-pre9.patch.bz2;
|
||||
md5 = "02e619e5b3aaf0f9768f03ac42753e74";
|
||||
};
|
||||
extraConfig =
|
||||
"CONFIG_PROC_MM=y\n" +
|
||||
"# CONFIG_PROC_MM_DUMPABLE is not set\n";
|
||||
}
|
||||
{ name = "fbsplash-0.9.2-r5-2.6.20-rc6";
|
||||
patch = fetchurl {
|
||||
url = http://dev.gentoo.org/~spock/projects/gensplash/archive/fbsplash-0.9.2-r5-2.6.20-rc6.patch;
|
||||
sha256 = "11v4f85f4jnh9sbhqcyn47krb7l1czgzjw3w8wgbq14jm0sp9294";
|
||||
};
|
||||
extraConfig = "CONFIG_FB_SPLASH=y";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
kernel_2_6_21 = import ../os-specific/linux/kernel/linux-2.6.21.nix {
|
||||
inherit fetchurl stdenv perl mktemp module_init_tools;
|
||||
kernelPatches = [
|
||||
{ name = "ext3cow";
|
||||
patch = ../os-specific/linux/kernel/linux-2.6.21.7-ext3cow_wouter.patch;
|
||||
extraConfig =
|
||||
"CONFIG_EXT3COW_FS=m\n" +
|
||||
"CONFIG_EXT3COW_FS_XATTR=y\n" +
|
||||
"CONFIG_EXT3COW_FS_POSIX_ACL=y\n" +
|
||||
"CONFIG_EXT3COW_FS_SECURITY=y\n";
|
||||
}
|
||||
/* commented out because only acer users have need for it..
|
||||
It takes quite a while to create the patch when unpacking the kernel sources only for that task
|
||||
{ name = "acerhk";
|
||||
patch = kernel_module_acerhk + "/acerhk-patch.tar.bz2" ;
|
||||
extraConfig =
|
||||
"CONFIG_ACERHK=m\n";
|
||||
}
|
||||
*/
|
||||
{ name = "paravirt-nvidia";
|
||||
patch = ../os-specific/linux/kernel/2.6.20-paravirt-nvidia.patch;
|
||||
}
|
||||
{ name = "skas-2.6.20-v9-pre9";
|
||||
patch = fetchurl {
|
||||
url = http://www.user-mode-linux.org/~blaisorblade/patches/skas3-2.6/skas-2.6.20-v9-pre9/skas-2.6.20-v9-pre9.patch.bz2;
|
||||
md5 = "02e619e5b3aaf0f9768f03ac42753e74";
|
||||
};
|
||||
extraConfig =
|
||||
"CONFIG_PROC_MM=y\n" +
|
||||
"# CONFIG_PROC_MM_DUMPABLE is not set\n";
|
||||
}
|
||||
{ name = "fbsplash-0.9.2-r5-2.6.21";
|
||||
patch = fetchurl {
|
||||
url = http://dev.gentoo.org/~dsd/genpatches/trunk/2.6.21/4200_fbsplash-0.9.2-r5.patch;
|
||||
sha256 = "00s8074fzsly2zpir885zqkvq267qyzg6vhsn7n1z2v1z78avxd8";
|
||||
};
|
||||
extraConfig = "CONFIG_FB_SPLASH=y";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
kernel_2_6_22 = import ../os-specific/linux/kernel/linux-2.6.22.nix {
|
||||
inherit fetchurl stdenv perl mktemp module_init_tools;
|
||||
kernelPatches = [
|
||||
/*
|
||||
{ name = "ext3cow";
|
||||
patch = ../os-specific/linux/kernel/linux-2.6.21.7-ext3cow_wouter.patch;
|
||||
extraConfig =
|
||||
"CONFIG_EXT3COW_FS=m\n" +
|
||||
"CONFIG_EXT3COW_FS_XATTR=y\n" +
|
||||
"CONFIG_EXT3COW_FS_POSIX_ACL=y\n" +
|
||||
"CONFIG_EXT3COW_FS_SECURITY=y\n";
|
||||
}
|
||||
*/
|
||||
{ name = "paravirt-nvidia";
|
||||
patch = ../os-specific/linux/kernel/2.6.22-paravirt-nvidia.patch;
|
||||
}
|
||||
/*
|
||||
{ name = "skas-2.6.20-v9-pre9";
|
||||
patch = fetchurl {
|
||||
url = http://www.user-mode-linux.org/~blaisorblade/patches/skas3-2.6/skas-2.6.20-v9-pre9/skas-2.6.20-v9-pre9.patch.bz2;
|
||||
md5 = "02e619e5b3aaf0f9768f03ac42753e74";
|
||||
};
|
||||
extraConfig =
|
||||
"CONFIG_PROC_MM=y\n" +
|
||||
"# CONFIG_PROC_MM_DUMPABLE is not set\n";
|
||||
}
|
||||
*/
|
||||
{ name = "fbsplash-0.9.2-r5-2.6.21";
|
||||
patch = fetchurl {
|
||||
url = http://dev.gentoo.org/~dsd/genpatches/trunk/2.6.22/4200_fbsplash-0.9.2-r5.patch;
|
||||
sha256 = "0822wwlf2dqsap5qslnnp0yl1nbvvvb76l73w2dd8zsyn0bqg3px";
|
||||
};
|
||||
extraConfig = "CONFIG_FB_SPLASH=y";
|
||||
}
|
||||
];
|
||||
extraConfig =
|
||||
lib.optional (getConfig ["kernel" "no_hz"] false) "CONFIG_NO_HZ=y" ++
|
||||
lib.optional (getConfig ["kernel" "timer_stats"] false) "CONFIG_TIMER_STATS=y" ++
|
||||
lib.optional (getConfig ["kernel" "usb_suspend"] false) "CONFIG_USB_SUSPEND=y" ++
|
||||
lib.optional (getConfig ["kernel" "no_irqbalance"] false) "# CONFIG_IRQBALANCE is not set" ++
|
||||
[(getConfig ["kernel" "addConfig"] "")];
|
||||
};
|
||||
|
||||
kernel_2_6_21_ck = import ../os-specific/linux/kernel/linux-2.6.21_ck.nix {
|
||||
inherit fetchurl stdenv perl mktemp module_init_tools;
|
||||
kernelPatches = [
|
||||
{ name = "ext3cow";
|
||||
patch = ../os-specific/linux/kernel/linux-2.6.21.7-ext3cow_wouter.patch;
|
||||
extraConfig =
|
||||
"CONFIG_EXT3COW_FS=m\n" +
|
||||
"CONFIG_EXT3COW_FS_XATTR=y\n" +
|
||||
"CONFIG_EXT3COW_FS_POSIX_ACL=y\n" +
|
||||
"CONFIG_EXT3COW_FS_SECURITY=y\n";
|
||||
}
|
||||
{ name = "Con Kolivas Patch";
|
||||
patch = ../os-specific/linux/kernel/patch-2.6.21-ck1;
|
||||
}
|
||||
{ name = "paravirt-nvidia";
|
||||
patch = ../os-specific/linux/kernel/2.6.20-paravirt-nvidia.patch;
|
||||
}
|
||||
{ name = "skas-2.6.20-v9-pre9";
|
||||
patch = fetchurl {
|
||||
url = http://www.user-mode-linux.org/~blaisorblade/patches/skas3-2.6/skas-2.6.20-v9-pre9/skas-2.6.20-v9-pre9.patch.bz2;
|
||||
md5 = "02e619e5b3aaf0f9768f03ac42753e74";
|
||||
};
|
||||
extraConfig =
|
||||
"CONFIG_PROC_MM=y\n" +
|
||||
"# CONFIG_PROC_MM_DUMPABLE is not set\n";
|
||||
}
|
||||
{ name = "fbsplash-0.9.2-r5-2.6.21";
|
||||
patch = fetchurl {
|
||||
url = http://dev.gentoo.org/~dsd/genpatches/trunk/2.6.21/4200_fbsplash-0.9.2-r5.patch;
|
||||
sha256 = "00s8074fzsly2zpir885zqkvq267qyzg6vhsn7n1z2v1z78avxd8";
|
||||
};
|
||||
extraConfig = "CONFIG_FB_SPLASH=y";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
|
||||
|
||||
kernel_2_6_23 = import ../os-specific/linux/kernel/linux-2.6.23.nix {
|
||||
inherit fetchurl stdenv perl mktemp module_init_tools;
|
||||
kernelPatches = [
|
||||
{ name = "paravirt-nvidia";
|
||||
patch = ../os-specific/linux/kernel/2.6.22-paravirt-nvidia.patch;
|
||||
}
|
||||
{ # resume with resume=swap:/dev/xx
|
||||
name = "tux on ice"; # (swsusp2)
|
||||
patch = fetchurl {
|
||||
url = "http://www.tuxonice.net/downloads/all/tuxonice-3.0-rc2-for-2.6.23.1.patch.bz2";
|
||||
sha256 = "ef86267b6f3d7e309221f5173a881afae1dfa57418be5b3963f2380b0633ca1a";
|
||||
};
|
||||
extraConfig = "
|
||||
CONFIG_SUSPEND2=y
|
||||
CONFIG_SUSPEND2_FILE=y
|
||||
CONFIG_SUSPEND2_SWAP=y
|
||||
CONFIG_CRYPTO_LZF=y
|
||||
";
|
||||
}
|
||||
{ name = "fbsplash-0.9.2-r5-2.6.21";
|
||||
patch = fetchurl {
|
||||
url = http://dev.gentoo.org/~dsd/genpatches/trunk/2.6.22/4200_fbsplash-0.9.2-r5.patch;
|
||||
sha256 = "0822wwlf2dqsap5qslnnp0yl1nbvvvb76l73w2dd8zsyn0bqg3px";
|
||||
};
|
||||
extraConfig = "CONFIG_FB_SPLASH=y";
|
||||
}
|
||||
] ++ getConfig ["kernel" "extraPatches"] [];
|
||||
extraPatches = getConfig ["kernel" "extraPatches"] [];
|
||||
extraConfig =
|
||||
lib.optional (getConfig ["kernel" "timer_stats"] false) "CONFIG_TIMER_STATS=y" ++
|
||||
lib.optional (getConfig ["kernel" "no_irqbalance"] false) "# CONFIG_IRQBALANCE is not set" ++
|
||||
[(getConfig ["kernel" "addConfig"] "")];
|
||||
kernelConfig = getConfig ["kernel" "configFile"] null;
|
||||
configFile = getConfig ["kernel" "configFile"] null;
|
||||
};
|
||||
|
||||
|
||||
libselinux = import ../os-specific/linux/libselinux {
|
||||
inherit fetchurl stdenv libsepol;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user