linux: Use kmod instead of module-init-tools

This commit is contained in:
Eelco Dolstra 2013-08-09 17:39:23 +02:00
parent 4be1055c40
commit d9a4706f73
3 changed files with 10 additions and 17 deletions

View File

@ -23,8 +23,6 @@ configurePhase() {
export INSTALL_PATH=$out export INSTALL_PATH=$out
export INSTALL_MOD_PATH=$out export INSTALL_MOD_PATH=$out
substituteInPlace scripts/depmod.sh --replace '-b "$INSTALL_MOD_PATH"' ""
# Set our own localversion, if specified. # Set our own localversion, if specified.
rm -f localversion* rm -f localversion*
if test -n "$localVersion"; then if test -n "$localVersion"; then
@ -70,14 +68,9 @@ installPhase() {
cp vmlinux $out cp vmlinux $out
if grep -q "CONFIG_MODULES=y" .config; then if grep -q "CONFIG_MODULES=y" .config; then
# Install the modules in $out/lib/modules with matching paths # Install the modules in $out/lib/modules.
# in modules.dep (i.e., refererring to $out/lib/modules, not
# /lib/modules). The depmod_opts= is to prevent the kernel
# from passing `-b PATH' to depmod.
export MODULE_DIR=$out/lib/modules/
substituteInPlace Makefile --replace '-b $(INSTALL_MOD_PATH)' ''
make modules_install \ make modules_install \
DEPMOD=$module_init_tools/sbin/depmod depmod_opts= \ DEPMOD=$kmod/sbin/depmod \
$makeFlags "${makeFlagsArray[@]}" \ $makeFlags "${makeFlagsArray[@]}" \
$installFlags "${installFlagsArray[@]}" $installFlags "${installFlagsArray[@]}"

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, perl, mktemp, module_init_tools, bc { stdenv, fetchurl, perl, mktemp, kmod, bc
, # The kernel source tarball. , # The kernel source tarball.
src src
@ -78,7 +78,7 @@ stdenv.mkDerivation {
generateConfig = ./generate-config.pl; generateConfig = ./generate-config.pl;
inherit preConfigure src module_init_tools localVersion postInstall postBuild; inherit preConfigure src kmod localVersion postInstall postBuild;
patches = map (p: p.patch) kernelPatches; patches = map (p: p.patch) kernelPatches;

View File

@ -6377,7 +6377,7 @@ let
kernelPatches = callPackage ../os-specific/linux/kernel/patches.nix { }; kernelPatches = callPackage ../os-specific/linux/kernel/patches.nix { };
linux_3_0 = makeOverridable (import ../os-specific/linux/kernel/linux-3.0.nix) { linux_3_0 = makeOverridable (import ../os-specific/linux/kernel/linux-3.0.nix) {
inherit fetchurl stdenv perl mktemp bc module_init_tools ubootChooser; inherit fetchurl stdenv perl mktemp bc kmod ubootChooser;
kernelPatches = kernelPatches =
[ kernelPatches.sec_perm_2_6_24 [ kernelPatches.sec_perm_2_6_24
# kernelPatches.aufs3_0 # kernelPatches.aufs3_0
@ -6385,7 +6385,7 @@ let
}; };
linux_3_2 = makeOverridable (import ../os-specific/linux/kernel/linux-3.2.nix) { linux_3_2 = makeOverridable (import ../os-specific/linux/kernel/linux-3.2.nix) {
inherit fetchurl stdenv perl mktemp bc module_init_tools ubootChooser; inherit fetchurl stdenv perl mktemp bc kmod ubootChooser;
kernelPatches = kernelPatches =
[ kernelPatches.sec_perm_2_6_24 [ kernelPatches.sec_perm_2_6_24
# kernelPatches.aufs3_2 # kernelPatches.aufs3_2
@ -6411,7 +6411,7 @@ let
}); });
linux_3_4 = makeOverridable (import ../os-specific/linux/kernel/linux-3.4.nix) { linux_3_4 = makeOverridable (import ../os-specific/linux/kernel/linux-3.4.nix) {
inherit fetchurl stdenv perl mktemp bc module_init_tools ubootChooser; inherit fetchurl stdenv perl mktemp bc kmod ubootChooser;
kernelPatches = kernelPatches =
[ kernelPatches.sec_perm_2_6_24 [ kernelPatches.sec_perm_2_6_24
# kernelPatches.aufs3_4 # kernelPatches.aufs3_4
@ -6430,11 +6430,11 @@ let
}); });
linux_3_6_rpi = makeOverridable (import ../os-specific/linux/kernel/linux-rpi-3.6.nix) { linux_3_6_rpi = makeOverridable (import ../os-specific/linux/kernel/linux-rpi-3.6.nix) {
inherit fetchurl stdenv perl mktemp bc module_init_tools ubootChooser; inherit fetchurl stdenv perl mktemp bc kmod ubootChooser;
}; };
linux_3_9 = makeOverridable (import ../os-specific/linux/kernel/linux-3.9.nix) { linux_3_9 = makeOverridable (import ../os-specific/linux/kernel/linux-3.9.nix) {
inherit fetchurl stdenv perl mktemp bc module_init_tools ubootChooser; inherit fetchurl stdenv perl mktemp bc kmod ubootChooser;
kernelPatches = kernelPatches =
[ [
kernelPatches.sec_perm_2_6_24 kernelPatches.sec_perm_2_6_24
@ -6446,7 +6446,7 @@ let
}; };
linux_3_10 = makeOverridable (import ../os-specific/linux/kernel/linux-3.10.nix) { linux_3_10 = makeOverridable (import ../os-specific/linux/kernel/linux-3.10.nix) {
inherit fetchurl stdenv perl mktemp bc module_init_tools ubootChooser; inherit fetchurl stdenv perl mktemp bc kmod ubootChooser;
kernelPatches = kernelPatches =
[ [
kernelPatches.sec_perm_2_6_24 kernelPatches.sec_perm_2_6_24