I get error "could not determine a proper UTS_RELEASE" I've attached The scanModem and the configure script. I've tried to configure all of the 2.6 compatable sources in http://linmodems.technion.ac.il/pctel-linux/ with no luck. May be some one can sugest a work around or a patch for the script. I'm on Gentoo with kernel-2.6.18-gentoo-r5.
Only plain text email is forwarded by the DISCUSS@xxxxxxxxxxxxx List Server. Do use the following as the email Subject Line: SomeName, YourCountry This is kernel 2.6.18-gentoo-r5 This will alert cogent experts, and distinguish cases in the Archives. YourCountry will enable Country Code guidance. Occassionally responses are blocked by an Internet Provider mail filters. So in a day, also check the Archived responses at http://www.linmodems.org . Local Linux experts can be found through: http://www.linux.org/groups/index.html -------------------------- System information ---------------------------- CPU=i686, This is Linux version 2.6.18-gentoo-r5 (root@santa) (gcc version 4.1.1 (Gentoo 4.1.1-r1)) #7 PREEMPT Sat Jan 6 20:56:43 NZDT 2007 scanModem update of: 2006_Jan_13 USB modem not detected by lsusb Modem or host audio card candidates have firmware information: PCI slot PCI ID SubsystemID Name ---------- --------- --------- -------------- 00:0a.0 134d:7891 134d:0001 Modem: PCTel Inc HSP MicroModem 56 Modem interrupt assignment and sharing: 10: 11450501 XT-PIC eth0 --- Bootup diagnositcs for card in PCI slot 00:0a.0 ---- === Finished modem firmware and bootup diagnostics section. === === Next deducing cogent software === For candidate modem in PCI bus: 00:0a.0 Class 0703: 134d:7891 Modem: PCTel Inc HSP MicroModem 56 Primary PCI_id 134d:7891 Support type needed or chipset: PCTEL At http://linmodems.technion.ac.il/pctel-linux Get the pctel-0.9.7-9-rht-6.tar.gz Unpack under Linux with: tar zxf pctel*.tar.gz and read instuctions therein. Read Pctel.txt and Modem/YourSystem.txt for follow through guidance. Writing Pctel.txt Completed candidate modem analyses. The base of the UDEV device file system is: /dev/.udev Versions adequately match for the compiler installed: 4.1.1 and the compiler used in kernel assembly: 4.1.1 Kernel-header resources needed for compiling are not manifestly ready! If compiling is necessary packages must be installed, providing: kernel-source-2.6.18-gentoo-r5 Checking pppd properties: -r-s--x--x 1 root root 213464 2006-11-29 23:20 /usr/sbin/pppd In case of an "error 17" "serial loopback" problem, see: http://phep2.technion.ac.il/linmodems/archive-sixth/msg02637.html To enable dialout without Root permission do: $ su - root (not for Ubuntu) chmod a+x /usr/sbin/pppd or under Ubuntu related Linuxes chmod a+x /usr/sbin/pppd Checking settings of: /etc/ppp/options lock In case of a message like: Warning: Could not modify /etc/ppp/pap-secrets: Permission denied see http://linmodems.technion.ac.il/bigarch/archive-sixth/msg04656.html Read Modem/YourSystem.txt concerning other COMM channels: eth0 Which can interfere with Browser naviagation. Don't worry about the following, it is for the experts should trouble shooting be necessary. ========================================================== KERNEL=="slamr", NAME="slamr0" GROUP="dialout" KERNEL=="slusb", NAME="slusb0" GROUP="dialout" # # UDEV rule for ltmodem # creates symlink /dev/modem to /dev/ttyLT?, and takes care of permissions KERNEL=="ttyLTM[0-9]", NAME="%k", MODE="0660", GROUP="dialout", SYMLINK="modem" Checking for modem support lines: -------------------------------------- /device/modem symbolic link: slmodemd created symbolic link /dev/ttySL0: Within /etc/udev/ files: /etc/udev/rules.d/55-ltmodem.rules:# UDEV rule for ltmodem /etc/udev/rules.d/55-ltmodem.rules:# creates symlink /dev/modem to /dev/ttyLT?, and takes care of permissions /etc/udev/rules.d/55-ltmodem.rules:KERNEL=="ttyLTM[0-9]", NAME="%k", MODE="0660", GROUP="dialout", SYMLINK="modem" Within /etc/modprobe.conf files: /etc/modprobe.conf:alias /dev/modem ltserial Within any ancient /etc/devfs files: Within ancient kernel 2.4.n /etc/module.conf files: /etc/modules.conf:### modules-update: start processing /etc/modules.d/ltmodem /etc/modules.conf:alias /dev/modem ltserial /etc/modules.conf:### modules-update: end processing /etc/modules.d/ltmodem /etc/modules.conf:### modules-update: start processing /etc/modules.d/slmodem /etc/modules.conf:# slmodem 2.9.x kernel modules' configuration file /etc/modules.conf:### modules-update: end processing /etc/modules.d/slmodem /etc/modules.conf.old:### modules-update: start processing /etc/modules.d/slmodem /etc/modules.conf.old:# slmodem 2.9.x kernel modules' configuration file /etc/modules.conf.old:### modules-update: end processing /etc/modules.d/slmodem /etc/modules.d/ltmodem:alias /dev/modem ltserial /etc/modules.d/slmodem:# slmodem 2.9.x kernel modules' configuration file --------- end modem support lines --------
#!/bin/bash # configure script for pctel based modems # (w) by J. Stifter # $Id: configure,v 1.15 2006/04/04 14:47:05 robert Exp $ # # Modified to detect 8086:24c6 (Intel 82801DCM AC'97 Modem Controller) # Robert Thornburrow <robert.thornburrow@xxxxxxxxxxxxxxxx> 09/04/2004 # # Modified to detect type of tty_struct.count for Fedora Kernels # Robert Thornburrow <robert.thornburrow@xxxxxxxxxxxxxxxx> 21/04/2004 # # Modified to cope with 2.6 kernels. Also removed -DAUDIO_ROUTING from via686a # and sis builds, as the libraries are missing the necessary symbols. They did # appear in 0.9.7-6, but not in 0.9.7-9, upon which this build is based. # Robert Thornburrow <robert.thornburrow@xxxxxxxxxxxxxxxx> 30/03/2005 # # Modified to cope with SuSE 9.3 kernel source includes. The asm/mach-default # directory is not under /lib/modules/`uname -n`/build, instead we must revert # to /usr/src/linux. Thanks to Jeff Trull for this. # Robert Thornburrow <robert.thornburrow@xxxxxxxxxxxxxxxx> 22/07/2005 # # Modified to cope with "lspci -n" in Debian Sarge. This does not output the # word "Class" in the second column and throws the auto detection out. Thanks # to Martin Campbell for reporting this. # Robert Thornburrow <robert.thornburrow@xxxxxxxxxxxxxxxx> 22/07/2005 # version=0.9.7-9-rht-6 ################################################################## # change the parameters below, if needed (this is normally only # needed if you don't have a /lib/modules/<kernel>/build link). ################################################################## kernel_src=/usr/src/linux kernel_inc=${kernel_src}/include ################################################################## ################################################################ # autodetection # orignally (w) by Basilio Kublik & others # Some of this code was shamelessly stolen from the lucent # driver's scanPCI script ################################################################ # returns: target: pct789, cm8738, i8xx, sis, via686a, error ################################################################ function autodetection { echo -n "detecting your modem..." target=error LSPCI_PATH="/bin /usr/bin /sbin /usr/sbin" for i in ${LSPCI_PATH} do if [ -x ${i}/lspci ] then LSPCI=${i}/lspci fi done if [ ! -x "${LSPCI}" ] then echo '** error' echo "lspci not found in ${LSPCI_PATH}" return fi # The following modems are autodetected (note that detecting an AC'97 # controller is no guarentee that the codec behind it is supported): # # 134d:7890-7 PCtel HSP MicroModem 56 # 13f6:0211 C-Media CM8738 # 8086:2416 Intel 82801AA (ICHAA) AC'97 Modem Controller # 8086:2446 Intel 82801BA/BAM (ICH2) AC'97 Modem Controller # 8086:2486 Intel 82801CA/CAM (ICH3) AC'97 Modem Controller # 8086:24c6 Intel 82801DB/DBM (ICH4) AC'97 Modem Controller # 8086:7196 Intel 82440MX (Banister) AC'97 Modem Controller # 1039:7013 SiS AC'97 Modem Controller # 1106:3068 VIA 686A AC'97 Modem Controller # DEVICES="0x134d:0x7890-0x7897" DEVICES="${DEVICES} 0x13f6:0x0211" DEVICES="${DEVICES} 0x8086:0x2416" DEVICES="${DEVICES} 0x8086:0x2446" DEVICES="${DEVICES} 0x8086:0x2486" DEVICES="${DEVICES} 0x8086:0x24c6" DEVICES="${DEVICES} 0x8086:0x7196" DEVICES="${DEVICES} 0x1039:0x7013" DEVICES="${DEVICES} 0x1106:0x3068" found="no" # Test the lspci output to see if the 2nd column is "Class" # If yes, the pci id if field 4, else it is field 3 class=`${LSPCI} -n | head -1 | cut -d' ' -f2` if [ ${class} = "Class" ] ; then fid=4 else fid=3 fi for PCIDEV in `${LSPCI} -n | cut -d' ' -f${fid}` do DEVVEN=$(( 0x`echo ${PCIDEV} | cut -d':' -f1` + 0 )) DEVNUM=$(( 0x`echo ${PCIDEV} | cut -d':' -f2` + 0 )) for DEV in ${DEVICES} do VENDOR=$(( `echo ${DEV} | cut -d':' -f1` + 0 )) DEVMIN=$(( `echo ${DEV} | cut -d':' -f2 | cut -d'-' -f1` + 0 )) DEVMAX=$(( `echo ${DEV} | cut -d':' -f2 | cut -d'-' -f2` + 0 )) if [ ${DEVVEN} -eq ${VENDOR} -a ${DEVNUM} -ge ${DEVMIN} -a ${DEVNUM} -le ${DEVMAX} ] then found="yes" MODEM_VENDOR=0x`echo ${PCIDEV} | cut -d':' -f1` fi done if test $found = "yes"; then eval test \"\$modem_${MODEM_VENDOR}\" = yes && continue eval modem_${MODEM_VENDOR}=yes for i in $MODEM_VENDOR do case "${i}" in "0x134d") target=pct789 ;; "0x13f6") target=cm8738 ;; "0x8086") target=i8xx ;; "0x1039") target=sis ;; "0x1106") target=via686a ;; esac done fi done if [ "${found}" = "no" ]; then echo '** error' echo "autodetection failed, your modem is not in the database of" echo "known modems. Try to guess the hal and report success, if" echo "the modem worked. Please read the FAQ about autodetection" echo "failed." else echo "found. Your modem is a ${target} type modem." fi } ################################################################ # manual hal input ################################################################ # returns: target: pct789, cm8738, i8xx, sis, via686a, error ################################################################ function manual_hal_input { target="error" while [ ${target} = "error" ] do unset audio_routing echo echo please enter your hal type echo "choose one of: pct789, cm8738, i8xx, sis, via686a" echo -n "hal type: " read hal hal="`echo ${hal} | tr A-Z a-z`" case "${hal}" in pct789) target=${hal} ;; cm8738) target=${hal} ;; i8xx) target=${hal} ;; sis) target=${hal} ;; via686a) target=${hal} ;; *) echo "** error: unknown hal" esac done } ################################################################ # find_kernel_includes ################################################################ # returns: $kernel_inc=error or path to kernel includes ################################################################ function find_kernel_includes { echo -n "searching for kernel includes..." # look in /lib/modules/<kernel>/build/include if [ -r "/lib/modules/`uname -r`/build/include/linux/version.h" ] then kernel_src="/lib/modules/`uname -r`/build" kernel_inc="${kernel_src}/include" echo found at ${kernel_inc} return fi # look in $kernel_inc (defaults to /usr/src/linux) if [ -r "$kernel_inc/linux/version.h" ] then echo found at ${kernel_inc} return fi # automatic search: look 1.) in /usr/src/linux* and 2. in /usr/src/* v=`find /usr/src/linux* -name "version.h" 2>/dev/null | \ grep "include/linux/version.h" | head -1` if [ -z $v ] then v=`find /usr/src/ -name "version.h" 2>/dev/null | \ grep "include/linux/version.h" | head -1` fi if [ -z $v ] then echo "** error" echo "could not find any kernel sources in /usr/src" kernel_inc=error else kernel_inc=`echo ${v%linux\/version.h}` kernel_src=`dirname ${kernel_inc}` echo found at $kernel_inc return fi # manual input, ask user about the sources echo you have either not installed your kernel sources echo or your kernel sources are installed in another place then echo /usr/src/ echo -n "please enter your correct kernel source tree, e.g. /usr/src/linux: " read kernel_src kernel_inc=${kernel_src}/include if [ ! -r "${kernel_inc}/linux/version.h" ] then echo "** error" echo "could not find a version.h file at these kernel sources" echo "please read the FAQ about installation requirements" kernel_inc=error return fi echo found version.h at ${kernel_inc} } ################################################################## # 0) checking params ################################################################## if [ "$1" = "-auto" ] then auto_detection=1 auto_install=1 elif [ "$1" = "-manual" ] then auto_detection=0 auto_install=0 else echo " use -auto to try to guess your modem and install it automatically" echo " use -manual to only generate the makefile" exit 1 fi ################################################################## # 1) determination of system specific values ################################################################## # # find out kernel version and link ptserial.c # echo -n "checking for running kernel version..." if [[ `perl -v` ]] then kernel_version=`uname -r` else echo '** error' echo "couldn't find perl to determine your kernel version." echo -n "please type your running kernel version, e.g. 2.4.7-ac2 manually: " read kernel_version fi main=`echo ${kernel_version} | perl -e 'while(<>){ /^([0-9]*)\.([0-9]*)\.([0-9]*).*$/ ; print "$1\n"; }'` mid=`echo ${kernel_version} | perl -e 'while(<>){ /^([0-9]*)\.([0-9]*)\.([0-9]*).*$/ ; print "$2\n"; }'` sub=`echo ${kernel_version} | perl -e 'while(<>){ /^([0-9]*)\.([0-9]*)\.([0-9]*).*$/ ; print "$3\n"; }'` if [ ${main} -ne 2 ] then echo '** error' echo your kernel version is: ${main}.${mid}.${sub} echo this package supports only 2.4 and 2.6 kernels. exit 1 fi if [ ${mid} -ne 4 -a ${mid} -ne 6 ] then echo "** error" echo your kernel version is: $main.$mid.$sub echo this package supports only 2.4 and 2.6 kernels. exit 1 fi echo "${main}.${mid}.${sub}" # # clean everything # rm -f Makefile make -f Makefile-${main}.${mid}.in clean >/dev/null # # use either ptserial-2.4.6, ptserial-2.4.7 ((2.4.7 and later) or # ptserial-2.6 (2.6.0 and later) # echo -n "checking for ptserial..." if [ ${mid} -eq 4 ] then if [ ${sub} -lt 7 ] then ptserial=ptserial-2.4.6.c else ptserial=ptserial-2.4.7.c fi else ptserial=ptserial-2.6.c fi echo $ptserial # # find out gcc # echo -n "checking for gcc..." gcc_version=`gcc -dumpversion` if [ -z $gcc_version ] then echo "** error" echo no suitable gcc version could be found. echo please install gcc. exit 1 fi echo "$gcc_version" # # find kernel sources # find_kernel_includes if [ $kernel_inc = "error" ] then exit 1 fi # # find modversions.h (2.4) or autoconf.h (2.6) # on 2.6 check for asm/mach-default and modpost # if [ ${mid} -eq 4 ] then echo -n "checking for modversions.h..." if [ ! -r ${kernel_inc}/linux/modversions.h ] then echo "** error" echo modversions.h could not be found echo you probably need to configure your kernel, please read the FAQ echo about no modversions.h file. exit 1 fi modversions=${kernel_inc}/linux/modversions.h echo "${modversions}" unset extra_includes else echo -n "checking for autoconf.h..." if [ ! -r ${kernel_inc}/linux/autoconf.h ] then echo "** error" echo autoconf.h could not be found echo you probably need to configure your kernel, please read the FAQ echo about no autoconf.h file. exit 1 fi modversions=${kernel_inc}/linux/autoconf.h echo "${modversions}" echo -n "checking for asm/mach-default..." if [ ! -d ${kernel_inc}/asm/mach-default ] then # SuSE 9.3 doesn't have 'asm' under the build directory, so revert to # /usr/src/linux if [ -d /usr/src/linux/include/asm/mach-default ] then kernel_inc=/usr/src/linux/include else echo "** error" echo include/asm/mach-default directory could not be found echo you probably need to configure your kernel, please read the FAQ echo about no include/asm/mach-default directory. exit 1 fi fi echo "yes" extra_includes=-I${kernel_inc}/asm/mach-default #echo -n "checking for modpost..." #if [ ! -x ${kernel_src}/scripts/modpost ] #then # echo "** error" # echo modpost executable could not be found # echo you probably need to configure your kernel, please read the FAQ # echo about no modpost executable. # exit 1 #fi #echo "yes" #modpost=${kernel_src}/scripts/modpost fi # # find out exact kernel version from version.h file # echo -n "checking for kernel version in version.h..." cat >t.c <<EOF #include "cat uname -a" #include <stdio.h> #include "$kernel_inc/linux/version.h" int main() { printf("%s\n", UTS_RELEASE); return 0; } EOF gcc -I${kernel_inc} -o t t.c uts_release=`./t` rm ./t ./t.c if [ -z ${uts_release} ] then echo "** error" echo "could not determine a proper UTS_RELEASE" exit 1 fi echo "UTS_RELEASE is ${uts_release}" # # are we on a system with tty_struct.count defined as an atomic_t # echo -n "checking type of tty_struct.count..." cat >t.c << EOF #include "linux/tty.h" int main() { struct tty_struct tty; if( atomic_read(&tty.count) == 1 ) {} return 0; } EOF gcc -D__KERNEL__ -I${kernel_inc} -o t t.c >/dev/null 2>&1 tty_count_atomic=$? rm -f ./t ./t.c if [ ${tty_count_atomic} -eq 0 ] then echo "atomic_t" have_tty_count_atomic=-DHAVE_TTY_COUNT_ATOMIC else echo "int" unset have_tty_count_atomic fi # # does this system have udev? # apply conservative rules for detecting this: # if there is NO evidence of devfs (no kernel config, no special devfsd file, no process) # OR this is a kernel in which devfs was no longer supported (2.6.13 and later) # AND the udevd process and special file are present, we assume udev # echo -n "checking for presence of udev..." if [ ${main} -eq 2 -a ${mid} -eq 6 ] && ( ps -C udevd > /dev/null ) && [ -d /etc/udev/rules.d ] then if [ ${sub} -ge 13 ] then echo "present (kernel version 2.6.13 or later)" have_udev=TRUE elif grep 'CONFIG_DEVFS_FS 1' ${kernel_inc}/linux/autoconf.h > /dev/null then echo "not present (devfs is configured in kernel)" unset have_udev elif ps -C devfsd > /dev/null then echo "not present (devfsd is running)" unset have_udev elif [ -a /dev/.devfsd ] then echo "not present (/dev/.devfsd exists)" unset have_udev else echo "present" have_udev=TRUE fi else echo "not present (udevd process or /etc/udev/rules.d missing)." echo "using old /dev/modem link approach" unset have_udev fi ################################################################## # 2) determination of HAL type ################################################################## if [ ${auto_detection} = "1" ] then autodetection if [ $target = "error" ] then manual_hal_input fi else manual_hal_input fi if [ ${target} = "error" ] then exit 1 fi # # report error if an AMR modem under 2.6 # if [ ${main} -eq 2 -a ${mid} -eq 6 ] then case "${target}" in "i8xx"|"sis"|"via686a") echo "** error" echo this driver does not support this kind of modem echo under 2.6 series kernels. Please use the SmartLink echo driver instead. exit 1 ;; esac fi ################################################################## # 3) configuration of the makefile ################################################################## case "${target}" in pct789) hal=HAL_PCT789 ;; cm8738) hal=HAL_CM8738 ;; i8xx) hal=HAL_I8XX audio_routing="-DAUDIO_ROUTING -DINTEL" ;; sis) hal=HAL_I8XX audio_routing="-DAUDIO_ROUTING -DSIS540" ;; via686a) hal=HAL_VIA686A audio_routing="-DVIA" ;; *) echo "** internal error" esac if [ ${mid} -eq 4 ] then cat >Makefile <<EOF # Makefile generated from configure at `date` # CFLAGS options KERNEL_DIR=${kernel_src} KERNEL_INC=${kernel_inc} GCC_VERSION=${gcc_version} VERSION=${version} MODVERSIONS=${modversions} EXTRA_INCLUDES=${extra_includes} UTS_RELEASE_PCTEL=${uts_release} HAL=${hal} AUDIOROUTING=${audio_routing} HAVE_TTY_COUNT_ATOMIC=${have_tty_count_atomic} # which ptserial to use PTSERIAL=${ptserial} # what to compile TARGET=${target} EOF else cat >Makefile <<EOF # Makefile generated from configure at `date` # CFLAGS options KERNEL_DIR=${kernel_src} KERNEL_VER=${uts_release} VERSION=${version} HAL=${hal} AUDIOROUTING=${audio_routing} TARGET=${target} # install options UDEV=${have_udev} EOF fi cat Makefile-${main}.${mid}.in >> Makefile