From: Luis R. Rodriguez Date: Wed, 5 Aug 2009 18:53:44 +0000 (-0700) Subject: Add new select_drivers helper to select more than one driver X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=2598269058987c116b23f930386c3835f2b814c9;p=openwrt%2Fstaging%2Fblogic.git Add new select_drivers helper to select more than one driver Also add new "atheros" group which selects all atheros drivers, this includes zydas drivers included in compat-wireless. The "ath" group now only selects the drivers under drivers/net/wireless/ath/ Signed-off-by: Luis R. Rodriguez --- diff --git a/scripts/driver-select b/scripts/driver-select index df3c1013e8ac..e6f2ec32b77a 100755 --- a/scripts/driver-select +++ b/scripts/driver-select @@ -38,7 +38,8 @@ function usage { done echo -e "Supported group drivers:" - echo -e "\t${CYAN}ath${NORMAL} < ${PURPLE} ath5k ath9k ar9170 zd1211rw ${NORMAL}>" + echo -e "\t${CYAN}atheros${NORMAL} < ${PURPLE} ath5k ath9k ar9170 zd1211rw ${NORMAL}>" + echo -e "\t${CYAN}ath${NORMAL} < ${PURPLE} ath5k ath9k ar9170 ${NORMAL}>" #echo -e "\t${CYAN}iwlwifi${NORMAL} < ${PURPLE} iwl3945 iwlagn${NORMAL}>" echo -e "Restoring compat-wireless:" @@ -66,6 +67,23 @@ function select_driver perl -i -ne 'print if /'$1'/ ' $DRIVERS_MAKEFILE } +function select_drivers +{ + backup_file $DRIVERS_MAKEFILE + CONFIGS="" + COUNT=0 + for i in $@; do + if [[ "$CONFIGS" = "" ]]; then + CONFIGS="$i" + else + CONFIGS="${CONFIGS}|$i" + fi + done + echo -e "Configs: $CONFIGS" + egrep "$CONFIGS" $DRIVERS_MAKEFILE > ${DRIVERS_MAKEFILE}.tmp + mv ${DRIVERS_MAKEFILE}.tmp ${DRIVERS_MAKEFILE} +} + function disable_lib80211 { backup_file $NET_WIRELESS_MAKEFILE @@ -168,8 +186,13 @@ case $1 in restore) restore_compat ;; + atheros) + select_drivers CONFIG_ATH_COMMON \ + CONFIG_ZD1211RW + disable_var_01 + ;; ath) - select_driver CONFIG_ATH_COMMON + select_drivers CONFIG_ATH_COMMON disable_var_01 ;; ath5k)