Resolvendo problemas:
1-Como root:
2-tar xvfz pctel2419.tar.gz
3-cd pctel2419
4-[[email protected] root]# chmod 777 pctelinst
5-[[email protected] root]# ./pctelinst
Using /lib/modules/2.4.9/misc/pctel.o Using /lib/modules/2.4.9/misc/ptserial.o
Ou digitando como abaixo:
rm -f /dev/ttyS15 /dev/modemmknod /dev/ttyS15 c 62 79
chgrp uucp /dev/ttyS15
chmod 666 /dev/ttyS15ln -s /dev/ttyS15 /dev/modem
[[email protected] /root]# dmesg Linux version 2.4.19-pre2 ([email protected]) (gcc version 2.96 20000731 (Mandrake Linux 8.1 2.96-0.62mdk)) #8 Sáb Mar 9 13:57:15 BRT 2002
BIOS-provided physical RAM map: BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)
-----------------------
PCTel device[00:0c.1](0x61) found "C-Media Electronics Inc CM8738 (rev 10)", iobase=0xdc00, irq=11.
PCTel driver version 0.9.0 [5.05c-8.00-LN211] (CM8738) (2002-01-31) with MANY_PORTS SHARE_IRQ SERIAL_PCI enabled.
PCTel driver built on [Linux 2.4.19-pre2 i586 unknown "2.4.19-pre2 <132115>"] with gcc-2.96.
ttyS15 at 0xdc00 (irq = 11) is a PCTel PCTel initialization. Country code is 33.
[[email protected] /root]# lsmod
Module Size Used by
ppp_deflate 40800 1 (autoclean)
bsd_comp 4192 0 (autoclean)
ppp_async 6352 1 (autoclean)
ppp_generic 14464 3 (autoclean) [ppp_deflate bsd_comp ppp_async]
slhc 4608 1 (autoclean) [ppp_generic]
nls_iso8859-1 2880 1 (autoclean)
nls_cp437 4384 1 (autoclean)
vfat 9680 1 (autoclean)
fat 30592 0 (autoclean) [vfat]
ptserial 47664 2
pctel 697536 1 [ptserial]
autofs 9408 1 (autoclean)
dmfe 13024 0 (autoclean) (unused)
ide-scsi 7744 0
scsi_mod 51488 1 [ide-scsi]
usb-ohci 18736 0 (unused)
usbcore 34080 0 [usb-ohci]
[[email protected] /root]# ifconfig
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:6 errors:0 dropped:0 overruns:0 frame:0
TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
ppp0 Link encap:Point-to-Point Protocol
inet addr:200.201.147.162 P-t-P:200.201.145.194 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:18 errors:0 dropped:0 overruns:0 frame:0
TX packets:27 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
[[email protected] /root]# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
194.dial-up.tut * 255.255.255.255 UH 0 0 0 ppp0
127.0.0.0 * 255.0.0.0 U 0 0 0 lo default
194.dial-up.tut 0.0.0.0 UG 0 0 0 ppp0
6-[[email protected] root]#mcedit /etc/modules.conf
Verifique se tem as linhas abaixo no final do modules.conf
# for pctel modem
alias char-major-62 ptserial
below ptserial pctel
# country code for pctel modem
options ptserial country_code=33
7-Solucionando problemas:
Como:
7a- Unresolved symbols in /lib/modules/2.4.19-pre2/misc/***********
tar xvfz pctel2419.tar.gz
cd pctel2419
./fixscript ptserial.o /lib/modules/seu kernel/misc/ptserial.o isso pode demorar.
ou melhor
cd cd pctel2419
vi pctelinst
retire o #, abaixo
#./fixscript ptserial.o /lib/modules/`uname -r`/misc/ptserial.o
execute o comando abaixo:
./pctelinst
7b- init_module:input/output error Hint:insmod errors can be caused by incorrect module parameters, including invalid IO or IRQ parameters.
8-A solução abaixo resolve os problemas 7a e 7b
Simulando problemas e solucionando (o que está abaixo nunca falhou comigo)
Instale kernel source - rpm -ivh kernel-source*********
[[email protected]]# cd /usr/src/
[[email protected]]# ls -l
total 24 drwxr-xr-x 3 root root 4096 Fev 10 18:45 kernel2417p9/
drwxr-xr-x 3 root root 4096 Fev 17 19:38 kernel2417rc1/
drwxr-xr-x 3 root root 4096 Mar 6 19:33 kernel2418/
drwxr-xr-x 3 root root 4096 Dez 24 05:49 kernel251/
lrwxrwxrwx 1 root root 26 Mar 6 21:02 linux -> /usr/src/kernel2418/linux// <---- Isso é muito importante
drwxr-xr-x 19 root root 4096 Fev 17 14:48 linux-2.4.8/
drwxr-xr-x 7 root root 4096 Nov 2 15:11 RPM/
[[email protected]]# rm -f /usr/src/linux <----- Removendo, isso causa diversos erros
[[email protected]]# ls -l
total 24
drwxr-xr-x 3 root root 4096 Fev 10 18:45 kernel2417p9/
drwxr-xr-x 3 root root 4096 Fev 17 19:38 kernel2417rc1/
drwxr-xr-x 3 root root 4096 Mar 6 19:33 kernel2418/
drwxr-xr-x 3 root root 4096 Dez 24 05:49 kernel251/
drwxr-xr-x 19 root root 4096 Fev 17 14:48 linux-2.4.8/
drwxr-xr-x 7 root root 4096 Nov 2 15:11 RPM/
[[email protected]]# cd /root/pctel-0.9.0/
[[email protected]]# ./configure --with-hal=cm8738 checking for a BSD compatible install... /usr/bin/install -c checking whether build environment is sane... yes
checking for mawk... no
checking for gawk... gawk checking whether make sets ${MAKE}... yes
checking build driver for... HAL_CM8738
checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no
checking for executable suffix...
checking for object suffix... o checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking whether make sets ${MAKE}... (cached) yes checking for a BSD compatible install... /usr/bin/install -c
checking whether ln -s works... yes
checking for mawk... (cached) gawk checking how to run the C preprocessor... gcc -E checking for /usr/src/linux/include/linux/modversions.h... no configure: error: modversions.h is missing - you should configure your kernel first! < ----- Mensagerm de erro (existe outra solução mais nunca funcionou comigo)
[[email protected]]# cd /usr/src/
[[email protected]]# ln -s /usr/src/kernel2418/linux/ /usr/src/linux < ----- Resolvendo o problema
[[email protected]]# ls -l
total 24 drwxr-xr-x 3 root root 4096 Fev 10 18:45 kernel2417p9/
drwxr-xr-x 3 root root 4096 Fev 17 19:38 kernel2417rc1/
drwxr-xr-x 3 root root 4096 Mar 6 19:33 kernel2418/
drwxr-xr-x 3 root root 4096 Dez 24 05:49 kernel251/
lrwxrwxrwx 1 root root 26 Mar 10 16:44 linux -> /usr/src/kernel2418/linux//
drwxr-xr-x 19 root root 4096 Fev 17 14:48 linux-2.4.8/
drwxr-xr-x 7 root root 4096 Nov 2 15:11 RPM/
[[email protected]]# cd /root/pctel-0.9.0/
[[email protected]]# ./configure --with-hal=cm8738 checking for a BSD compatible install... /usr/bin/install -c checking whether build environment is sane... yes
checking for mawk... no
checking for gawk... gawk checking whether make sets ${MAKE}... yes
checking build driver for... HAL_CM8738
checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no
checking for executable suffix...
checking for object suffix... o checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking whether make sets ${MAKE}... (cached) yes checking for a BSD compatible install... /usr/bin/install -c
checking whether ln -s works... yes
checking for mawk... (cached) gawk checking how to run the C preprocessor... gcc -E checking for /usr/src/linux/include/linux/modversions.h... yes checking for Linux kernel version >= 2.4.0... yes checking for Linux kernel version >= 2.4.7... yes
checking for mknod... mknod
checking for chgrp... chgrp
checking for chmod... chmod
checking for depmod... depmod
checking for rmmod... rmmod
checking for lsmod... lsmod
checking for modprobe... modprobe
checking for objdump... objdump
checking for objcopy... objcopy
configure: creating ./config.status
config.status: creating Makefile
config.status: creating lib/Makefile config.status: creating modules/Makefile config.status: creating include/Makefile
config.status: creating src/Makefile config.status: creating src/module/Makefile config.status: creating src/ptserial/Makefile
config.status: creating misc/Makefile
config.status: creating misc/pctel.spec
config.status: creating misc/SlackBuild config.status: creating misc/build_rpms.sh config.status: creating m4/Makefile
Perfeito ------>
9- Pare kernel entre 2.4-3 até 2.4-7, isso pode ser necessário
[[email protected]]# vi pctel-0.8./src/ptserial/Makefile
-Alterando as linhas 100 e 101, originalmente
ptserial_SOURCE = ptserial-2.4.6.c
#ptserial_SOURCE = ptserial-2.4.7.c
-para
#ptserial_SOURCE = ptserial-2.4.6.c
ptserial_SOURCE = ptserial-2.4.7.c
10- Instalando novo kernel e/ou patch e habiltando o novo driver do Pctel HSP
Crinando, descompactando e mudando de diretorio
copiando, mudando de diretório, descompactando e apicando o patch e alterando o novo kernel
Isto abaixo é muito importante, mudando de diretório, verificando os diretórios e seus link removendo link antigo, criando link novo e conferindo, olhe o item 8
mudando de diretório, preparando, limpando configuração anteriores, crinado e instalando
criando diretório, copiando
Baixe o driver pctel-0.9.4.tar.gz que está na http://jcmp3.org
Instale o kernel source e header
se faltar algum pacote instale (gcc e etc)
siga os passos abaixo:
No caso do Mandrake 9.0 RC1, serve para outras também
[[email protected] jorge]$ tar xvfz pctel-0.9.4.tar.gz
[[email protected] pctel-0.9.4]$ ./configure --with-hal=sis
./configure: line 710: config.log: Permission denied
[[email protected] pctel-0.9.4]$ su
Password:
[[email protected] pctel-0.9.4]# ./configure --with-hal=sis
checking for a BSD compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for mawk... no
checking for gawk... gawk
checking whether make sets ${MAKE}... yes
checking build driver for... HAL_I8XX
checking for gcc... gcc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for executable suffix...
checking for object suffix... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of gcc... none
checking whether make sets ${MAKE}... (cached) yes
checking for a BSD compatible install... /usr/bin/install -c
checking whether ln -s works... yes
checking for mawk... (cached) gawk
checking how to run the C preprocessor... gcc -E
checking for /usr/src/linux/include/linux/modversions.h... yes
checking for Linux kernel version >= 2.4.0... yes
checking for Linux kernel version >= 2.4.7... yes
checking for mknod... mknod
checking for chgrp... chgrp
checking for chmod... chmod
checking for depmod... depmod
checking for rmmod... rmmod
checking for lsmod... lsmod
checking for modprobe... modprobe
checking for objdump... objdump
checking for objcopy... objcopy
configure: creating ./config.status
config.status: creating Makefile
config.status: creating lib/Makefile
config.status: creating modules/Makefile
config.status: creating include/Makefile
config.status: creating src/Makefile
config.status: creating src/module/Makefile
config.status: creating src/ptserial/Makefile
config.status: creating misc/Makefile
config.status: creating misc/pctel.spec
config.status: creating misc/SlackBuild
config.status: creating misc/build_rpms.sh
config.status: creating m4/Makefile
[[email protected] pctel-0.9.4]# make
Making all in src
make[1]: Entrando no diretório `/home/jorge/pctel-0.9.4/src'
Making all in module
make[2]: Entrando no diretório `/home/jorge/pctel-0.9.4/src/module'
rm -f *~ \#* .*~ .\#*
rm -f ptmodule.o
rm -f ptmodule.o
rm -f ../../modules/pctel.o
gcc -D__KERNEL__ -Werror -Wno-trigraphs -fno-common -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict-aliasing -pipe -fno-strength-reduce -DMODULE -DMODVERSIONS -DEXPORT_SYMTAB -DHAL_I8XX -DAUDIO_ROUTING -DSIS540 -I../../include -I/usr/src/linux/include -include /usr/src/linux/include/linux/modversions.h -DPACKAGE=\"pctel\" -DVERSION=\"0.9.5\" -c -o ptmodule.o ptmodule.c
ld -r -o ../../modules/pctel.o ptmodule.o ../../lib/control.a ../../lib/vuart.o ../../lib/sis/dsp.a ../../lib/sis/i810hal.a
ld -r -o tmp.o ../../lib/control.a ../../lib/vuart.o ../../lib/sis/dsp.a ../../lib/sis/i810hal.a
make[3]: Entrando no diretório `/home/jorge/pctel-0.9.4/src/module'
-=- Fixing wrong symbol names: kmalloc, kfree, printk and __udelay. -=-
make[3]: Saindo do diretório `/home/jorge/pctel-0.9.4/src/module'
ld -r -o ../../modules/pctel.o ptmodule.o tmp.o
make[3]: Entrando no diretório `/home/jorge/pctel-0.9.4/src/module'
-=- Fixing .modinfo section -=-
make[3]: Saindo do diretório `/home/jorge/pctel-0.9.4/src/module'
make[2]: Saindo do diretório `/home/jorge/pctel-0.9.4/src/module'
Making all in ptserial
make[2]: Entrando no diretório `/home/jorge/pctel-0.9.4/src/ptserial'
rm -f *~ \#* .*~ .\#*
rm -f ptserial.o ptserial.c
rm -f ptserial.o
rm -f ../../modules/ptserial.o
ln -s -f ptserial-2.4.7.c ../../src/ptserial/ptserial.c
make ptserial.o
make[3]: Entrando no diretório `/home/jorge/pctel-0.9.4/src/ptserial'
gcc -D__KERNEL__ -Werror -Wno-trigraphs -fno-common -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict-aliasing -pipe -fno-strength-reduce -DMODULE -DMODVERSIONS -DEXPORT_SYMTAB -DHAL_I8XX -DAUDIO_ROUTING -DSIS540 -DBUILD_SYSTEM=\""`uname -s -m -r -p`\"" -DGCC_VERSION=\""`gcc --version`\"" -I../../include -I/usr/src/linux/include -include /usr/src/linux/include/linux/modversions.h -DPACKAGE=\"pctel\" -DVERSION=\"0.9.5\" -c -o ptserial.o ptserial.c
<command line>:1:13: multi-line string literals are deprecated
make[3]: ** [ptserial.o] Erro 1
make[3]: Saindo do diretório `/home/jorge/pctel-0.9.4/src/ptserial'
make[2]: ** [all] Erro 2
make[2]: Saindo do diretório `/home/jorge/pctel-0.9.4/src/ptserial'
make[1]: ** [all-recursive] Erro 1
make[1]: Saindo do diretório `/home/jorge/pctel-0.9.4/src'
make: ** [all-recursive] Erro 1
[[email protected] pctel-0.9.4]#
[[email protected] pctel-0.9.4]# uname -r
2.4.19-7mdk
Corrigindo as linhas 92 e 93
[[email protected] pctel-0.9.4]# vi src/ptserial/Makefile
Como era
BUILD_SYSTEM = `uname -s -m -r -p`
GCC_VERSION = `gcc --version`
Para, sem os acentos ou aspas
BUILD_SYSTEM = 2.4.19-7mdk
GCC_VERSION = gcc 3.2
[[email protected] pctel-0.9.4]# make
Making all in src
make[1]: Entrando no diretório `/home/jorge/pctel-0.9.4/src'
Making all in module
make[2]: Entrando no diretório `/home/jorge/pctel-0.9.4/src/module'
rm -f *~ \#* .*~ .\#*
rm -f ptmodule.o
rm -f ptmodule.o
rm -f ../../modules/pctel.o
gcc -D__KERNEL__ -Werror -Wno-trigraphs -fno-common -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict-aliasing -pipe -fno-strength-reduce -DMODULE -DMODVERSIONS -DEXPORT_SYMTAB -DHAL_I8XX -DAUDIO_ROUTING -DSIS540 -I../../include -I/usr/src/linux/include -include /usr/src/linux/include/linux/modversions.h -DPACKAGE=\"pctel\" -DVERSION=\"0.9.5\" -c -o ptmodule.o ptmodule.c
ld -r -o ../../modules/pctel.o ptmodule.o ../../lib/control.a ../../lib/vuart.o ../../lib/sis/dsp.a ../../lib/sis/i810hal.a
ld -r -o tmp.o ../../lib/control.a ../../lib/vuart.o ../../lib/sis/dsp.a ../../lib/sis/i810hal.a
make[3]: Entrando no diretório `/home/jorge/pctel-0.9.4/src/module'
-=- Fixing wrong symbol names: kmalloc, kfree, printk and __udelay. -=-
make[3]: Saindo do diretório `/home/jorge/pctel-0.9.4/src/module'
ld -r -o ../../modules/pctel.o ptmodule.o tmp.o
make[3]: Entrando no diretório `/home/jorge/pctel-0.9.4/src/module'
-=- Fixing .modinfo section -=-
make[3]: Saindo do diretório `/home/jorge/pctel-0.9.4/src/module'
make[2]: Saindo do diretório `/home/jorge/pctel-0.9.4/src/module'
Making all in ptserial
make[2]: Entrando no diretório `/home/jorge/pctel-0.9.4/src/ptserial'
rm -f *~ \#* .*~ .\#*
rm -f ptserial.o ptserial.c
rm -f ptserial.o
rm -f ../../modules/ptserial.o
ln -s -f ptserial-2.4.7.c ../../src/ptserial/ptserial.c
make ptserial.o
make[3]: Entrando no diretório `/home/jorge/pctel-0.9.4/src/ptserial'
gcc -D__KERNEL__ -Werror -Wno-trigraphs -fno-common -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict-aliasing -pipe -fno-strength-reduce -DMODULE -DMODVERSIONS -DEXPORT_SYMTAB -DHAL_I8XX -DAUDIO_ROUTING -DSIS540 -DBUILD_SYSTEM=\""2.4.19-7mdk\"" -DGCC_VERSION=\""gcc 3.2\"" -I../../include -I/usr/src/linux/include -include /usr/src/linux/include/linux/modversions.h -DPACKAGE=\"pctel\" -DVERSION=\"0.9.5\" -c -o ptserial.o ptserial.c
make[3]: Saindo do diretório `/home/jorge/pctel-0.9.4/src/ptserial'
ld -r -o ../../modules/ptserial.o ptserial.o
make[2]: Saindo do diretório `/home/jorge/pctel-0.9.4/src/ptserial'
make[2]: Entrando no diretório `/home/jorge/pctel-0.9.4/src'
make[2]: Nada a ser feito para `all-am'.
make[2]: Saindo do diretório `/home/jorge/pctel-0.9.4/src'
make[1]: Saindo do diretório `/home/jorge/pctel-0.9.4/src'
Making all in lib
make[1]: Entrando no diretório `/home/jorge/pctel-0.9.4/lib'
make[1]: Nada a ser feito para `all'.
make[1]: Saindo do diretório `/home/jorge/pctel-0.9.4/lib'
Making all in modules
make[1]: Entrando no diretório `/home/jorge/pctel-0.9.4/modules'
make[1]: Nada a ser feito para `all'.
make[1]: Saindo do diretório `/home/jorge/pctel-0.9.4/modules'
Making all in include
make[1]: Entrando no diretório `/home/jorge/pctel-0.9.4/include'
make[1]: Nada a ser feito para `all'.
make[1]: Saindo do diretório `/home/jorge/pctel-0.9.4/include'
Making all in misc
make[1]: Entrando no diretório `/home/jorge/pctel-0.9.4/misc'
make[1]: Nada a ser feito para `all'.
make[1]: Saindo do diretório `/home/jorge/pctel-0.9.4/misc'
Making all in m4
make[1]: Entrando no diretório `/home/jorge/pctel-0.9.4/m4'
make[1]: Nada a ser feito para `all'.
make[1]: Saindo do diretório `/home/jorge/pctel-0.9.4/m4'
make[1]: Entrando no diretório `/home/jorge/pctel-0.9.4'
make[1]: Nada a ser feito para `all-am'.
make[1]: Saindo do diretório `/home/jorge/pctel-0.9.4'
P R O N T O
[[email protected] pctel-0.9.4]# make install
Como deve ficar o /etc/modules.conf, o modem ainda não funciona junto com som
para o som funcionar, modprobe trident
[[email protected] pctel-0.9.4]# vi /etc/modules.conf
probeall usb-interface usb-ohci
alias eth0 sis900
# above snd-trident snd-pcm-oss
# alias sound-slot-0 snd-trident
# for pctel modem
alias char-major-62 ptserial
below ptserial pctel
# country code for pctel modem
options ptserial country_code=33
11- Para Pc-Chips 812, chipets SiS 730 e modem pctel AMR
Autor: Renato
1.Baixem o driver pctel-0.9.2 do site do http://jcmp3.org
2.Como root, abra um terminal e descompacte o arquivo para uma pasta temp por exe
mplo.
3.Abra um editor de texto e edite o arquivo configure,
Altere a seguinte linha:
KERNEL_VERSION="`grep UTS_RELEASE $KERNEL_INCLUDES/linux/version.h | cut -d\\\" -
f2`"
(o drive e longo, esta na linha 1412)
Para:
KERNEL_VERSION="`uname -r `"
4. salve a alteracao.
Pronto!
5. Instale o drive com o comando ./configure --with-hal=sis
make
make install
6. carregue os modulos
insmod pctel
insmod ptserial
verifique se carregaram com o comando lsmod
Obs: Isto e valido para modem pctel AMR com drive pctel 0.9.2 e mdk 8.2 kernel 2.
4.18
Com outras distros nao sei, por isso nao posso opinar. Acredito que com o pctel H
SP tambem vai funcionar.
Renato Pereira Vaz