Depmod error invalid argument

Hello,
I´ve a problem with the USB-WIFI adapter TL-WN725N on a Colibri VF61 module. Because I´m running a dirty kernel I´m trying to add backport driver. I´ve followed instructions from “Kernel Driver Backports Integration” (here):

  • make defconfig-rtlwifi
  • make -j4 modules
  • make modules_install
  • scp -r
    ~/build_wifi/lib/modules/4.4.167-dirty
    root@xxx.xxx.xxx.xxx:/lib/modules/

Then on the Colibri VF61 I try to run:

depmod

But it ends with:

depmod: ERROR: failed to load symbols from /lib/modules/4.4.167-dirty/updates/drivers/net/wireless/realtek/rtlwifi/rtlwifi.ko: Invalid argument
depmod: ERROR: failed to load symbols from /lib/modules/4.4.167-dirty/updates/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.ko: Invalid argument
depmod: ERROR: failed to load symbols from /lib/modules/4.4.167-dirty/updates/drivers/net/wireless/realtek/rtlwifi/rtl8192c/rtl8192c-common.ko: Invalid argument
depmod: ERROR: failed to load symbols from /lib/modules/4.4.167-dirty/updates/net/wireless/cfg80211.ko: Invalid argument
depmod: ERROR: failed to load symbols from /lib/modules/4.4.167-dirty/updates/drivers/net/wireless/realtek/rtlwifi/rtl_usb.ko: Invalid argument
depmod: ERROR: failed to load symbols from /lib/modules/4.4.167-dirty/updates/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/rtl8192cu.ko: Invalid argument
depmod: ERROR: failed to load symbols from /lib/modules/4.4.167-dirty/updates/net/mac80211/mac80211.ko: Invalid argument
depmod: ERROR: failed to load symbols from /lib/modules/4.4.167-dirty/updates/compat/compat.ko: Invalid argument
depmod: WARNING: could not open /lib/modules/4.4.167-dirty/modules.builtin: No such file or directory

What could be the Problem?

Hi @Jo91

I think, you are mixing things up.

If you want to use the Kernel 4.4.167, then you need to install the Bsp 2.8. Could you install the Bsp 2.8b5 and check if your USB-WIFI adapter TL-WN725N is working.

Concerning your question, For deploying backports driver, First you deploy the correct Kernel (4.4.167) and compile the usual modules. After this you can install these modules in a temporary folder and then install the backports driver in the same folder. Once this is done, then you can deploy these modules to the SOM.

Best regards, Jaski

OK, I have downloaded the binary Image 2.8b5 (here), prepared the SD card and flashed it to the target. Wifi works fine.

Then I added a dirty Kernel to Image (copied the zImage file to SD card). Wifi doesn´t work anymore. I tried to backport the drivers and followed these steps:

  1. After kernel modules were compiled
    I´ve deployed them to binary Image

    sudo -E env “PATH=$PATH” make INSTALL_MOD_PATH=…/Colibri-FV-Console-2.8.5/rootfs modules_install

  2. Prepared SD card, copied the new
    zImage to it and flashed the target

  3. Then I backported drivers (make
    defconfig-rtlwifi) and copied after
    all to the target (to the
    /lib/modules folder)

So far it is not possible to use the wifi-Stick because the driver is not detected.

This is the output from dmesg | grep usb

root@colibri-vf:~# dmesg | grep usb
[    0.143837] usbcore: registered new interface driver usbfs
[    0.144012] usbcore: registered new interface driver hub
[    0.144212] usbcore: registered new device driver usb
[    1.160254] usbcore: registered new interface driver usb-storage
[    1.174346] usbcore: registered new interface driver usbserial
[    1.187829] usbcore: registered new interface driver usbserial_generic
[    1.201824] usbserial: USB Serial support registered for generic
[    1.215230] usbcore: registered new interface driver ftdi_sio
[    1.228297] usbserial: USB Serial support registered for FTDI USB Serial Device
[    1.250037] usbcore: registered new interface driver pl2303
[    1.263084] usbserial: USB Serial support registered for pl2303
[    1.278813] 40034000.usb supply vbus not found, using dummy regulator
[    1.552521] usbcore: registered new interface driver usbhid
[    1.567080] usbhid: USB HID core driver
[    1.948237] 40034000.usb supply vbus not found, using dummy regulator
[    2.399594] usb 1-1: new high-speed USB device number 2 using ci_hdrc
[   23.115200] usb0: HOST MAC 00:14:2d:ff:ff:fe
[   23.202012] usb0: MAC 00:14:2d:ff:ff:ff
[   24.539679] IPv6: ADDRCONF(NETDEV_UP): usb0: link is not ready

And this from lsusb:

root@colibri-vf:~# lsusb
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 0bda:8179 Realtek Semiconductor Corp. RTL8188EUS 802.11n Wireless Network Adapter
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

When I run depmod, I get no response.
connmanctl enable wifi ends with

Error wifi: Method "SetProperty" with signature "sv" on interface "net.connman.Technology" doesn't exist

Do you have any suggestions?

OK, I have downloaded the binary Image 2.8b5 (here), prepared the SD card and flashed it to the target. Wifi works fine.

Perfect. Why do you need to backports the driver? Do you need absolutely to use a customised kernel?

Yes, custom kernel is necessary.

Is it correct to use

defconfig-rtlwifi

without menuconfig?

And after copying the compiled modules to target I´m done? I dont need to depmod?

$ scp -r ~/build_wifi/lib/modules/4.4.167-dirty root@xxx.xxx.xxx.xxx:/lib/modules/

OK, thanks for your Input.

Is it correct to use defconfig-rtlwifi without menuconfig?

With menuconfig, you can modify the .config file, which is used to compile the kernel. If the defconfi-rtlwifi included your kernel driver/module, then you don’t need to launch the menuconfig.

And after copying the compiled modules to target I´m done? I dont need to depmod?

Actually you always need to depmod, when you change any kernel module in your system.