[other] 编译ASIX_USB_NIC_Linux_Driver_Source_v3.0.0报错
Tofloor
poster avatar
什么是快乐星球
deepin
2024-08-08 11:39
Author

系统信息

image.png

起因

主要是有一个绿联的type-c拓展坞,但是插上电脑后无法识别网卡,看网上说是要自己编译一个驱动,但是在编译过程中报错了,

在关机中如果拓展坞没有拔掉会一直卡在关机过程,这个问题是要怎么处理

f63a4202ddfcc97794438e650fb61f8.jpg

编译过程-报错信息

(base) yujiuhuan@yujiuhuan-PC:~/Downloads/Linux/ASIX_USB_NIC_Linux_Driver_Source_v3.0.0$ make
make -C /lib/modules/6.9.6-amd64-desktop-rolling/build M=/home/yujiuhuan/Downloads/Linux/ASIX_USB_NIC_Linux_Driver_Source_v3.0.0 modules
make[1]: 进入目录“/usr/src/linux-headers-6.9.6-amd64-desktop-rolling”
  CC [M]  /home/yujiuhuan/Downloads/Linux/ASIX_USB_NIC_Linux_Driver_Source_v3.0.0/ax_main.o
/home/yujiuhuan/Downloads/Linux/ASIX_USB_NIC_Linux_Driver_Source_v3.0.0/ax_main.c:1901:5: warning: no previous prototype for ‘ax_check_ether_addr’ [-Wmissing-prototypes]
 1901 | int ax_check_ether_addr(struct ax_device *axdev)
      |     ^~~~~~~~~~~~~~~~~~~
/home/yujiuhuan/Downloads/Linux/ASIX_USB_NIC_Linux_Driver_Source_v3.0.0/ax_main.c: In function ‘ax_get_mac_address’:
/home/yujiuhuan/Downloads/Linux/ASIX_USB_NIC_Linux_Driver_Source_v3.0.0/ax_main.c:1966:41: warning: passing argument 6 of ‘ax_read_cmd’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 1966 |                         ETH_ALEN, netdev->dev_addr, 0) < 0) {
      |                                   ~~~~~~^~~~~~~~~~
/home/yujiuhuan/Downloads/Linux/ASIX_USB_NIC_Linux_Driver_Source_v3.0.0/ax_main.c:583:23: note: expected ‘void *’ but argument is of type ‘const unsigned char *’
  583 |                 void *data, int eflag)
      |                 ~~~~~~^~~~
/home/yujiuhuan/Downloads/Linux/ASIX_USB_NIC_Linux_Driver_Source_v3.0.0/ax_main.c:1974:38: warning: passing argument 2 of ‘ax_get_mac_pass’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 1974 |         ax_get_mac_pass(axdev, netdev->dev_addr);
      |                                ~~~~~~^~~~~~~~~~
/home/yujiuhuan/Downloads/Linux/ASIX_USB_NIC_Linux_Driver_Source_v3.0.0/ax_main.c:1866:50: note: expected ‘u8 *’ {aka ‘unsigned char *’} but argument is of type ‘const unsigned char *’
 1866 | int ax_get_mac_pass(struct ax_device *axdev, u8 *mac)
      |                                              ~~~~^~~
/home/yujiuhuan/Downloads/Linux/ASIX_USB_NIC_Linux_Driver_Source_v3.0.0/ax_main.c:1980:41: warning: passing argument 6 of ‘ax_write_cmd’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 1980 |                         ETH_ALEN, netdev->dev_addr) < 0) {
      |                                   ~~~~~~^~~~~~~~~~
/home/yujiuhuan/Downloads/Linux/ASIX_USB_NIC_Linux_Driver_Source_v3.0.0/ax_main.c:607:24: note: expected ‘void *’ but argument is of type ‘const unsigned char *’
  607 |                  void *data)
      |                  ~~~~~~^~~~
  CC [M]  /home/yujiuhuan/Downloads/Linux/ASIX_USB_NIC_Linux_Driver_Source_v3.0.0/ax88179_178a.o
/home/yujiuhuan/Downloads/Linux/ASIX_USB_NIC_Linux_Driver_Source_v3.0.0/ax88179_178a.c:48:5: warning: no previous prototype for ‘ax88179_signature’ [-Wmissing-prototypes]
   48 | int ax88179_signature(struct ax_device *axdev, struct _ax_ioctl_command *info)
      |     ^~~~~~~~~~~~~~~~~
/home/yujiuhuan/Downloads/Linux/ASIX_USB_NIC_Linux_Driver_Source_v3.0.0/ax88179_178a.c:54:5: warning: no previous prototype for ‘ax88179_read_eeprom’ [-Wmissing-prototypes]
   54 | int ax88179_read_eeprom(struct ax_device *axdev, struct _ax_ioctl_command *info)
      |     ^~~~~~~~~~~~~~~~~~~
/home/yujiuhuan/Downloads/Linux/ASIX_USB_NIC_Linux_Driver_Source_v3.0.0/ax88179_178a.c:133:5: warning: no previous prototype for ‘ax88179_write_eeprom’ [-Wmissing-prototypes]
  133 | int ax88179_write_eeprom(struct ax_device *axdev,
      |     ^~~~~~~~~~~~~~~~~~~~
  CC [M]  /home/yujiuhuan/Downloads/Linux/ASIX_USB_NIC_Linux_Driver_Source_v3.0.0/ax88179a_772d.o
/home/yujiuhuan/Downloads/Linux/ASIX_USB_NIC_Linux_Driver_Source_v3.0.0/ax88179a_772d.c:255:27: error: initialization of ‘int (*)(struct net_device *, struct ethtool_keee *)’ from incompatible pointer type ‘int (*)(struct net_device *, struct ethtool_eee *)’ [-Werror=incompatible-pointer-types]
  255 |         .get_eee        = ax88179a_get_eee,
      |                           ^~~~~~~~~~~~~~~~
/home/yujiuhuan/Downloads/Linux/ASIX_USB_NIC_Linux_Driver_Source_v3.0.0/ax88179a_772d.c:255:27: note: (near initialization for ‘ax88179a_ethtool_ops.get_eee’)
/home/yujiuhuan/Downloads/Linux/ASIX_USB_NIC_Linux_Driver_Source_v3.0.0/ax88179a_772d.c:256:27: error: initialization of ‘int (*)(struct net_device *, struct ethtool_keee *)’ from incompatible pointer type ‘int (*)(struct net_device *, struct ethtool_eee *)’ [-Werror=incompatible-pointer-types]
  256 |         .set_eee        = ax88179a_set_eee,
      |                           ^~~~~~~~~~~~~~~~
/home/yujiuhuan/Downloads/Linux/ASIX_USB_NIC_Linux_Driver_Source_v3.0.0/ax88179a_772d.c:256:27: note: (near initialization for ‘ax88179a_ethtool_ops.set_eee’)
/home/yujiuhuan/Downloads/Linux/ASIX_USB_NIC_Linux_Driver_Source_v3.0.0/ax88179a_772d.c:300:6: warning: no previous prototype for ‘ax88179a_get_fw_version’ [-Wmissing-prototypes]
  300 | void ax88179a_get_fw_version(struct ax_device *axdev)
      |      ^~~~~~~~~~~~~~~~~~~~~~~
/home/yujiuhuan/Downloads/Linux/ASIX_USB_NIC_Linux_Driver_Source_v3.0.0/ax88179a_772d.c:318:5: warning: no previous prototype for ‘ax88179a_signature’ [-Wmissing-prototypes]
  318 | int ax88179a_signature(struct ax_device *axdev, struct _ax_ioctl_command *info)
      |     ^~~~~~~~~~~~~~~~~~
/home/yujiuhuan/Downloads/Linux/ASIX_USB_NIC_Linux_Driver_Source_v3.0.0/ax88179a_772d.c:324:5: warning: no previous prototype for ‘ax88179a_read_version’ [-Wmissing-prototypes]
  324 | int ax88179a_read_version(struct ax_device *axdev,
      |     ^~~~~~~~~~~~~~~~~~~~~
/home/yujiuhuan/Downloads/Linux/ASIX_USB_NIC_Linux_Driver_Source_v3.0.0/ax88179a_772d.c:340:5: warning: no previous prototype for ‘ax88179a_write_flash’ [-Wmissing-prototypes]
  340 | int ax88179a_write_flash(struct ax_device *axdev,
      |     ^~~~~~~~~~~~~~~~~~~~
/home/yujiuhuan/Downloads/Linux/ASIX_USB_NIC_Linux_Driver_Source_v3.0.0/ax88179a_772d.c:395:5: warning: no previous prototype for ‘ax88179a_read_flash’ [-Wmissing-prototypes]
  395 | int ax88179a_read_flash(struct ax_device *axdev, struct _ax_ioctl_command *info)
      |     ^~~~~~~~~~~~~~~~~~~
/home/yujiuhuan/Downloads/Linux/ASIX_USB_NIC_Linux_Driver_Source_v3.0.0/ax88179a_772d.c:435:5: warning: no previous prototype for ‘ax88179a_program_efuse’ [-Wmissing-prototypes]
  435 | int ax88179a_program_efuse(struct ax_device *axdev,
      |     ^~~~~~~~~~~~~~~~~~~~~~
/home/yujiuhuan/Downloads/Linux/ASIX_USB_NIC_Linux_Driver_Source_v3.0.0/ax88179a_772d.c:462:5: warning: no previous prototype for ‘ax88179a_dump_efuse’ [-Wmissing-prototypes]
  462 | int ax88179a_dump_efuse(struct ax_device *axdev, struct _ax_ioctl_command *info)
      |     ^~~~~~~~~~~~~~~~~~~
/home/yujiuhuan/Downloads/Linux/ASIX_USB_NIC_Linux_Driver_Source_v3.0.0/ax88179a_772d.c:488:5: warning: no previous prototype for ‘ax88179a_boot_to_rom’ [-Wmissing-prototypes]
  488 | int ax88179a_boot_to_rom(struct ax_device *axdev,
      |     ^~~~~~~~~~~~~~~~~~~~
/home/yujiuhuan/Downloads/Linux/ASIX_USB_NIC_Linux_Driver_Source_v3.0.0/ax88179a_772d.c:511:5: warning: no previous prototype for ‘ax88179a_erase_flash’ [-Wmissing-prototypes]
  511 | int ax88179a_erase_flash(struct ax_device *axdev,
      |     ^~~~~~~~~~~~~~~~~~~~
/home/yujiuhuan/Downloads/Linux/ASIX_USB_NIC_Linux_Driver_Source_v3.0.0/ax88179a_772d.c:545:5: warning: no previous prototype for ‘ax88179a_sw_reset’ [-Wmissing-prototypes]
  545 | int ax88179a_sw_reset(struct ax_device *axdev, struct _ax_ioctl_command *info)
      |     ^~~~~~~~~~~~~~~~~
/home/yujiuhuan/Downloads/Linux/ASIX_USB_NIC_Linux_Driver_Source_v3.0.0/ax88179a_772d.c:569:5: warning: no previous prototype for ‘ax88179a_ieee_test’ [-Wmissing-prototypes]
  569 | int ax88179a_ieee_test(struct ax_device *axdev, struct _ax_ioctl_command *info)
      |     ^~~~~~~~~~~~~~~~~~
/home/yujiuhuan/Downloads/Linux/ASIX_USB_NIC_Linux_Driver_Source_v3.0.0/ax88179a_772d.c:713:5: warning: no previous prototype for ‘ax88179a_autosuspend_en’ [-Wmissing-prototypes]
  713 | int ax88179a_autosuspend_en(struct ax_device *axdev,
      |     ^~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[3]: *** [scripts/Makefile.build:244:/home/yujiuhuan/Downloads/Linux/ASIX_USB_NIC_Linux_Driver_Source_v3.0.0/ax88179a_772d.o] 错误 1
make[2]: *** [/usr/src/linux-headers-6.9.6-amd64-desktop-rolling/Makefile:1915:/home/yujiuhuan/Downloads/Linux/ASIX_USB_NIC_Linux_Driver_Source_v3.0.0] 错误 2
make[1]: *** [Makefile:240:__sub-make] 错误 2
make[1]: 离开目录“/usr/src/linux-headers-6.9.6-amd64-desktop-rolling”
make: *** [Makefile:59:all] 错误 2
Reply Favorite View the author
All Replies
小勇哥
deepin
2024-08-18 20:06
#1

跟我的情况一样的,我也是绿联的外置扩展,我没有编译,我在静静等待大神看看有没有好的解决方案

Reply View the author