blob: 8eb540e425c5a3cddc0aeabed4eee9b13f35fc25 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#!/bin/bash
[ $# -ne 1 ] && echo "Usage: ./kopt2mod <kernel_source_dir>" && exit 1
FILES=$(find $1 -name Kconfig)
for file in $FILES; do
CURRENT=
while read line; do
if [[ "$line" =~ ^(config|menuconfig) ]]; then
CURRENT=$(awk '{print $2}' <<<$line)
continue
fi
[ -z "$CURRENT" ] && continue
MOD="$(echo "$line" | grep -o -E "called [a-z0-9_\-]+\." | awk '{print $2}')ko"
[[ "$MOD" == "ko" ]] && continue
echo "$CURRENT activates $(dirname $file)/$MOD"
CURRENT=
done < "$file"
done
|