From a1c547e7e8e5c4a420a763451eb6af49b329af68 Mon Sep 17 00:00:00 2001 From: Jan Steffens Date: Tue, 15 Jun 2010 17:00:54 +0200 Subject: Implement explicit module depends Needed to get libcrc32c and therefore btrfs to work. Also remove the equivalent section in autodetect, which wasn't working anyway. --- functions | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'functions') diff --git a/functions b/functions index 49b4ab4..91145f1 100644 --- a/functions +++ b/functions @@ -145,9 +145,11 @@ HAS_MODULES="n" #modules are handled specially in order to enable autodetection add_module () { - local fil path fw mod deps - #cleanup - remove .ko, replace - and _ with [-_] to match either - fil=$(basename "${1}" | sed -e "s|[-_]|\[-_\]|g" -e "s|\.ko$||g") + local m fil path fw mod deps + #cleanup - remove .ko, replace - with _ + m=$(basename "${1}" | sed -e 's|-|_|g' -e 's|\.ko$||g') + #find pattern - replace _ with [-_] to match either + fil=$(echo "$m" | sed -e 's|_|\[-_\]|g') found=0 for path in $(find "${MODULEDIR}" -type f -name "${fil}.ko"); do @@ -164,8 +166,15 @@ add_module () HAS_MODULES="y" add_file "${path}" && found=1 done - if [ ${found} -eq 0 ]; then - err "module '$fil' not found" + if [ ${found} -eq 1 ]; then + #explicit module depends + case "$m" in + fat) add_module "nls_cp437" ;; + ocfs2) add_module "configfs" ;; + libcrc32c) add_module "crc32c"; add_module "crc32c_intel" ;; + esac + else + err "module '$m' not found" fi } -- cgit v1.2.3-24-g4f1b