summaryrefslogtreecommitdiffstats
path: root/functions
diff options
context:
space:
mode:
authorTobias Powalowski <tobias@T-POWA-LX.(none)>2009-05-24 11:33:29 +0200
committerTobias Powalowski <tobias@T-POWA-LX.(none)>2009-05-24 11:33:29 +0200
commitb160fbb58eacfd9981d81812ecf10cae544ea2bf (patch)
treeae9c9c78fb68e64fa83767088dccb3dd7f20aa56 /functions
parentc420367da1a6788ea1429166e06e3149d894559b (diff)
downloadmkinitcpio-b160fbb58eacfd9981d81812ecf10cae544ea2bf.tar.gz
mkinitcpio-b160fbb58eacfd9981d81812ecf10cae544ea2bf.tar.xz
'added firmware parsing to add_modules #14783'0.5.24
Diffstat (limited to 'functions')
-rw-r--r--functions7
1 files changed, 6 insertions, 1 deletions
diff --git a/functions b/functions
index 38bf6bf..502d1d9 100644
--- a/functions
+++ b/functions
@@ -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}"