runInLinuxVM: pkgs.linux -> kernel (#54897)

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:
Joachim F 2019-01-31 17:52:18 +00:00 committed by GitHub
commit 004e3816dc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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