当前位置: 技术问答>linux和unix
无线网卡驱动编译出错,急救ing
来源: 互联网 发布时间:2016-04-22
本文导语: 小弟买了块无线网卡,准备安装到ARM嵌入式板子上去,不过遇到了些问题,驱动编译出现了N多的警告和错误,现把这些DEBUG贴出来下(只帖出了部分的警告,不过错误是全部都贴出来了),敬请各位给我支个招,看怎...
小弟买了块无线网卡,准备安装到ARM嵌入式板子上去,不过遇到了些问题,驱动编译出现了N多的警告和错误,现把这些DEBUG贴出来下(只帖出了部分的警告,不过错误是全部都贴出来了),敬请各位给我支个招,看怎么解决这个问题(郁闷了好几天了)。{无线网卡是ASUS WL-107G,内置雷凌芯片组;编译环境是fedora core 2(2.6.5linux内核系列)}
[root@localhost Module]# make ARCH=arm -C /lib/modules/2.6.5-1.358/build SUBDIRS=$PWD modules
make: Entering directory `/lib/modules/2.6.5-1.358/build'
CC [M] /usr/src/linux-2.6.5-1.358/RT2500-Linux-STA-1.4.2.0/Module/rtmp_main.oIn file included from include/asm/system.h:5,
from include/asm/processor.h:18,
from include/asm/thread_info.h:16,
from include/linux/thread_info.h:21,
from include/linux/spinlock.h:12,
from include/linux/capability.h:45,
from include/linux/sched.h:7,
from include/linux/module.h:10,
from /usr/src/linux-2.6.5-1.358/RT2500-Linux-STA-1.4.2.0/Module/rt_config.h:46,
from /usr/src/linux-2.6.5-1.358/RT2500-Linux-STA-1.4.2.0/Module/rtmp_main.c:30:
include/asm/hw_irq.h:28: error: `NR_IRQ_VECTORS' undeclared here (not in a function)
include/asm/hw_irq.h:32: error: `NR_IRQS' undeclared here (not in a function)
include/asm/hw_irq.h:55: warning: `regparm' attribute directive ignored
In file included from /usr/src/linux-2.6.5-1.358/RT2500-Linux-STA-1.4.2.0/Module/rt_config.h:54,
from /usr/src/linux-2.6.5-1.358/RT2500-Linux-STA-1.4.2.0/Module/rtmp_main.c:30:
include/linux/interrupt.h:95: warning: `regparm' attribute directive ignored
include/linux/interrupt.h:99: warning: `regparm' attribute directive ignored
include/linux/interrupt.h:100: warning: `regparm' attribute directive ignored
include/linux/interrupt.h:171: warning: `regparm' attribute directive ignored
include/linux/interrupt.h:179: warning: `regparm' attribute directive ignored
include/linux/mm.h:237: warning: `regparm' attribute directive ignored
include/linux/mm.h:468: warning: `regparm' attribute directive ignored
include/linux/mm.h:469: warning: `regparm' attribute directive ignored
include/linux/mm.h:470: warning: `regparm' attribute directive ignored
include/linux/mm.h:486: warning: `regparm' attribute directive ignored
In file included from include/linux/highmem.h:14,
from include/linux/skbuff.h:27,
from include/linux/netdevice.h:151,
from /usr/src/linux-2.6.5-1.358/RT2500-Linux-STA-1.4.2.0/Module/rt_config.h:56,
from /usr/src/linux-2.6.5-1.358/RT2500-Linux-STA-1.4.2.0/Module/rtmp_main.c:30:
include/asm/highmem.h:50: warning: `regparm' attribute directive ignored
include/asm/highmem.h:51: warning: `regparm' attribute directive ignored
In file included from include/linux/poll.h:11,
from include/linux/skbuff.h:28,
from include/linux/netdevice.h:151,
from /usr/src/linux-2.6.5-1.358/RT2500-Linux-STA-1.4.2.0/Module/rt_config.h:56,
from /usr/src/linux-2.6.5-1.358/RT2500-Linux-STA-1.4.2.0/Module/rtmp_main.c:30:
include/asm/uaccess.h:414: warning: `warn_unused_result' attribute directive ignored
include/asm/uaccess.h:415: warning: `warn_unused_result' attribute directive ignored
include/asm/uaccess.h:440: warning: `warn_unused_result' attribute directive ignored
include/asm/uaccess.h:478: warning: `warn_unused_result' attribute directive ignored
include/asm/uaccess.h:512: warning: `warn_unused_result' attribute directive ignored
include/asm/uaccess.h:537: warning: `warn_unused_result' attribute directive ignored
include/asm/system.h: In function `__set_64bit':
include/asm/system.h:169: error: unknown register name `dx' in `asm'
include/asm/system.h:169: error: unknown register name `ax' in `asm'
include/asm/system.h: In function `__set_64bit_constant':
include/asm/system.h:169: error: unknown register name `dx' in `asm'
include/asm/system.h:169: error: unknown register name `ax' in `asm'
include/asm/system.h: In function `__set_64bit_var':
include/asm/system.h:169: error: unknown register name `dx' in `asm'
include/asm/system.h:169: error: unknown register name `ax' in `asm'
include/asm/processor.h: In function `cpuid_eax':
include/asm/processor.h:144: error: unknown register name `dx' in `asm'
include/asm/processor.h:144: error: unknown register name `cx' in `asm'
include/asm/processor.h:144: error: unknown register name `bx' in `asm'
include/asm/processor.h: In function `cpuid_ebx':
include/asm/processor.h:154: error: unknown register name `dx' in `asm'
include/asm/processor.h:154: error: unknown register name `cx' in `asm'
include/asm/processor.h: In function `cpuid_ecx':
include/asm/processor.h:164: error: unknown register name `dx' in `asm'
include/asm/processor.h:164: error: unknown register name `bx' in `asm'
include/asm/processor.h: In function `cpuid_edx':
include/asm/processor.h:174: error: unknown register name `cx' in `asm'
include/asm/processor.h:174: error: unknown register name `bx' in `asm'
include/asm/processor.h: In function `set_in_cr4':
include/asm/processor.h:211: error: unknown register name `ax' in `asm'
include/asm/processor.h: In function `clear_in_cr4':
include/asm/processor.h:221: error: unknown register name `ax' in `asm'
include/asm/rwsem.h: In function `__up_write':
include/asm/rwsem.h:214: error: unknown register name `edx' in `asm'
include/asm/rwsem.h: In function `up_write':
include/asm/rwsem.h:214: error: unknown register name `edx' in `asm'
make[1]: *** [/usr/src/linux-2.6.5-1.358/RT2500-Linux-STA-1.4.2.0/Module/rtmp_main.o] ?? 1
make: *** [/usr/src/linux-2.6.5-1.358/RT2500-Linux-STA-1.4.2.0/Module] 错误 2
make: Leaving directory `/lib/modules/2.6.5-1.358/build'
[root@localhost Module]# make ARCH=arm -C /lib/modules/2.6.5-1.358/build SUBDIRS=$PWD modules
make: Entering directory `/lib/modules/2.6.5-1.358/build'
CC [M] /usr/src/linux-2.6.5-1.358/RT2500-Linux-STA-1.4.2.0/Module/rtmp_main.oIn file included from include/asm/system.h:5,
from include/asm/processor.h:18,
from include/asm/thread_info.h:16,
from include/linux/thread_info.h:21,
from include/linux/spinlock.h:12,
from include/linux/capability.h:45,
from include/linux/sched.h:7,
from include/linux/module.h:10,
from /usr/src/linux-2.6.5-1.358/RT2500-Linux-STA-1.4.2.0/Module/rt_config.h:46,
from /usr/src/linux-2.6.5-1.358/RT2500-Linux-STA-1.4.2.0/Module/rtmp_main.c:30:
include/asm/hw_irq.h:28: error: `NR_IRQ_VECTORS' undeclared here (not in a function)
include/asm/hw_irq.h:32: error: `NR_IRQS' undeclared here (not in a function)
include/asm/hw_irq.h:55: warning: `regparm' attribute directive ignored
In file included from /usr/src/linux-2.6.5-1.358/RT2500-Linux-STA-1.4.2.0/Module/rt_config.h:54,
from /usr/src/linux-2.6.5-1.358/RT2500-Linux-STA-1.4.2.0/Module/rtmp_main.c:30:
include/linux/interrupt.h:95: warning: `regparm' attribute directive ignored
include/linux/interrupt.h:99: warning: `regparm' attribute directive ignored
include/linux/interrupt.h:100: warning: `regparm' attribute directive ignored
include/linux/interrupt.h:171: warning: `regparm' attribute directive ignored
include/linux/interrupt.h:179: warning: `regparm' attribute directive ignored
include/linux/mm.h:237: warning: `regparm' attribute directive ignored
include/linux/mm.h:468: warning: `regparm' attribute directive ignored
include/linux/mm.h:469: warning: `regparm' attribute directive ignored
include/linux/mm.h:470: warning: `regparm' attribute directive ignored
include/linux/mm.h:486: warning: `regparm' attribute directive ignored
In file included from include/linux/highmem.h:14,
from include/linux/skbuff.h:27,
from include/linux/netdevice.h:151,
from /usr/src/linux-2.6.5-1.358/RT2500-Linux-STA-1.4.2.0/Module/rt_config.h:56,
from /usr/src/linux-2.6.5-1.358/RT2500-Linux-STA-1.4.2.0/Module/rtmp_main.c:30:
include/asm/highmem.h:50: warning: `regparm' attribute directive ignored
include/asm/highmem.h:51: warning: `regparm' attribute directive ignored
In file included from include/linux/poll.h:11,
from include/linux/skbuff.h:28,
from include/linux/netdevice.h:151,
from /usr/src/linux-2.6.5-1.358/RT2500-Linux-STA-1.4.2.0/Module/rt_config.h:56,
from /usr/src/linux-2.6.5-1.358/RT2500-Linux-STA-1.4.2.0/Module/rtmp_main.c:30:
include/asm/uaccess.h:414: warning: `warn_unused_result' attribute directive ignored
include/asm/uaccess.h:415: warning: `warn_unused_result' attribute directive ignored
include/asm/uaccess.h:440: warning: `warn_unused_result' attribute directive ignored
include/asm/uaccess.h:478: warning: `warn_unused_result' attribute directive ignored
include/asm/uaccess.h:512: warning: `warn_unused_result' attribute directive ignored
include/asm/uaccess.h:537: warning: `warn_unused_result' attribute directive ignored
include/asm/system.h: In function `__set_64bit':
include/asm/system.h:169: error: unknown register name `dx' in `asm'
include/asm/system.h:169: error: unknown register name `ax' in `asm'
include/asm/system.h: In function `__set_64bit_constant':
include/asm/system.h:169: error: unknown register name `dx' in `asm'
include/asm/system.h:169: error: unknown register name `ax' in `asm'
include/asm/system.h: In function `__set_64bit_var':
include/asm/system.h:169: error: unknown register name `dx' in `asm'
include/asm/system.h:169: error: unknown register name `ax' in `asm'
include/asm/processor.h: In function `cpuid_eax':
include/asm/processor.h:144: error: unknown register name `dx' in `asm'
include/asm/processor.h:144: error: unknown register name `cx' in `asm'
include/asm/processor.h:144: error: unknown register name `bx' in `asm'
include/asm/processor.h: In function `cpuid_ebx':
include/asm/processor.h:154: error: unknown register name `dx' in `asm'
include/asm/processor.h:154: error: unknown register name `cx' in `asm'
include/asm/processor.h: In function `cpuid_ecx':
include/asm/processor.h:164: error: unknown register name `dx' in `asm'
include/asm/processor.h:164: error: unknown register name `bx' in `asm'
include/asm/processor.h: In function `cpuid_edx':
include/asm/processor.h:174: error: unknown register name `cx' in `asm'
include/asm/processor.h:174: error: unknown register name `bx' in `asm'
include/asm/processor.h: In function `set_in_cr4':
include/asm/processor.h:211: error: unknown register name `ax' in `asm'
include/asm/processor.h: In function `clear_in_cr4':
include/asm/processor.h:221: error: unknown register name `ax' in `asm'
include/asm/rwsem.h: In function `__up_write':
include/asm/rwsem.h:214: error: unknown register name `edx' in `asm'
include/asm/rwsem.h: In function `up_write':
include/asm/rwsem.h:214: error: unknown register name `edx' in `asm'
make[1]: *** [/usr/src/linux-2.6.5-1.358/RT2500-Linux-STA-1.4.2.0/Module/rtmp_main.o] ?? 1
make: *** [/usr/src/linux-2.6.5-1.358/RT2500-Linux-STA-1.4.2.0/Module] 错误 2
make: Leaving directory `/lib/modules/2.6.5-1.358/build'
|
用错内核路径了吧?
你的/lib/modules/xxx/build是为你的PC机的内核的路径,
你应该还没有为你的开发板编译一个内核,或者你已经有了,但是make -C 指错路径了
你的/lib/modules/xxx/build是为你的PC机的内核的路径,
你应该还没有为你的开发板编译一个内核,或者你已经有了,但是make -C 指错路径了
|
看看你的asm是不是链接到 asm-x86上了? 用 ll include/asm 看看。
如果是的话,在编译之前 先用make xxx_defconfig(看你哪个平台)生成缺省的config。
如果是的话,在编译之前 先用make xxx_defconfig(看你哪个平台)生成缺省的config。
|
未包含相应的.H文件,或者查看一下路径是否正确。
|
你给 asm-arm 建立链接的方式不对,用下面命令试试:
ln -s asm-arm asm
ln -s asm-arm asm