]> git.pld-linux.org Git - projects/geninitrd.git/commitdiff
libcrc32c (kernel 3.8+) needs some crc32 library but it doesn't depend on it directly...
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Fri, 4 Jan 2013 20:33:36 +0000 (20:33 +0000)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Fri, 4 Jan 2013 20:33:36 +0000 (20:33 +0000)
svn-id: @12612

geninitrd

index b97a8685a1f9d208c8b846675357414b8d68d645..42046a2f6bdd8b64b5294887bd5bc36a4972734f 100755 (executable)
--- a/geninitrd
+++ b/geninitrd
@@ -332,6 +332,15 @@ ikconfig() {
        /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
@@ -366,9 +375,23 @@ find_depmod() {
                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
 }
This page took 0.278195 seconds and 4 git commands to generate.