nbfalcon / aic8800

3 stars 0 forks source link

can't compile #1

Open bjlockie opened 1 month ago

bjlockie commented 1 month ago

:/programming/aic8800/src/aic8800_fdrv$ make /bin/sh: 1: test: -lt: unexpected operator make -C /lib/modules/6.8.0-40-generic/build M=/programming/aic8800/src/aic8800_fdrv ARCH=x86_64 CROSS_COMPILE= modules make[1]: Entering directory '/usr/src/linux-headers-6.8.0-40-generic' warning: the compiler differs from the one used to build the kernel The kernel was built by: x86_64-linux-gnu-gcc-13 (Ubuntu 13.2.0-23ubuntu4) 13.2.0 You are using: gcc-13 (Ubuntu 13.2.0-23ubuntu4) 13.2.0 CC [M] /programming/aic8800/src/aic8800_fdrv/rwnx_msg_tx.o CC [M] /programming/aic8800/src/aic8800_fdrv/rwnx_msg_rx.o CC [M] /programming/aic8800/src/aic8800_fdrv/rwnx_utils.o CC [M] /programming/aic8800/src/aic8800_fdrv/rwnx_cmds.o CC [M] /programming/aic8800/src/aic8800_fdrv/rwnx_irqs.o CC [M] /programming/aic8800/src/aic8800_fdrv/rwnx_cfgfile.o CC [M] /programming/aic8800/src/aic8800_fdrv/rwnx_strs.o CC [M] /programming/aic8800/src/aic8800_fdrv/rwnx_rx.o CC [M] /programming/aic8800/src/aic8800_fdrv/rwnx_tx.o /programming/aic8800/src/aic8800_fdrv/rwnx_tx.c:1846:13: warning: conflicting types for ‘rwnx_start_monitor_if_xmit’ due to enum/integer mismatch; have ‘netdev_tx_t(struct sk_buff , struct net_device )’ {aka ‘enum netdev_tx(struct sk_buff , struct net_device )’} [-Wenum-int-mismatch] 1846 | netdev_tx_t rwnx_start_monitor_if_xmit(struct sk_buff skb, struct net_device dev) | ^~~~~~ In file included from /programming/aic8800/src/aic8800_fdrv/rwnx_defs.h:25, from /programming/aic8800/src/aic8800_fdrv/rwnx_tx.c:15: /programming/aic8800/src/aic8800_fdrv/rwnx_tx.h:174:5: note: previous declaration of ‘rwnx_start_monitor_if_xmit’ with type ‘int(struct sk_buff , struct net_device )’ 174 | int rwnx_start_monitor_if_xmit(struct sk_buff skb, struct net_device dev); | ^~~~~~ /programming/aic8800/src/aic8800_fdrv/rwnx_tx.c: In function ‘rwnx_start_monitor_if_xmit’: /programming/aic8800/src/aic8800_fdrv/rwnx_tx.c:2049:24: warning: unused variable ‘gi’ [-Wunused-variable] 2049 | u8 gi = (data5 & IEEE80211_RADIOTAP_HE_DATA5_GI) >> 4; | ^~ CC [M] /programming/aic8800/src/aic8800_fdrv/rwnx_txq.o CC [M] /programming/aic8800/src/aic8800_fdrv/rwnx_main.o CC [M] /programming/aic8800/src/aic8800_fdrv/rwnx_mod_params.o CC [M] /programming/aic8800/src/aic8800_fdrv/rwnx_mesh.o CC [M] /programming/aic8800/src/aic8800_fdrv/rwnx_platform.o CC [M] /programming/aic8800/src/aic8800_fdrv/rwnx_pci.o CC [M] /programming/aic8800/src/aic8800_fdrv/rwnx_dini.o CC [M] /programming/aic8800/src/aic8800_fdrv/rwnx_v7.o CC [M] /programming/aic8800/src/aic8800_fdrv/ipc_host.o CC [M] /programming/aic8800/src/aic8800_fdrv/rwnx_tdls.o CC [M] /programming/aic8800/src/aic8800_fdrv/regdb.o CC [M] /programming/aic8800/src/aic8800_fdrv/md5.o CC [M] /programming/aic8800/src/aic8800_fdrv/aic_vendor.o CC [M] /programming/aic8800/src/aic8800_fdrv/aicwf_compat_8800dc.o CC [M] /programming/aic8800/src/aic8800_fdrv/aicwf_compat_8800d80.o CC [M] /programming/aic8800/src/aic8800_fdrv/rwnx_radar.o CC [M] /programming/aic8800/src/aic8800_fdrv/usb_host.o CC [M] /programming/aic8800/src/aic8800_fdrv/aicwf_txrxif.o CC [M] /programming/aic8800/src/aic8800_fdrv/aicwf_usb.o CC [M] /programming/aic8800/src/aic8800_fdrv/aicwf_wext_linux.o /programming/aic8800/src/aic8800_fdrv/aicwf_wext_linux.c: In function ‘aicwf_get_iwe_stream_mac_addr’: /programming/aic8800/src/aic8800_fdrv/aicwf_wext_linux.c:403:25: warning: the comparison will always evaluate as ‘true’ for the address of ‘bssid’ will never be NULL [-Waddress] 403 | if(scan_re->bss && scan_re->bss->bssid){ | ^~ In file included from /programming/aic8800/src/aic8800_fdrv/rwnx_defs.h:20, from /programming/aic8800/src/aic8800_fdrv/rwnx_msg_tx.h:16, from /programming/aic8800/src/aic8800_fdrv/aicwf_wext_linux.c:10: ./include/net/cfg80211.h:2951:12: note: ‘bssid’ declared here 2951 | u8 bssid[ETH_ALEN]; | ^~~~~ /programming/aic8800/src/aic8800_fdrv/aicwf_wext_linux.c: At top level: /programming/aic8800/src/aic8800_fdrv/aicwf_wext_linux.c:717:5: warning: no previous prototype for ‘aic_get_sec_ie’ [-Wmissing-prototypes] 717 | int aic_get_sec_ie(u8 in_ie, uint in_len, u8 rsn_ie, u16 rsn_len, u8 wpa_ie, u16 wpa_len) | ^~~~~~ /programming/aic8800/src/aic8800_fdrv/aicwf_wext_linux.c:830:4: warning: no previous prototype for ‘aicwf_get_is_wps_ie’ [-Wmissing-prototypes] 830 | u8 aicwf_get_is_wps_ie(u8 ie_ptr, uint *wps_ielen) | ^~~~~~~ LD [M] /programming/aic8800/src/aic8800_fdrv/aic8800_fdrv.o MODPOST /programming/aic8800/src/aic8800_fdrv/Module.symvers ERROR: modpost: "get_adap_test" [/programming/aic8800/src/aic8800_fdrv/aic8800_fdrv.ko] undefined! ERROR: modpost: "get_userconfig_txpwr_idx" [/programming/aic8800/src/aic8800_fdrv/aic8800_fdrv.ko] undefined! ERROR: modpost: "get_testmode" [/programming/aic8800/src/aic8800_fdrv/aic8800_fdrv.ko] undefined! ERROR: modpost: "aicwf_prealloc_txq_alloc" [/programming/aic8800/src/aic8800_fdrv/aic8800_fdrv.ko] undefined! ERROR: modpost: "set_testmode" [/programming/aic8800/src/aic8800_fdrv/aic8800_fdrv.ko] undefined! ERROR: modpost: "get_userconfig_txpwr_ofst" [/programming/aic8800/src/aic8800_fdrv/aic8800_fdrv.ko] undefined! ERROR: modpost: "get_fw_path" [/programming/aic8800/src/aic8800_fdrv/aic8800_fdrv.ko] undefined! make[3]: [scripts/Makefile.modpost:145: /programming/aic8800/src/aic8800_fdrv/Module.symvers] Error 1 make[2]: [/usr/src/linux-headers-6.8.0-40-generic/Makefile:1878: modpost] Error 2 make[1]: [Makefile:240: __sub-make] Error 2 make[1]: Leaving directory '/usr/src/linux-headers-6.8.0-40-generic' make: [Makefile:369: modules] Error 2

nbfalcon commented 1 month ago

The kernel module should build now (at least it does for me on Fedora/Kernel 6.10). I haven't tested the newly built module yet. Also note some caveats of this module:

Please let me know how well this driver works for you if you do test.

bjlockie commented 1 month ago
  • it implements older kernel interfaces (not mac80211)

It is based on old code. :-( The 8800 appears to be 1 stream too so not very good.

Copyright(c) 2015-2017 RivieraWaves RivieraWaves S.A.S

bjlockie commented 1 month ago

The kernel module should build now

$ make all
make -C /lib/modules/6.8.0-40-generic/build M=/programming/aic8800-nbfalcon/src ARCH=x86_64 CROSS_COMPILE= modules
make[1]: Entering directory '/usr/src/linux-headers-6.8.0-40-generic'
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: x86_64-linux-gnu-gcc-13 (Ubuntu 13.2.0-23ubuntu4) 13.2.0
  You are using:           gcc-13 (Ubuntu 13.2.0-23ubuntu4) 13.2.0
  CC [M]  /programming/aic8800-nbfalcon/src/aic8800_fdrv/rwnx_main.o
/programming/aic8800-nbfalcon/src/aic8800_fdrv/rwnx_main.c: In function ‘rwnx_csa_finish’:
/programming/aic8800-nbfalcon/src/aic8800_fdrv/rwnx_main.c:1061:17: error: too few arguments to function ‘cfg80211_ch_switch_notify’
 1061 |                 cfg80211_ch_switch_notify(vif->ndev, &csa->chandef, 0);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /programming/aic8800-nbfalcon/src/aic8800_fdrv/rwnx_main.c:16:
./include/net/cfg80211.h:8743:6: note: declared here
 8743 | void cfg80211_ch_switch_notify(struct net_device *dev,
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~
make[4]: *** [scripts/Makefile.build:243: /programming/aic8800-nbfalcon/src/aic8800_fdrv/rwnx_main.o] Error 1
make[3]: *** [scripts/Makefile.build:481: /programming/aic8800-nbfalcon/src/aic8800_fdrv] Error 2
make[2]: *** [/usr/src/linux-headers-6.8.0-40-generic/Makefile:1926: /programming/aic8800-nbfalcon/src] Error 2
make[1]: *** [Makefile:240: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-6.8.0-40-generic'
make: *** [Makefile:55: modules] Error 2

I added a ,0 to /programming/aic8800-nbfalcon/src/aic8800_fdrv/rwnx_main.c to get it past that error but then it got more errors:```

$ make all make -C /lib/modules/6.8.0-40-generic/build M=/programming/aic8800-nbfalcon/src ARCH=x86_64 CROSS_COMPILE= modules make[1]: Entering directory '/usr/src/linux-headers-6.8.0-40-generic' warning: the compiler differs from the one used to build the kernel The kernel was built by: x86_64-linux-gnu-gcc-13 (Ubuntu 13.2.0-23ubuntu4) 13.2.0 You are using: gcc-13 (Ubuntu 13.2.0-23ubuntu4) 13.2.0 CC [M] /programming/aic8800-nbfalcon/src/aic8800_fdrv/rwnx_main.o CC [M] /programming/aic8800-nbfalcon/src/aic8800_fdrv/rwnx_mod_params.o CC [M] /programming/aic8800-nbfalcon/src/aic8800_fdrv/rwnx_mesh.o CC [M] /programming/aic8800-nbfalcon/src/aic8800_fdrv/rwnx_platform.o CC [M] /programming/aic8800-nbfalcon/src/aic8800_fdrv/rwnx_pci.o CC [M] /programming/aic8800-nbfalcon/src/aic8800_fdrv/rwnx_dini.o CC [M] /programming/aic8800-nbfalcon/src/aic8800_fdrv/rwnx_v7.o CC [M] /programming/aic8800-nbfalcon/src/aic8800_fdrv/ipc_host.o CC [M] /programming/aic8800-nbfalcon/src/aic8800_fdrv/rwnx_tdls.o CC [M] /programming/aic8800-nbfalcon/src/aic8800_fdrv/regdb.o CC [M] /programming/aic8800-nbfalcon/src/aic8800_fdrv/md5.o CC [M] /programming/aic8800-nbfalcon/src/aic8800_fdrv/aic_vendor.o CC [M] /programming/aic8800-nbfalcon/src/aic8800_fdrv/aicwf_compat_8800dc.o CC [M] /programming/aic8800-nbfalcon/src/aic8800_fdrv/aicwf_compat_8800d80.o CC [M] /programming/aic8800-nbfalcon/src/aic8800_fdrv/rwnx_radar.o CC [M] /programming/aic8800-nbfalcon/src/aic8800_fdrv/usb_host.o CC [M] /programming/aic8800-nbfalcon/src/aic8800_fdrv/aicwf_txrxif.o CC [M] /programming/aic8800-nbfalcon/src/aic8800_fdrv/aicwf_usb.o CC [M] /programming/aic8800-nbfalcon/src/aic8800_fdrv/aicwf_wext_linux.o /programming/aic8800-nbfalcon/src/aic8800_fdrv/aicwf_wext_linux.c: In function ‘aicwf_get_iwe_stream_mac_addr’: /programming/aic8800-nbfalcon/src/aic8800_fdrv/aicwf_wext_linux.c:403:25: warning: the comparison will always evaluate as ‘true’ for the address of ‘bssid’ will never be NULL [-Waddress] 403 | if(scan_re->bss && scan_re->bss->bssid){ | ^~ In file included from /programming/aic8800-nbfalcon/src/aic8800_fdrv/rwnx_defs.h:20, from /programming/aic8800-nbfalcon/src/aic8800_fdrv/rwnx_msg_tx.h:16, from /programming/aic8800-nbfalcon/src/aic8800_fdrv/aicwf_wext_linux.c:10: ./include/net/cfg80211.h:2951:12: note: ‘bssid’ declared here 2951 | u8 bssid[ETH_ALEN]; | ^~~~~ /programming/aic8800-nbfalcon/src/aic8800_fdrv/aicwf_wext_linux.c: At top level: /programming/aic8800-nbfalcon/src/aic8800_fdrv/aicwf_wext_linux.c:717:5: warning: no previous prototype for ‘aic_get_sec_ie’ [-Wmissing-prototypes] 717 | int aic_get_sec_ie(u8 in_ie, uint in_len, u8 rsn_ie, u16 rsn_len, u8 wpa_ie, u16 wpa_len) | ^~~~~~ /programming/aic8800-nbfalcon/src/aic8800_fdrv/aicwf_wext_linux.c:830:4: warning: no previous prototype for ‘aicwf_get_is_wps_ie’ [-Wmissing-prototypes] 830 | u8 aicwf_get_is_wps_ie(u8 ie_ptr, uint *wps_ielen) | ^~~~~~~ LD [M] /programming/aic8800-nbfalcon/src/aic8800_fdrv/aic8800_fdrv.o MODPOST /programming/aic8800-nbfalcon/src/Module.symvers CC [M] /programming/aic8800-nbfalcon/src/aic_load_fw/aic_load_fw.mod.o LD [M] /programming/aic8800-nbfalcon/src/aic_load_fw/aic_load_fw.ko BTF [M] /programming/aic8800-nbfalcon/src/aic_load_fw/aic_load_fw.ko Skipping BTF generation for /programming/aic8800-nbfalcon/src/aic_load_fw/aic_load_fw.ko due to unavailability of vmlinux CC [M] /programming/aic8800-nbfalcon/src/aic8800_fdrv/aic8800_fdrv.mod.o LD [M] /programming/aic8800-nbfalcon/src/aic8800_fdrv/aic8800_fdrv.ko BTF [M] /programming/aic8800-nbfalcon/src/aic8800_fdrv/aic8800_fdrv.ko Skipping BTF generation for /programming/aic8800-nbfalcon/src/aic8800_fdrv/aic8800_fdrv.ko due to unavailability of vmlinux make[1]: Leaving directory '/usr/src/linux-headers-6.8.0-40-generic'



Is BFF the firmware?
The vmlinux error seems to be a SecureBoot thing (which I turned off).