summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/kopt2mod22
1 files changed, 22 insertions, 0 deletions
diff --git a/scripts/kopt2mod b/scripts/kopt2mod
new file mode 100755
index 00000000..adb95787
--- /dev/null
+++ b/scripts/kopt2mod
@@ -0,0 +1,22 @@
+#!/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)
+ #echo "Jetz is $CURRENT dran"
+ continue
+ fi
+ [ -z "$CURRENT" ] && continue
+ MOD="$(echo "$line" | grep -o -E "called [a-z0-9_\-]+\." | awk '{print $2}')ko"
+ [[ "$MOD" == "ko" ]] && continue
+ echo "$CURRENT aktiviert $(dirname $file)/$MOD"
+ CURRENT=
+ done < "$file"
+done
+