aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Gaffney <agaffney@gentoo.org>2008-02-03 19:41:08 +0000
committerAndrew Gaffney <agaffney@gentoo.org>2008-02-03 19:41:08 +0000
commit050a1da1d2308838edb5d92baf44179cf2cfc510 (patch)
tree7cf41defdccec986e6f736fd95d25393831fa585 /gen_moddeps.sh
parentAdd setup_hotplug() function that runs before the modules are loaded to setup... (diff)
downloadgenkernel-050a1da1d2308838edb5d92baf44179cf2cfc510.tar.gz
genkernel-050a1da1d2308838edb5d92baf44179cf2cfc510.tar.bz2
genkernel-050a1da1d2308838edb5d92baf44179cf2cfc510.zip
Add --all-initrd-modules option to copy all kernel modules into initrd/ramfs. This is useful for netboot images
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/genkernel/trunk@587 67a159dc-881f-0410-a524-ba9dfbe2cb84
Diffstat (limited to 'gen_moddeps.sh')
-rw-r--r--gen_moddeps.sh30
1 files changed, 20 insertions, 10 deletions
diff --git a/gen_moddeps.sh b/gen_moddeps.sh
index a699e66b..fa550e51 100644
--- a/gen_moddeps.sh
+++ b/gen_moddeps.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-modules_dep_list()
+modules_kext()
{
if [ "${PAT}" -gt "4" ]
then
@@ -8,6 +8,12 @@ modules_dep_list()
else
KEXT=".o"
fi
+ echo ${KEXT}
+}
+
+modules_dep_list()
+{
+ KEXT=$(modules_kext)
if [ -f ${INSTALL_MOD_PATH}/lib/modules/${KV}/modules.dep ]
then
cat ${INSTALL_MOD_PATH}/lib/modules/${KV}/modules.dep | grep ${1}${KEXT}\: | cut -d\: -f2
@@ -54,16 +60,20 @@ gen_deps()
gen_dep_list()
{
- local group_modules
- rm -f ${TEMP}/moddeps > /dev/null
+ if [ "${ALLINITRDMODULES}" = "1" ]; then
+ strip_mod_paths $(find "${INSTALL_MOD_PATH}/lib/modules/${KV}" -name "*$(modules_kext)") | sort
+ else
+ local group_modules
+ rm -f ${TEMP}/moddeps > /dev/null
- for group_modules in ${!MODULES_*}; do
- gen_deps ${!group_modules}
- done
+ for group_modules in ${!MODULES_*}; do
+ gen_deps ${!group_modules}
+ done
- # Only list each module once
- if [ -f ${TEMP}/moddeps ]
- then
- cat ${TEMP}/moddeps | sort | uniq
+ # Only list each module once
+ if [ -f ${TEMP}/moddeps ]
+ then
+ cat ${TEMP}/moddeps | sort | uniq
+ fi
fi
}