Skip to content
Snippets Groups Projects
Commit 2e541151 authored by Jo-Philipp Wich's avatar Jo-Philipp Wich
Browse files

scripts: gen-dependencies.sh: fix kmod dependency generation


Do not output faulty ".ko" dependency if a scanned .ko file has an empty
"depends=" specification, also replace the `grep | sed | awk` chain with a
single sed program.

Signed-off-by: default avatarJo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 44206
parent 46b1577b
No related branches found
No related tags found
No related merge requests found
......@@ -28,8 +28,6 @@ tmp=`mktemp $TMP_DIR/dep.XXXXXXXX`
for kmod in `find $TARGETS -type f -name \*.ko`; do
$OBJCOPY -O binary -j .modinfo $kmod $tmp
sed -e 's,\x00,\n,g' $tmp | \
egrep -a '^depends=' | \
sed -e 's,^depends=,,' -e 's/,/\n/g' | \
awk '{ print $1 ".ko" }'
sed -ne '/^depends=.\+/ { s/^depends=//; s/\(,\|$\)/.ko\n/gp; q }'
done | sort -u
rm -f $tmp
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment