runInLinuxVM: pkgs.linux -> kernel

There is a function params `kernel' intended to specify which kernel to use.
It defaults to `pkgs.linux`.
But when we override `kernel', compiling and using two kernels seems not to be the intendend bevavior.
This commit is contained in:
volth 2019-01-29 20:17:44 +00:00 committed by GitHub
parent 2564e780b5
commit e64a551603
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -162,7 +162,7 @@ rec {
fi
# Set up automatic kernel module loading.
export MODULE_DIR=${linux}/lib/modules/
export MODULE_DIR=${kernel}/lib/modules/
${coreutils}/bin/cat <<EOF > /run/modprobe
#! /bin/sh
export MODULE_DIR=$MODULE_DIR
@ -315,7 +315,7 @@ rec {
name = "extract-file";
buildInputs = [ utillinux ];
buildCommand = ''
ln -s ${linux}/lib /lib
ln -s ${kernel}/lib /lib
${kmod}/bin/modprobe loop
${kmod}/bin/modprobe ext4
${kmod}/bin/modprobe hfs
@ -340,7 +340,7 @@ rec {
name = "extract-file-mtd";
buildInputs = [ utillinux mtdutils ];
buildCommand = ''
ln -s ${linux}/lib /lib
ln -s ${kernel}/lib /lib
${kmod}/bin/modprobe mtd
${kmod}/bin/modprobe mtdram total_size=131072
${kmod}/bin/modprobe mtdchar