caiminf 发表于 2013-01-18 14:50

wifi模块rt3070驱动问题,新手求指点

要在tiny6410的开发板上面加一个usb的wifi模块,芯片是rt3070,宿主机是fedora 10。
我在雷凌的官网上下载了驱动2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO.bz2,解压后将Makefile中的内核代码路径改了,也指定了交叉编译工具。改动的部分如下:

ifeq ($(PLATFORM),PC)
# Linux 2.6
LINUX_SRC = /usr/src/kernels/2.6.27.5-117.fc10.i686
# Linux 2.4 Change to your local setting
#LINUX_SRC = /usr/src/linux-2.4
LINUX_SRC_MODULE = /lib/modules/$(shell uname -r)/kernel/drivers/net/wireless/
CROSS_COMPILE = /usr/local/FriendlyARM/toolschain/4.5.1/bin/arm-linux-
endif
(里面的platform我已经选好了是PC)

/usr/src/kernels/2.6.27.5-117.fc10.i686目录下的内核代码中的Makefile也有改动,如下:
export KBUILD_BUILDHOST := $(SUBARCH)
ARCH                ?= arm
CROSS_COMPILE        ?= /usr/local/FriendlyARM/toolschain/4.5.1/bin/arm-linux-

然后make,出现了以下的错误信息:
$ make CHIPSET=3070
make -C tools
make: Entering directory `/home/cabbage/Desktop/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/tools'
gcc -g bin2h.c -o bin2h
make: Leaving directory `/home/cabbage/Desktop/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/tools'
/home/cabbage/Desktop/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/tools/bin2h
cp -f os/linux/Makefile.6 /home/cabbage/Desktop/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/Makefile
make -C /usr/src/kernels/2.6.27.5-117.fc10.i686 SUBDIRS=/home/cabbage/Desktop/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux modules
make: Entering directory `/usr/src/kernels/2.6.27.5-117.fc10.i686'
CC /home/cabbage/Desktop/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/../../common/crypt_md5.o
In file included from include/asm/system.h:10:0,
               from include/asm/processor.h:17,
               from include/linux/prefetch.h:14,
               from include/linux/list.h:6,
               from include/linux/module.h:9,
               from /home/cabbage/Desktop/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/include/os/rt_linux.h:31,
               from /home/cabbage/Desktop/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/include/rtmp_os.h:44,
               from /home/cabbage/Desktop/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/include/rtmp_comm.h:60,
               from /home/cabbage/Desktop/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/include/rt_config.h:33,
               from /home/cabbage/Desktop/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/../../common/crypt_md5.c:28:
include/linux/kernel.h:195:2: warning: 'regparm' attribute directive ignored
include/linux/kernel.h:197:2: warning: 'regparm' attribute directive ignored
include/linux/kernel.h:217:2: warning: 'regparm' attribute directive ignored
In file included from include/linux/thread_info.h:47:0,
               from include/linux/preempt.h:9,
               from include/linux/spinlock.h:50,
               from include/linux/seqlock.h:29,
               from include/linux/time.h:8,
               from include/linux/stat.h:60,
               from include/linux/module.h:10,
               from /home/cabbage/Desktop/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/include/os/rt_linux.h:31,
               from /home/cabbage/Desktop/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/include/rtmp_os.h:44,
               from /home/cabbage/Desktop/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/include/rtmp_comm.h:60,
               from /home/cabbage/Desktop/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/include/rt_config.h:33,
               from /home/cabbage/Desktop/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/../../common/crypt_md5.c:28:
include/asm/thread_info.h:174:24: error: invalid register name for 'current_stack_pointer'
In file included from include/linux/rwsem.h:22:0,
               from include/linux/notifier.h:14,
               from include/linux/memory_hotplug.h:6,
               from include/linux/mmzone.h:560,
               from include/linux/gfp.h:4,
               from include/linux/kmod.h:22,
               from include/linux/module.h:13,
               from /home/cabbage/Desktop/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/include/os/rt_linux.h:31,
               from /home/cabbage/Desktop/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/include/rtmp_os.h:44,
               from /home/cabbage/Desktop/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/include/rtmp_comm.h:60,
               from /home/cabbage/Desktop/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/include/rt_config.h:33,
               from /home/cabbage/Desktop/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/../../common/crypt_md5.c:28:
include/asm/rwsem.h:48:32: warning: 'regparm' attribute directive ignored
include/asm/rwsem.h:50:33: warning: 'regparm' attribute directive ignored
include/asm/rwsem.h:52:20: warning: 'regparm' attribute directive ignored
include/asm/rwsem.h:54:30: warning: 'regparm' attribute directive ignored
In file included from include/asm/smp.h:12:0,
               from include/linux/smp.h:28,
               from include/linux/topology.h:33,
               from include/linux/mmzone.h:683,
               from include/linux/gfp.h:4,
               from include/linux/kmod.h:22,
               from include/linux/module.h:13,
               from /home/cabbage/Desktop/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/include/os/rt_linux.h:31,
               from /home/cabbage/Desktop/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/include/rtmp_os.h:44,
               from /home/cabbage/Desktop/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/include/rtmp_comm.h:60,
               from /home/cabbage/Desktop/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/include/rt_config.h:33,
               from /home/cabbage/Desktop/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/../../common/crypt_md5.c:28:
include/asm/mpspec.h:9:25: fatal error: mach_mpspec.h: No such file or directory
compilation terminated.
make: *** Error 1
make: *** Error 2
make: Leaving directory `/usr/src/kernels/2.6.27.5-117.fc10.i686'
make: *** Error 2

我是新手,刚接触不久,这个问题我在网上查了不少,还是没有解决,麻烦各位指点一下。

caiminf 发表于 2013-01-20 16:49

问题解决了,原来是编译模块时指定的内核代码也要是交叉编译过的arm版本的。之前的那个不是用交叉工具链编译的内核。
但是新的问题又出现了,模块编译好之后可以插入到开发板的linux中,但是插入ko模块之后,把usb的rt3070模块连上开发板,用ifconfig -a还是没有找到它,这是什么原因?
不要没人理我啊,好桑心……
页: [1]
查看完整版本: wifi模块rt3070驱动问题,新手求指点