From de581b99cabc8af056aa718fd1585fdced58b757 Mon Sep 17 00:00:00 2001 From: aszlig Date: Thu, 12 Apr 2018 15:38:16 +0200 Subject: [PATCH] kernel: Fix running kernels *with* modules Pull request #38470 added support for running/building kernels without modules. This got merged in 38e04bbf29fe3b6af26b3505a42ce5871aeac17d but unfortunately while this works perfectly on kernels without modules it also makes sure that *every* kernel gets no modules. So all of our VM tests fail since that merge with something like this: machine# loading module loop... machine# modprobe: FATAL: Module loop not found in directory /lib/modules/4.14.33 machine# loading module vfat... machine# modprobe: FATAL: Module vfat not found in directory /lib/modules/4.14.33 machine# loading module nls_cp437... machine# modprobe: FATAL: Module nls_cp437 not found in directory /lib/modules/4.14.33 machine# loading module nls_iso8859-1... machine# modprobe: FATAL: Module nls_iso8859-1 not found in directory /lib/modules/4.14.33 machine# loading module fuse... machine# modprobe: FATAL: Module fuse not found in directory /lib/modules/4.14.33 machine# loading module dm_mod... machine# modprobe: FATAL: Module dm_mod not found in directory /lib/modules/4.14.33 I shortly tested this against the "misc" VM test and the test is working again. In the long term (and I currently don't have time for this) it would be better to also have a VM test which tests a kernel without modules. Signed-off-by: aszlig Cc: @roberth, @7c6f434c --- pkgs/build-support/kernel/modules-closure.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/build-support/kernel/modules-closure.sh b/pkgs/build-support/kernel/modules-closure.sh index 9a49d42cdc1a..5658094872c8 100644 --- a/pkgs/build-support/kernel/modules-closure.sh +++ b/pkgs/build-support/kernel/modules-closure.sh @@ -3,7 +3,7 @@ source $stdenv/setup # When no modules are built, the $out/lib/modules directory will not # exist. Because the rest of the script assumes it does exist, we # handle this special case first. -if ! test -d "$out/lib/modules"; then +if ! test -d "$kernel/lib/modules"; then if test -z "$rootModules" || test -n "$allowMissing"; then mkdir -p "$out" exit 0