aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2010-08-05 16:35:36 +0300
committerTimo Teräs <timo.teras@iki.fi>2010-08-05 16:35:36 +0300
commit8ba483db1341827e6d511df78af7c31554b14bfb (patch)
tree1acd02bc354d5589d52eec408346972add9d3397
parent6aa2c66ed40e1547eb211e131423ddc6dd81a2b2 (diff)
downloadmkinitfs-8ba483db1341827e6d511df78af7c31554b14bfb.tar.bz2
mkinitfs-8ba483db1341827e6d511df78af7c31554b14bfb.tar.xz
mkinitfs: fix kernel module dependency checking
The awk script parses modules.dep which contains only relative modulenames. Fix the code to feed only relative names to the awk script so we get the real dependencies out. Also add "prepend" to awk so it outputs absolute paths suitable for copying the files.
-rwxr-xr-xmkinitfs.in6
1 files changed, 3 insertions, 3 deletions
diff --git a/mkinitfs.in b/mkinitfs.in
index 3a3bcd3..f700fe3 100755
--- a/mkinitfs.in
+++ b/mkinitfs.in
@@ -76,7 +76,7 @@ initfs_base() {
}
find_kmod_deps() {
- awk -v modulesdep="$basedir/lib/modules/$kernel/modules.dep" '
+ awk -v prepend="$basedir/lib/modules/$kernel/" -v modulesdep="$basedir/lib/modules/$kernel/modules.dep" '
function recursedeps(k, j, dep) {
if (k in visited)
return;
@@ -84,7 +84,7 @@ function recursedeps(k, j, dep) {
split(deps[k], dep, " ");
for (j in dep)
recursedeps(dep[j]);
- print(k);
+ print(prepend k);
}
BEGIN {
@@ -113,7 +113,7 @@ find_kmods() {
echo "$file: No such file or directory" >&2
continue
fi
- echo /lib/modules/$kernel/$file
+ echo $file
done | find_kmod_deps
}