中兴4g模块ME3760模块开发中遇到的问题

原创 2015年07月06日 16:42:25

1.貌似很多错误,但主要的问题是头文件缺少导致的问题。drivers/net/usb/cdc_ether.c:43:20: error: usbnet.h: No such file or directory

root@ubuntu:/opt/EmbedSky/kernel/3g/linux-2.6.30.4# make
  CHK     include/linux/version.h
make[1]: `include/asm-arm/mach-types.h' is up to date.
  CHK     include/linux/utsrelease.h
  SYMLINK include/asm -> include/asm-arm
  CALL    scripts/checksyscalls.sh
<stdin>:1097:2: warning: #warning syscall fadvise64 not implemented
<stdin>:1265:2: warning: #warning syscall migrate_pages not implemented
<stdin>:1321:2: warning: #warning syscall pselect6 not implemented
<stdin>:1325:2: warning: #warning syscall ppoll not implemented
<stdin>:1365:2: warning: #warning syscall epoll_pwait not implemented
  CHK     include/linux/compile.h
  CC [M]  drivers/net/usb/cdc_ether.o
drivers/net/usb/cdc_ether.c:43:20: <span style="background-color: rgb(255, 0, 0);">error: usbnet.h: No such file or directory</span>
drivers/net/usb/cdc_ether.c:115: warning: 'struct usbnet' declared inside parameter list
drivers/net/usb/cdc_ether.c:115: warning: its scope is only this definition or declaration, which is probably not what you want
drivers/net/usb/cdc_ether.c:117: warning: 'struct usbnet' declared inside parameter list
drivers/net/usb/cdc_ether.c: In function 'usbnet_get_ethernet_addr':
drivers/net/usb/cdc_ether.c:122: error: dereferencing pointer to incomplete type
drivers/net/usb/cdc_ether.c:124: error: dereferencing pointer to incomplete type
drivers/net/usb/cdc_ether.c:124: error: dereferencing pointer to incomplete type
drivers/net/usb/cdc_ether.c:131: error: dereferencing pointer to incomplete type
drivers/net/usb/cdc_ether.c: At top level:
drivers/net/usb/cdc_ether.c:136: warning: 'struct usbnet' declared inside parameter list
drivers/net/usb/cdc_ether.c:175: warning: 'struct usbnet' declared inside parameter list
drivers/net/usb/cdc_ether.c: In function 'usbnet_generic_cdc_bind':
drivers/net/usb/cdc_ether.c:180: error: dereferencing pointer to incomplete type
drivers/net/usb/cdc_ether.c:183: error: implicit declaration of function 'driver_of'
drivers/net/usb/cdc_ether.c:183: warning: initialization makes pointer from integer without a cast
drivers/net/usb/cdc_ether.c:185: error: dereferencing pointer to incomplete type
drivers/net/usb/cdc_ether.c:185: error: dereferencing pointer to incomplete type
drivers/net/usb/cdc_ether.c:191: error: dereferencing pointer to incomplete type
drivers/net/usb/cdc_ether.c:195: error: dereferencing pointer to incomplete type
drivers/net/usb/cdc_ether.c:196: error: dereferencing pointer to incomplete type
drivers/net/usb/cdc_ether.c:225: error: dereferencing pointer to incomplete type

解决:查找头文件的位置,并添加头文件

 


2.ERROR: "cdc_encap_uninit" [drivers/net/usb/cdc_ether.ko] undefined!

root@ubuntu:/opt/EmbedSky/kernel/3g/linux-2.6.30.4# make
  CHK     include/linux/version.h
make[1]: `include/asm-arm/mach-types.h' is up to date.
  CHK     include/linux/utsrelease.h
  SYMLINK include/asm -> include/asm-arm
  CALL    scripts/checksyscalls.sh
<stdin>:1097:2: warning: #warning syscall fadvise64 not implemented
<stdin>:1265:2: warning: #warning syscall migrate_pages not implemented
<stdin>:1321:2: warning: #warning syscall pselect6 not implemented
<stdin>:1325:2: warning: #warning syscall ppoll not implemented
<stdin>:1365:2: warning: #warning syscall epoll_pwait not implemented
  CHK     include/linux/compile.h
  CC [M]  drivers/net/usb/cdc_ether.o
drivers/net/usb/cdc_ether.c:626: warning: 'lte_tx_fixup' defined but not used
drivers/net/usb/cdc_ether.c:619: warning: 'lte_rx_fixup' defined but not used
  Kernel: arch/arm/boot/Image is ready
  Kernel: arch/arm/boot/zImage is ready
  Building modules, stage 2.
  MODPOST 20 modules
<span style="color:#ff0000;">ERROR: "cdc_encap_uninit" [drivers/net/usb/cdc_ether.ko] undefined!
ERROR: "cdc_encap_init" [drivers/net/usb/cdc_ether.ko] undefined!
ERROR: "cdc_encap_response_avail" [drivers/net/usb/cdc_ether.ko] undefined!</span>
make[1]: *** [__modpost] Error 1
make: *** [modules] Error 2

解决:

ERROR: "cdc_encap_uninit" [drivers/net/usb/cdc_ether.ko] undefined!

意思是在生成 cdc_ether.ko 文件的时候没有找到 cdc_encap_uninit 函数的定义。

cdc_ether.c => cdc_encap_uninit(encap);

cdc_encap.c => void cdc_encap_uninit(struct cdc_encap *encap) => EXPORT_SYMBOL_GPL(cdc_encap_uninit);

所以:

文件:/linux-2.6.24/drivers/net/usb/Makefile
找到如下行:
obj-$(CONFIG_USB_USBNET) += usbnet.o
在其下添加内容:
obj-m += cdc_encap.o


3.模块加载时会有模块依赖关系。

[root@mbike /]# insmod rndis_host.ko
insmod: can't insert 'rndis_host.ko': unknown symbol in module, or unknown parameter

解决:

insmod usbnet.ko

insmod cdc_encap.ko

insmod cdc_ether.ko

insmod rndis_host.ko







版权声明:本文为博主原创文章,未经博主允许不得转载。

相关文章推荐

LINUX下中兴ZTEME3760无线模块上网

一年前接触了无线模块,当时其他无线模块用ppp方式拨号都很成功,方法就不多说了,就是3个拨号脚本和一条拨号指令,方法百度上很多,我也是网上学来的。直到楼主遇到了一款无线模块——ZTEME3760后,头...

在ARM-linux上实现4G模块PPP拨号上网

搞了3、4天4G模块,从毫无头绪到可以ping通外网,着实不轻松。用的是一不知名品牌EC20, 技术支持很少,资料很乱,然后自己搜集资料,一步一步调试,才搞通。 环境: ubuntu12.04....

Linux下ME3760_v2驱动移植方式,中兴4G网卡移植

USB串口驱动添加 http://blog.csdn.net/softwoker/article/details/45598837 配置内核将USB driver for GSM an...

4G模块中兴ME3760调试记录

平台:树莓派1 B型 内核:Lunix3.6 驱动移植完成后, 终端输入: ls /dev/ttyUSB* 显示: 终端输入: ifconfig -a 显示: 终端输入: lsusb 显示...

中兴4g模块me3760拨号

拨号脚本打印的信息 AT> AT+ZEACT=2//LTE 接入技术 LTE-TDD Pref AT AT AT AT AT AT> AT+ZNCARD=1//1:切换为 Lin...

中兴4G ME3760模块软件手册

  • 2015-06-08 21:08
  • 421KB
  • 下载

Linux下ME3760_v2驱动移植方式,中兴4G网卡移植

 USB串口驱动添加 http://blog.csdn.net/softwoker/article/details/45598837 配置内核将USB driver for GS...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:深度学习:神经网络中的前向传播和反向传播算法推导
举报原因:
原因补充:

(最多只允许输入30个字)