diff --git a/pkgs/build-support/kernel/modules-closure.sh b/pkgs/build-support/kernel/modules-closure.sh index 5658094872c8..220f3b00a771 100644 --- a/pkgs/build-support/kernel/modules-closure.sh +++ b/pkgs/build-support/kernel/modules-closure.sh @@ -56,4 +56,12 @@ for module in $closure; do done done +# copy module ordering hints for depmod +cp $kernel/lib/modules/"$version"/modules.order $out/lib/modules/"$version"/. +cp $kernel/lib/modules/"$version"/modules.builtin $out/lib/modules/"$version"/. + depmod -b $out -a $version + +# remove original hints from final derivation +rm $out/lib/modules/"$version"/modules.order +rm $out/lib/modules/"$version"/modules.builtin