标签:
目标板:Hi3518
#PLATFORM = PC //注释掉 PLATFORM = HI3518 //支持平台 ifeq ($(PLATFORM),HI3518) LINUX_SRC = /root/hi3518/linux-3.0.y //内核路径 CROSS_COMPILE = /opt/hisi-linux-nptl/arm-hisiv100-linux/target/bin/arm-hisiv100nptl-linux- //工具链路径 endif
2.进入RT3070/include/rtmp_def.h
1476 #define INF_MAIN_DEV_NAME "wlan" 1477 #define INF_MBSSID_DEV_NAME "wlan"
3.修改os/linux/config.mk使其支持wpa_suplicant(将‘n‘变成‘y‘)
# Support Wpa_Supplicant HAS_WPA_SUPPLICANT=y # Support Native WpaSupplicant for Network Maganger HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=y
4.在编译驱动前必须先编译image
问题一:
/root/hi3518/RT3070/os/linux/../../os/linux/sta_ioctl.c:2227: error: unknown field ‘private‘ specified in initializer /root/hi3518/RT3070/os/linux/../../os/linux/sta_ioctl.c:2227: warning: initialization from incompatible pointer type /root/hi3518/RT3070/os/linux/../../os/linux/sta_ioctl.c:2228: error: unknown field ‘num_private‘ specified in initializer /root/hi3518/RT3070/os/linux/../../os/linux/sta_ioctl.c:2228: warning: excess elements in struct initializer /root/hi3518/RT3070/os/linux/../../os/linux/sta_ioctl.c:2228: warning: (near initialization for ‘rt28xx_iw_handler_def‘) /root/hi3518/RT3070/os/linux/../../os/linux/sta_ioctl.c:2229: error: unknown field ‘private_args‘ specified in initializer /root/hi3518/RT3070/os/linux/../../os/linux/sta_ioctl.c:2229: warning: excess elements in struct initializer /root/hi3518/RT3070/os/linux/../../os/linux/sta_ioctl.c:2229: warning: (near initialization for ‘rt28xx_iw_handler_def‘) /root/hi3518/RT3070/os/linux/../../os/linux/sta_ioctl.c:2230: error: unknown field ‘num_private_args‘ specified in initializer /root/hi3518/RT3070/os/linux/../../os/linux/sta_ioctl.c:2230: warning: excess elements in struct initializer /root/hi3518/RT3070/os/linux/../../os/linux/sta_ioctl.c:2230: warning: (near initialization for ‘rt28xx_iw_handler_def‘) make[2]: *** [/root/hi3518/RT3070/os/linux/../../os/linux/sta_ioctl.o] 错误 1 make[1]: *** [_module_/root/hi3518/RT3070/os/linux] 错误 2 make[1]:正在离开目录 `/root/hi3518/linux-3.0.y‘ make: *** [LINUX] 错误 2
问题原因:是因为在配置Makefile时,指定的内核在配置时不支持802.11的无线设备驱动。
==>Network deivce support ==>Wireless LAN ==><*> USB ZD1201 based Wireless device support,编译即可
rt3070sta: module has no symbols (stripped?) insmod: can‘t insert ‘rt3070sta.ko‘: invalid module format
解决办法:不能对目标文件进行裁剪
rtusb init rt2870 --->
usbcore: registered new interface driver rt2870
rt5370sta: version magic ‘2.6.32.59 mod_unload ARMv4 ‘ should be ‘2.6.32.2-Frie‘ insmod: cannot insert ‘rt5370sta.ko‘: invalid module format
插入网卡,这个时候ifconfig是看不到网卡的,要启用网卡,用以下命令:
ifconfig ra0 up
标签:
原文地址:http://www.cnblogs.com/youthshouting/p/4278474.html