7 # * 4F, No. 2 Technology 5th Rd. *
8 # * Science-based Industrial Park *
9 # * Hsin-chu, Taiwan, R.O.C. *
11 # * (c) Copyright 2002, Ralink Technology, Inc. *
13 # * This program is free software; you can redistribute it and/or modify *
14 # * it under the terms of the GNU General Public License as published by *
15 # * the Free Software Foundation; either version 2 of the License, or *
16 # * (at your option) any later version. *
18 # * This program is distributed in the hope that it will be useful, *
19 # * but WITHOUT ANY WARRANTY; without even the implied warranty of *
20 # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
21 # * GNU General Public License for more details. *
23 # * You should have received a copy of the GNU General Public License *
24 # * along with this program; if not, write to the *
25 # * Free Software Foundation, Inc., *
26 # * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
33 $ECHO "Configuration failed"
41 #=======================================================================
45 rm -f $CONFIG $CONFIG_MK $MODVER
46 cat << 'EOF' > $CONFIG
48 # Automatically generated by 'make config' -- don't edit!
53 value
=`eval $ECHO '$'$1`
54 $ECHO "$1"=\"$value\" >> $CONFIG
55 $ECHO "$1=$value" >> $CONFIG_MK
61 if [ "$PROMPT" = "y" ] ; then
64 if [ -n "$tmp" ] ; then eval $3=\"$tmp\" ; fi
71 default
=`eval $ECHO '$'$2`
72 prompt
"$1" "`$ECHO $default`" answer
80 $ECHO "-------------------- Ralink RT2500 Station Configuration -------------------- "
83 CUR_RELEASE
=`uname -r`
84 LINUX_SRC
=/usr
/src
/linux-
$CUR_RELEASE
86 if [ ! -d $LINUX_SRC ] ; then
87 ask_str
" Linux kernel source directory" LINUX_SRC
89 if [ ! -d $LINUX_SRC ] ; then
90 $ECHO "Linux source tree '$LINUX_SRC' is incomplete or missing!"
95 $ECHO " Linux kernel source directory : $LINUX_SRC"
100 # What kernel are we compiling for?
103 expr $1 \
* 65536 + $2 \
* 256 + $3
106 for TAG
in VERSION PATCHLEVEL SUBLEVEL
; do
107 eval `sed -ne "/^$TAG/s/[ ]//gp" $LINUX_SRC/Makefile`
110 VERSION_CODE
=`version $VERSION $PATCHLEVEL $SUBLEVEL`
111 if [ $VERSION_CODE -lt `version 2 2 0` ] ; then
112 $ECHO "This package requires at least a 2.2.x series kernel."
116 MODDIR
=/lib
/modules
/$CUR_RELEASE
117 TARGET_MODDIR
=$MODDIR
119 if [ -d $MODDIR/kernel
/drivers
/net
] ; then
120 MODDIR
=$MODDIR/kernel
/drivers
/net
122 ask_str
" Module install directory" MODDIR
123 if [ ! -d $MODDIR ] ; then
124 $ECHO "Module install directory '$MODDIR' is incomplete or missing!"
129 $ECHO " Module install directory : $MODDIR"
132 TARGET_MODDIR
=$MODDIR
133 write_str TARGET_MODDIR