Failed to make in Kernel 4.9.201-tegra

1
open
BananaGorilla98
BananaGorilla98
Posted 6 months ago

Failed to make in Kernel 4.9.201-tegra #6

Hi,

I am trying to install the network adapter driver in my Jetson Nano with Kernel 4.9.201-terga. However, it failed to compile the qmi_wwan.c file.

Here is the error message:

rm -rf *~ .tmp_versions modules.order Module.symvers
find . -type f -name *~ -o -name *.o -o -name *.ko -o -name *.cmd -o -name *.mod.c |  xargs rm -rf
make -C /lib/modules/4.9.201-tegra/build M=/home/jetson/Quectel_USB_Serial_Driver modules
make[1]: Entering directory '/usr/src/linux-headers-4.9.201-tegra-ubuntu18.04_aarch64/kernel-4.9'
  CC [M]  /home/jetson/Quectel_USB_Serial_Driver/./drivers/usb/serial/usb_wwan.o
  CC [M]  /home/jetson/Quectel_USB_Serial_Driver/./drivers/usb/serial/option.o
  CC [M]  /home/jetson/Quectel_USB_Serial_Driver/./drivers/usb/serial/qcserial.o
/home/jetson/Quectel_USB_Serial_Driver/./drivers/usb/serial/qcserial.c:91:34: warning: "/*" within comment [-Wcomment]
 /* {USB_DEVICE(0x05c6, 0x9215)}, /* Acer Gobi 2000 Modem device (VP413) */

  CC [M]  /home/jetson/Quectel_USB_Serial_Driver/./drivers/net/usb/qmi_wwan.o
/home/jetson/Quectel_USB_Serial_Driver/./drivers/net/usb/qmi_wwan.c: In function ‘qmimux_start_xmit’:
/home/jetson/Quectel_USB_Serial_Driver/./drivers/net/usb/qmi_wwan.c:104:6: error: assignment from incompatible pointer type [-Werror=incompatible-pointer-types]
  hdr = skb_push(skb, sizeof(struct qmimux_hdr));
      ^
/home/jetson/Quectel_USB_Serial_Driver/./drivers/net/usb/qmi_wwan.c: In function ‘qmimux_setup’:
/home/jetson/Quectel_USB_Serial_Driver/./drivers/net/usb/qmi_wwan.c:126:5: error: ‘struct net_device’ has no member named ‘needs_free_netdev’
  dev->needs_free_netdev = true;
     ^~
/home/jetson/Quectel_USB_Serial_Driver/./drivers/net/usb/qmi_wwan.c: In function ‘qmimux_rx_fixup’:
/home/jetson/Quectel_USB_Serial_Driver/./drivers/net/usb/qmi_wwan.c:191:3: error: implicit declaration of function ‘skb_put_data’; did you mean ‘skb_add_data’? [-Werror=implicit-function-declaration]
   skb_put_data(skbn, skb->data + offset, len);
   ^~~~~~~~~~~~
   skb_add_data
/home/jetson/Quectel_USB_Serial_Driver/./drivers/net/usb/qmi_wwan.c: In function ‘qmimux_register_device’:
/home/jetson/Quectel_USB_Serial_Driver/./drivers/net/usb/qmi_wwan.c:224:8: error: too many arguments to function ‘netdev_upper_dev_link’
  err = netdev_upper_dev_link(real_dev, new_dev, NULL);
        ^~~~~~~~~~~~~~~~~~~~~
In file included from /home/jetson/Quectel_USB_Serial_Driver/./drivers/net/usb/qmi_wwan.c:15:0:
./include/linux/netdevice.h:3966:5: note: declared here
 int netdev_upper_dev_link(struct net_device *dev, struct net_device *upper_dev);
     ^~~~~~~~~~~~~~~~~~~~~
/home/jetson/Quectel_USB_Serial_Driver/./drivers/net/usb/qmi_wwan.c: At top level:
/home/jetson/Quectel_USB_Serial_Driver/./drivers/net/usb/qmi_wwan.c:548:21: error: ‘usbnet_get_stats64’ undeclared here (not in a function); did you mean ‘usbnet_get_settings’?
  .ndo_get_stats64 = usbnet_get_stats64,
                     ^~~~~~~~~~~~~~~~~~
                     usbnet_get_settings
/home/jetson/Quectel_USB_Serial_Driver/./drivers/net/usb/qmi_wwan.c:1277:39: warning: "/*" within comment [-Wcomment]
 /* {QMI_GOBI_DEVICE(0x05c6, 0x9215)}, /* Acer Gobi 2000 Modem device (VP413) */

cc1: some warnings being treated as errors
scripts/Makefile.build:341: recipe for target '/home/jetson/Quectel_USB_Serial_Driver/./drivers/net/usb/qmi_wwan.o' failed
make[2]: *** [/home/jetson/Quectel_USB_Serial_Driver/./drivers/net/usb/qmi_wwan.o] Error 1
Makefile:1646: recipe for target '_module_/home/jetson/Quectel_USB_Serial_Driver' failed
make[1]: *** [_module_/home/jetson/Quectel_USB_Serial_Driver] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.9.201-tegra-ubuntu18.04_aarch64/kernel-4.9'
Makefile:10: recipe for target 'modules' failed
make: *** [modules] Error 2

May I know if there is any method to solve this problem?

Thanks in advanced!

bacnh85
bacnh85
Created 2 months ago

@BananaGorilla98 kernel 4.9.201 already have needed qmi driver, however it is not built together with Tegra image.

You can compile qmi driver by copying from kernel 4.9.201 to this repo folder and compile it, instead of using this repo source code.

kernel_4.9.201/drivers/usb/net/usb/qmi_wwan.c --> drivers/usb/net/usb/qmi_wwan.c