Allow to skip non-existent modules. For custom kernels.
svn path=/nixpkgs/trunk/; revision=11273
This commit is contained in:
parent
71d50c6b25
commit
4eaf33cc7a
|
@ -3,11 +3,12 @@
|
|||
# the modules identified by `rootModules', plus their dependencies.
|
||||
# Also generate an appropriate modules.dep.
|
||||
|
||||
{stdenv, kernel, rootModules, module_init_tools}:
|
||||
{stdenv, kernel, rootModules, module_init_tools, allowMissing ? false}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = kernel.name + "-shrunk";
|
||||
builder = ./modules-closure.sh;
|
||||
inherit kernel rootModules module_init_tools;
|
||||
allowedReferences = ["out"];
|
||||
allowMissing = if allowMissing then "true" else "";
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ closure=
|
|||
for module in $rootModules; do
|
||||
echo "root module: $module"
|
||||
deps=$(modprobe --config /dev/null --set-version "$version" --show-depends "$module" \
|
||||
| sed 's/^insmod //')
|
||||
| sed 's/^insmod //') || if test -z "allowMissing"; then exit 1; fi
|
||||
#for i in $deps; do echo $i; done
|
||||
closure="$closure $deps"
|
||||
done
|
||||
|
|
Loading…
Reference in a new issue