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 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