Jump to content
  • 0

Petalinux add WiFi driver module .ko file appears"disagrees about version of symbol"


fangzr

Question

 

Board: ZYBO

Environment: Vivado2017.4, Petalinux2017.4, ZYBO BSP package (Digilent Github )

description:

Dear Sir or Madam,I want to compile the RTL8812au driver through the cross-compilation toolchain and run it on the ZYBO board. I tried both methods and all failed:

First:

1. Compile the kernel first (I copied the kernel source from petalinux_prj/build/tmp/work-shared/plnx_arm/kernel-source , and then used petalinux cross compiler tool:"arm-linux-gnueabihf-");

2. In the driver path, modify the makefile, modify the corresponding kernel source path, cross compiler path, kernel version; make

3. Copy the generated 8812au.ko file to the SD card and insmold it. The following error occurs (I tried different versions of the driver source, and appear the same type errors)

root@Zybo:/usr# insmod 8812au.ko                                                
8812au: loading out-of-tree module taints kernel.                               
8812au: disagrees about version of symbol skb_pull                              
8812au: Unknown symbol skb_pull (err -22)                                       
8812au: disagrees about version of symbol netif_napi_del                        
8812au: Unknown symbol netif_napi_del (err -22)                                 
8812au: no symbol version for __cfg80211_alloc_event_skb                        
8812au: disagrees about version of symbol __netdev_alloc_skb                    
8812au: Unknown symbol __netdev_alloc_skb (err -22)                             
8812au: disagrees about version of symbol netif_tx_stop_all_queues              
8812au: Unknown symbol netif_tx_stop_all_queues (err -22)                       
8812au: disagrees about version of symbol __pskb_pull_tail                      
8812au: Unknown symbol __pskb_pull_tail (err -22)                               
8812au: disagrees about version of symbol netif_wake_subqueue                   
8812au: Unknown symbol netif_wake_subqueue (err -22)                            
8812au: disagrees about version of symbol skb_clone                             
8812au: Unknown symbol skb_clone (err -22)                                      
8812au: disagrees about version of symbol skb_put                               
8812au: Unknown symbol skb_put (err -22)                                        
8812au: disagrees about version of symbol init_net                              
8812au: Unknown symbol init_net (err -22)                                       
8812au: disagrees about version of symbol netif_device_attach                   
8812au: Unknown symbol netif_device_attach (err -22)                            
8812au: disagrees about version of symbol netif_tx_wake_queue                   
8812au: Unknown symbol netif_tx_wake_queue (err -22)                            
8812au: disagrees about version of symbol skb_dequeue                           
8812au: Unknown symbol skb_dequeue (err -22)                                    
8812au: disagrees about version of symbol netif_rx                              
8812au: Unknown symbol netif_rx (err -22)                                       
8812au: disagrees about version of symbol skb_copy_bits                         
8812au: Unknown symbol skb_copy_bits (err -22)                                  
8812au: disagrees about version of symbol skb_copy                              
8812au: Unknown symbol skb_copy (err -22)                                       
8812au: disagrees about version of symbol register_netdevice                    
8812au: Unknown symbol register_netdevice (err -22)                             
8812au: disagrees about version of symbol wake_up_process                       
8812au: Unknown symbol wake_up_process (err -22)                                
8812au: disagrees about version of symbol netif_carrier_off                     
8812au: Unknown symbol netif_carrier_off (err -22)                              
8812au: disagrees about version of symbol napi_complete_done                    
8812au: Unknown symbol napi_complete_done (err -22)                             
8812au: disagrees about version of symbol register_netdev                       
8812au: Unknown symbol register_netdev (err -22)                                
8812au: disagrees about version of symbol netif_napi_add                        
8812au: Unknown symbol netif_napi_add (err -22)                                 
8812au: disagrees about version of symbol skb_trim                              
8812au: Unknown symbol skb_trim (err -22)                                       
8812au: disagrees about version of symbol skb_push                              
8812au: Unknown symbol skb_push (err -22)                                       
8812au: disagrees about version of symbol find_vpid                             
8812au: Unknown symbol find_vpid (err -22)                                      
8812au: disagrees about version of symbol __dev_kfree_skb_any                   
8812au: Unknown symbol __dev_kfree_skb_any (err -22)                            
8812au: disagrees about version of symbol netif_carrier_on                      
8812au: Unknown symbol netif_carrier_on (err -22)                               
8812au: disagrees about version of symbol dev_alloc_name                        
8812au: Unknown symbol dev_alloc_name (err -22)                                 
8812au: disagrees about version of symbol unregister_netdev                     
8812au: Unknown symbol unregister_netdev (err -22)                              
8812au: disagrees about version of symbol alloc_etherdev_mqs                    
8812au: Unknown symbol alloc_etherdev_mqs (err -22)                             
8812au: disagrees about version of symbol netif_receive_skb                     
8812au: Unknown symbol netif_receive_skb (err -22)                              
8812au: disagrees about version of symbol __pskb_copy_fclone                    
8812au: Unknown symbol __pskb_copy_fclone (err -22)                             
8812au: disagrees about version of symbol unregister_netdevice_queue            
8812au: Unknown symbol unregister_netdevice_queue (err -22)                     
8812au: disagrees about version of symbol free_netdev                           
8812au: Unknown symbol free_netdev (err -22)                                    
8812au: disagrees about version of symbol napi_disable                          
8812au: Unknown symbol napi_disable (err -22)                                   
8812au: disagrees about version of symbol dev_get_by_name                       
8812au: Unknown symbol dev_get_by_name (err -22)                                
8812au: disagrees about version of symbol skb_queue_tail                        
8812au: Unknown symbol skb_queue_tail (err -22)                                 
8812au: disagrees about version of symbol napi_gro_receive                      
8812au: Unknown symbol napi_gro_receive (err -22)                               
8812au: disagrees about version of symbol eth_type_trans                        
8812au: Unknown symbol eth_type_trans (err -22)                                 
8812au: disagrees about version of symbol __napi_schedule                       
8812au: Unknown symbol __napi_schedule (err -22)                                
insmod: can't insert '8812au.ko': Invalid argument 

 

Other Way:

1) Create a module project 8812au:

petalinux-create -t modules --name 8812au --enable

2) Copy 8812au.ko to the directory of this module (and then I don't know how to do it... I tried putting .ko in files, modifying the 8812au.bb file plus the .ko path, modifying the makefile, removing all: , clean: the latter operation, but petalinux-build -c 8812au error, the error is in the "moudule_install“)

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

Now I use

insmold -f 8812au.ko

the module have been loaded,but Zybo  still can't find rtl8812au as wifi adapter

root@Zybo:~# lsmod    
Module                  Size  Used by
88XXau               1796403  0
root@Zybo:~# ifconfig -a
eth0      Link encap:Ethernet  HWaddr D8:80:39:5F:89:3D  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:29 Base address:0xb000 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1%1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

sit0      Link encap:IPv6-in-IPv4  
          NOARP  MTU:1480  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

root@Zybo:~# usb 1-1: USB disconnect, device number 7
usb 1-1: new high-speed USB device number 8 using ci_hdrc
usb 1-1: USB disconnect, device number 8
usb 1-1: new high-speed USB device number 9 using ci_hdrc
usb 1-1: reset high-speed USB device number 9 using ci_hdrc

 

Link to comment
Share on other sites

Hi @fangzr,

I am not familiar with RTL8812au, but I managed to set up a ath9k dongle driver for the Zybo Z7-20 with petalinux. For the ATH9K it's easier because it has the driver in the kernel you just need to activate it. Regarding the RTL8812au all I can tell you from experience is that some Wireless dongles need additional firmware, like the ATH9K, which will be loaded in to the wireless automatically over  USB, provided you set up your USB port to identify mass storage devices. These should be copied in to the corresponding folder on the rootfs of your target.

Another critical issue is the driver dependencies, some Wireless drivers need to have certain Kernel drivers loaded in order for them to work, like the MAC80211 stack in the Kernel for instance. Please make sure that your driver is not depended on anything else. Based on the log you have sent us, I would start with this.

-Ciprian

Link to comment
Share on other sites

1 hour ago, Ciprian said:

Hi @fangzr,

I am not familiar with RTL8812au, but I managed to set up a ath9k dongle driver for the Zybo Z7-20 with petalinux. For the ATH9K it's easier because it has the driver in the kernel you just need to activate it. Regarding the RTL8812au all I can tell you from experience is that some Wireless dongles need additional firmware, like the ATH9K, which will be loaded in to the wireless automatically over  USB, provided you set up your USB port to identify mass storage devices. These should be copied in to the corresponding folder on the rootfs of your target.

Another critical issue is the driver dependencies, some Wireless drivers need to have certain Kernel drivers loaded in order for them to work, like the MAC80211 stack in the Kernel for instance. Please make sure that your driver is not depended on anything else. Based on the log you have sent us, I would start with this.

-Ciprian

Thank you very much for your reply! My teacher asked me to modify the Makefile and then use the cross-compilation toolchain to compile the WiFi driver. For example, modify CC=gcc, AR=ar, KSRC, ARCH etc.
My teacher limited me to make the WiFi AP in the above way, even though I have been able to configure the wifi driver in the

 Petalinux-config -c kernel 

to make the RT3070 as a WiFi AP easily.
Can you give me some advice on the wireless network card model? I have tried RT3070, RT5572, RTL8812au, MT7601

 

Link to comment
Share on other sites

Hi @fangzr,

It seems to me that you teacher has asked you to write a kernel driver from  scratch (more or less) for a wireless module. Depending on what he expects the driver module to contain, you could either write only the driver for the module it self (RTL8812au for example) or the module and the corresponding dependencies which will make development very hard because you will need to integrate a lot in to the kernel.

I have unfortunately no experience with WiFi kernel driver development, but I would take it one step at a time. Starting with understanding kernel drivers and what their role is and then looking over the WiFi kernel interface, you can read about this here, understanding the structure of it and then starting to write my own driver by looking at already existing one (RT3070 for example). I would also recommend to read about the various forms of kernel debugging like KGDB and how to do that or Xilinx has a brief step by step "tutorial" here about using Xilinx SDK for kernel debugging.

It's no an easy task, Good Luck.

-Ciprian

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...