yuanye002 发表于 2005-3-7 21:33:44

驱动的编译-FC3下安装TP-LINKTM-IP5600猫

我的猫在windows2000下可以上网,但是在FC3的GNOME下“互联网配制向导”里强行添加了一个连接,后面说是不能够激活。

猫的型号:TP-LINK TM-IP5600 56K Modem,内置软猫

在KDE的“信息中心”里找到了一点有用的东西,发现在“PCI”一项里最后一行机器已经识别出了是一个56K的猫,还有芯片的型号。可我现在网上只能够找到RH8.0的驱动,而且在在编译的时候老是出错,看了说明说是要改动Makefile,我已经修改了内核的位置一项(下面的“KERNEL_INCLUDES:= ”一行的后面),可还是不能够编译。

下面附上Makefile,希望高手指点迷津~~~~~

###########################################################################
#
#
# Makefile -- Smart Link Soft Modem product Makefile.
#
# Copyright (C) 2001
# Smart Link Ltd. (www.smlink.com)
#
# Author: Sasha K ([email protected])
#
#
###########################################################################
#
###########################################################################

# Tools
CC := gcc
LD := ld
INSTALL := install
DEPMOD := /sbin/depmod
MODPROBE:= /sbin/modprobe
RM := rm
LN := ln
SED := sed
GREP := grep
CP := cp
MKNOD := mknod
# debug mode options /* off */
# DEBUG:=0
-include debug.mk
# Definitions
MODULES_DIR = /lib/modules/$(shell ./kernel-ver)/misc
MODEM_DEV := ttySL0
MODEM_LINK := modem
MODULES_CONF:= /etc/modules.conf
# Path to your kernel's includes
ifndef KERNEL_INCLUDES
KERNEL_INCLUDES:= /usr/src/linux/include
endif
INCLUDES := -I. -I$(KERNEL_INCLUDES)
ifndef MODVERSIONS_FLAGS
MODVERSIONS_FLAGS= -DMODVERSIONS --include $(KERNEL_INCLUDES)/linux/modversions.h
endif

# C FLAGS
CFLAGS:= -Wall -O3 -fomit-frame-pointer -D__KERNEL__ -DMODULE -DEXPORT_SYMTAB $(INCLUDES) $(MODVERSIONS_FLAGS)
#CFLAGS:= -Wall -O3 -fomit-frame-pointer -DMODEM_DEBUG=$(DEBUG) -D__KERNEL__ -DMODULE -DEXPORT_SYMTAB $(INCLUDES) $(MODVERSIONS_FLAGS)
ifdef DEBUG
CFLAGS += -DMODEM_DEBUG=$(DEBUG)
endif
LFLAGS=
SLMDM := slmdm.o
SLAMR := slamrmo.o
SLUSB := slusb.o
SLFAX := slfax.o
ALL_TARGETS := $(SLAMR) $(SLUSB) $(SLMDM) $(SLFAX)
SLAMR_OBJ := amrmo.o
SLUSB_OBJ := usb.o
SLMDM_OBJ := mdm.o
SLFAX_OBJ := fax.o
MDM_OBJS := mdm_init.o mdm_sltty.o mdm_country.o
FAX_OBJS := fax_init.o
AMR_OBJS := amrmo_init.o
USB_OBJS := usb_st7554.o
CUSTOM_OBJ := editme.o
SYSDEP_OBJ := sysdep.o
SYSDEP_LINUX_OBJ:= sysdep_linux.o
SYSDEP_PCI_OBJ := sysdep_pci.o

all: $(ALL_TARGETS) kernel-ver
$(SLAMR): $(SLAMR_OBJ) $(AMR_OBJS) $(SYSDEP_PCI_OBJ)
$(SLUSB): $(SLUSB_OBJ) $(USB_OBJS)
$(SLMDM): $(SLMDM_OBJ) $(MDM_OBJS) $(CUSTOM_OBJ) $(SYSDEP_OBJ) $(SYSDEP_LINUX_OBJ)
$(SLFAX): $(SLFAX_OBJ) $(FAX_OBJS)
$(ALL_TARGETS):
$(LD) -r -o $@ $^
kernel-ver: kernel-ver.o
install-amr: install config-amr
install-usb: install config-usb
install: kernel-ver all
$(INSTALL) -D -m 644 slmdm.o $(prefix_dir)/$(MODULES_DIR)/slmdm.o
$(INSTALL) -D -m 644 slfax.o $(prefix_dir)/$(MODULES_DIR)/slfax.o
$(INSTALL) -D -m 644 slamrmo.o $(prefix_dir)/$(MODULES_DIR)/slamrmo.o
$(INSTALL) -D -m 644 slusb.o $(prefix_dir)/$(MODULES_DIR)/slusb.o
$(INSTALL) -D -m 755 country.dat $(prefix_dir)/etc/country.dat
$(INSTALL) -d $(prefix_dir)/dev
$(RM) -f $(prefix_dir)/dev/$(MODEM_DEV)
$(MKNOD) -m 666 $(prefix_dir)/dev/$(MODEM_DEV) c 212 0
$(LN) -sf ./$(MODEM_DEV) $(prefix_dir)/dev/$(MODEM_LINK)
uninstall: kernel-ver cleanup-config unload-modules
$(RM) -f $(prefix_dir)/$(MODULES_DIR)/slmdm.o
$(RM) -f $(prefix_dir)/$(MODULES_DIR)/slfax.o
$(RM) -f $(prefix_dir)/$(MODULES_DIR)/slamrmo.o
$(RM) -f $(prefix_dir)/$(MODULES_DIR)/slusb.o
$(RM) -f $(prefix_dir)/etc/country.dat
$(RM) -f $(prefix_dir)/dev/$(MODEM_DEV)
$(RM) -f $(prefix_dir)/dev/$(MODEM_LINK)
config-usb: config
$(CP) $(MODULES_CONF) $(MODULES_CONF).slmdm && \
$(SED) -e 's/^alias slmodem .*$$/alias slmodem slusb/' $(MODULES_CONF).slmdm > $(MODULES_CONF)
$(DEPMOD) -a || echo -n
config-amr: config
$(CP) $(MODULES_CONF) $(MODULES_CONF)\.slmdm && \
$(SED) -e 's/^alias slmodem .*$$/alias slmodem slamrmo/' $(MODULES_CONF).slmdm > $(MODULES_CONF)
$(DEPMOD) -a || echo -n
config: cleanup-config
$(CP) $(MODULES_CONF) $(MODULES_CONF).slmdm || echo -n
echo 'alias char-major-212 slmodem' >> $(MODULES_CONF)
echo 'alias slmodem off' >> $(MODULES_CONF)
cleanup-config: unload-modules
$(CP) $(MODULES_CONF) $(MODULES_CONF).slmdm && \
$(GREP) -v 'slmodem' $(MODULES_CONF).slmdm > $(MODULES_CONF) || \
echo -n ; \
$(DEPMOD) -a || echo -n
unload-modules:
$(MODPROBE) -r slusb
$(MODPROBE) -r slamrmo
$(MODPROBE) -r slfax
$(MODPROBE) -r slmdm
spec-file-lists: slmdm.modules slamr.modules slusb.modules
%.modules: kernel-ver
@echo "build modules list spec file $@..."
$(SED) -e 's/%modules_dir/$(subst /,\/,$(MODULES_DIR))/' $@-dist > $@
clean:
$(RM) -f $(ALL_TARGETS) $(MDM_OBJS) $(FAX_OBJS) $(AMR_OBJS) $(USB_OBJS) $(CUSTOM_OBJ) $(SYSDEP_OBJ) $(SYSDEP_LINUX_OBJ) $(SYSDEP_PCI_OBJ) kernel-ver kernel-ver.o
$(RM) -f *.modules
%.o: %.c
$(CC) $(CFLAGS) -o $@ -c $<
dep:
$(CC) -M -c $(CFLAGS) *.c > .depend
-include .depend

yuanye002 发表于 2005-3-9 10:33:35

:shock:
有没有人知道啊???
或者遇到过同样的问题??可以分享分享经验啊!!
:shock:
现在装个系统上不了网真的很郁闷的!!
:shock:

yuanye002 发表于 2005-3-10 23:14:38

昨天我在下了个slmodem-2.9.10.tar.gz包,最新的,在编译安装的时候出现了一下问题,有哪位高手帮俺诊断诊断啊!!!屏幕提示:
# make install
...
...
*** Warning: "usb_endpoint_halted" undefined!
...
...
# modprobe slamr
FATAL: Error inserting slamr (/lib/modules/2.6.9-1.667/extra/slamr.ko): Device or resource busy# slmodemd /dev/slamr0
error: mdm setup: cannot open dev `/dev/slamr0': No such device or address
error: cannot setup device `/dev/slamr0'
页: [1]
查看完整版本: 驱动的编译-FC3下安装TP-LINKTM-IP5600猫