diff options
author | Jonathan Bauer | 2014-05-08 14:54:06 +0200 |
---|---|---|
committer | Jonathan Bauer | 2014-05-08 14:54:06 +0200 |
commit | f535f0e0b00c167dbaf9874dc1e442ca38053f7c (patch) | |
tree | 83451303192865932a133c8eea1b2ecce9c616e4 /scripts/kopt2mod | |
parent | [one-time-fix] first check if xfce4 is installed before installing greybird t... (diff) | |
download | tm-scripts-f535f0e0b00c167dbaf9874dc1e442ca38053f7c.tar.gz tm-scripts-f535f0e0b00c167dbaf9874dc1e442ca38053f7c.tar.xz tm-scripts-f535f0e0b00c167dbaf9874dc1e442ca38053f7c.zip |
added helper script to determine which kernel module is activated by which kernel CONFIG_* option
Diffstat (limited to 'scripts/kopt2mod')
-rwxr-xr-x | scripts/kopt2mod | 22 |
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 + |