diff options
author | Tobias Powalowski <tobias@T-POWA-LX.(none)> | 2009-05-24 11:33:29 +0200 |
---|---|---|
committer | Tobias Powalowski <tobias@T-POWA-LX.(none)> | 2009-05-24 11:33:29 +0200 |
commit | b160fbb58eacfd9981d81812ecf10cae544ea2bf (patch) | |
tree | ae9c9c78fb68e64fa83767088dccb3dd7f20aa56 /functions | |
parent | c420367da1a6788ea1429166e06e3149d894559b (diff) | |
download | mkinitcpio-b160fbb58eacfd9981d81812ecf10cae544ea2bf.tar.gz mkinitcpio-b160fbb58eacfd9981d81812ecf10cae544ea2bf.tar.xz |
'added firmware parsing to add_modules #14783'0.5.24
Diffstat (limited to 'functions')
-rw-r--r-- | functions | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -145,12 +145,17 @@ HAS_MODULES="n" #modules are handled specially in order to enable autodetection add_module () { - local fil path mod deps + 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") found=0 for path in $(find "${MODULEDIR}" -type f -name "${fil}.ko"); do + #get needed firmware files + for fw in $(/sbin/modinfo -F firmware "${path}"); do + [ -f "/lib/firmware/$fw" ] && add_file "/lib/firmware/$fw" + done + #get module depends for mod in $(/sbin/modinfo -F depends "${path}" | tr ',' ' '); do if [ -n "${mod}" ]; then add_module "${mod}" |