mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-18 19:03:28 +00:00
linux/manual-config: Fix depmod step, remove false comment
This commit is contained in:
parent
374886444f
commit
21a200d6b2
@ -46,10 +46,6 @@ in
|
|||||||
# The kernel version
|
# The kernel version
|
||||||
version,
|
version,
|
||||||
# The version of the kernel module directory
|
# The version of the kernel module directory
|
||||||
# Note that, unlike with the normal kernel builder, it shouldn't be necessary
|
|
||||||
# to specify this for releases with 2 version numbers, e.g. if you're building
|
|
||||||
# Linux 3.5 the modules will happily be installed in $out/lib/modules/3.5/, but
|
|
||||||
# this is provided for compatability.
|
|
||||||
modDirVersion ? version,
|
modDirVersion ? version,
|
||||||
# The kernel source (tarball, git checkout, etc.)
|
# The kernel source (tarball, git checkout, etc.)
|
||||||
src,
|
src,
|
||||||
@ -68,8 +64,8 @@ let
|
|||||||
installkernel = name: writeTextFile { name = "installkernel"; executable=true; text = ''
|
installkernel = name: writeTextFile { name = "installkernel"; executable=true; text = ''
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
mkdir $4
|
mkdir $4
|
||||||
mv -v $2 $4/${name}
|
cp -av $2 $4/${name}
|
||||||
mv -v $3 $4
|
cp -av $3 $4
|
||||||
'';};
|
'';};
|
||||||
|
|
||||||
isModular = config.isYes "MODULES";
|
isModular = config.isYes "MODULES";
|
||||||
@ -80,7 +76,7 @@ let
|
|||||||
commonMakeFlags = [
|
commonMakeFlags = [
|
||||||
"O=../build"
|
"O=../build"
|
||||||
"INSTALL_PATH=$(out)"
|
"INSTALL_PATH=$(out)"
|
||||||
] ++ (optional isModular "MODLIB=$(out)/lib/modules/${modDirVersion}")
|
] ++ (optional isModular "INSTALL_MOD_PATH=$(out)")
|
||||||
++ optional installsFirmware "INSTALL_FW_PATH=$(out)/lib/firmware";
|
++ optional installsFirmware "INSTALL_FW_PATH=$(out)/lib/firmware";
|
||||||
in
|
in
|
||||||
|
|
||||||
@ -102,6 +98,7 @@ stdenv.mkDerivation {
|
|||||||
echo "stripping FHS paths in \`$mf'..."
|
echo "stripping FHS paths in \`$mf'..."
|
||||||
sed -i "$mf" -e 's|/usr/bin/||g ; s|/bin/||g ; s|/sbin/||g'
|
sed -i "$mf" -e 's|/usr/bin/||g ; s|/bin/||g ; s|/sbin/||g'
|
||||||
done
|
done
|
||||||
|
sed -i Makefile -e 's|= depmod|= ${kmod}/sbin/depmod|'
|
||||||
'';
|
'';
|
||||||
|
|
||||||
configurePhase = ''
|
configurePhase = ''
|
||||||
@ -114,7 +111,7 @@ stdenv.mkDerivation {
|
|||||||
runHook postConfigure
|
runHook postConfigure
|
||||||
'';
|
'';
|
||||||
|
|
||||||
buildNativeInputs = [ perl nettools ] ++ optional isModular kmod;
|
buildNativeInputs = [ perl nettools ];
|
||||||
|
|
||||||
makeFlags = commonMakeFlags ++ [
|
makeFlags = commonMakeFlags ++ [
|
||||||
"INSTALLKERNEL=${installkernel stdenv.platform.kernelTarget}"
|
"INSTALLKERNEL=${installkernel stdenv.platform.kernelTarget}"
|
||||||
@ -126,7 +123,7 @@ stdenv.mkDerivation {
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
postInstall = stdenv.lib.optionalString installsFirmware ''
|
postInstall = optionalString installsFirmware ''
|
||||||
mkdir -p $out/lib/firmware
|
mkdir -p $out/lib/firmware
|
||||||
'' + (if isModular then ''
|
'' + (if isModular then ''
|
||||||
make modules_install $makeFlags "''${makeFlagsArray[@]}" \
|
make modules_install $makeFlags "''${makeFlagsArray[@]}" \
|
||||||
|
Loading…
Reference in New Issue
Block a user