/lib/geninitrd/extract-ikconfig /boot/vmlinuz-$kernel
}
+# @param $module
+basename_module() {
+ local module=$1
+
+ module=${module##*/}
+ module=${module%$modext*}
+ echo $module
+}
+
# Finds module dependencies
#
# @param $module
warn "If $module isn't compiled in kernel then this initrd may not start your system."
fi
+ local smodule
+
echo "$modprobe" | \
while read insmod modpath options; do
- [ "$insmod" = "insmod" ] && echo $modpath
+ if [ "$insmod" = "insmod" ]; then
+
+ # XXX: find a away to autodetect
+ smodule=$(basename_module $modpath)
+ case "$smodule" in
+ libcrc32c)
+ find_depmod "-crc32c-intel"
+ find_depmod "-crc32c"
+ ;;
+ esac
+
+ echo $modpath
+ fi
done
return 0
}