linux module handling: support kernels without modules
This commit is contained in:
@@ -1,5 +1,19 @@
|
||||
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 -z "$rootModules" || test -n "$allowMissing"; then
|
||||
mkdir -p "$out"
|
||||
exit 0
|
||||
else
|
||||
echo "Required modules: $rootModules"
|
||||
echo "Can not derive a closure of kernel modules because no modules were provided."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
version=$(cd $kernel/lib/modules && ls -d *)
|
||||
|
||||
echo "kernel version is $version"
|
||||
|
||||
Reference in New Issue
Block a user