5 # ***************************************************************************
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 # * All rights reserved. Ralink's source code is an unpublished work and the
14 # * use of a copyright notice does not imply otherwise. This source code
15 # * contains confidential trade secret material of Ralink Tech. Any attemp
16 # * or participation in deciphering, decoding, reverse engineering or in any
17 # * way altering the source code is stricitly prohibited, unless the prior
18 # * written consent of Ralink Technology, Inc. is obtained.
25 $ECHO "Configuration failed"
33 #=======================================================================
37 rm -f $CONFIG $CONFIG_MK $MODVER
38 cat << 'EOF' > $CONFIG
40 # Automatically generated by 'make config' -- don't edit!
45 value
=`eval $ECHO '$'$1`
46 $ECHO "$1"=\"$value\" >> $CONFIG
47 $ECHO "$1=$value" >> $CONFIG_MK
53 if [ "$PROMPT" = "y" ] ; then
56 if [ -n "$tmp" ] ; then eval $3=\"$tmp\" ; fi
63 default
=`eval $ECHO '$'$2`
64 prompt
"$1" "`$ECHO $default`" answer
70 if [ $VERSION_CODE -gt `version 2 6 0` ] ; then
72 $ECHO " This kernel greater than 2.6.0 . $DRIVEROBJ"
73 PROBEPATH
=/etc
/modprobe.conf
74 $ECHO " PROBEPATH = $PROBEPATH."
77 PROBEPATH
=/etc
/modules.conf
78 $ECHO " PROBEPATH = $PROBEPATH."
81 DRIVERPATH
=$value$DRIVEROBJ
82 $ECHO "$1"=\"$value\""$CUR_RELEASE" >> $CONFIG
83 $ECHO "$1=$value""$DRIVEROBJ" >> $CONFIG_MK
84 $ECHO "PPWDD"=\"$value\" >> $CONFIG
85 $ECHO "PPWDD=$value" >> $CONFIG_MK
89 $ECHO "-------------------- Ralink RT2500 Station Configuration -------------------- "
92 CUR_RELEASE
=`uname -r`
93 LINUX_SRC
=/usr
/src
/linux-
$CUR_RELEASE
95 if [ ! -d $LINUX_SRC ] ; then
96 ask_str
" Linux kernel source directory" LINUX_SRC
98 if [ ! -d $LINUX_SRC ] ; then
99 $ECHO "Linux source tree '$LINUX_SRC' is incomplete or missing!"
104 $ECHO " Linux kernel source directory : $LINUX_SRC"
109 # What kernel are we compiling for?
112 expr $1 \
* 65536 + $2 \
* 256 + $3
115 for TAG
in VERSION PATCHLEVEL SUBLEVEL
; do
116 eval `sed -ne "/^$TAG/s/[ ]//gp" $LINUX_SRC/Makefile`
119 VERSION_CODE
=`version $VERSION $PATCHLEVEL $SUBLEVEL`
120 if [ $VERSION_CODE -lt `version 2 2 0` ] ; then
121 $ECHO "This package requires at least a 2.2.x series kernel."
125 MODDIR
=/lib
/modules
/$CUR_RELEASE
126 TARGET_MODDIR
=$MODDIR
128 if [ -d $MODDIR/kernel
/drivers
/net
] ; then
129 MODDIR
=$MODDIR/kernel
/drivers
/net
131 ask_str
" Module install directory" MODDIR
132 if [ ! -d $MODDIR ] ; then
133 $ECHO "Module install directory '$MODDIR' is incomplete or missing!"
138 $ECHO " Module install directory : $MODDIR"
141 TARGET_MODDIR
=$MODDIR
142 write_str TARGET_MODDIR