欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

Openwrt 移植MT7628驱动遇到的问题记录

程序员文章站 2022-07-12 18:59:32
...

本人所写的博客都为开发之中遇到问题记录的随笔,主要是给自己积累些问题。免日后无印象,如有不当之处敬请指正(欢迎进扣群 24849632 探讨问题);

In file included from /home/bruce/MT7628/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt7628-linuxap_v4p1-20200414/build/../mt_wifi/embedded/include/rt_config.h:59:0,
                 from /home/bruce/MT7628/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt7628-linuxap_v4p1-20200414/build/../mt_wifi/embedded/ap/ap.c:29:
/home/bruce/MT7628/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt7628-linuxap_v4p1-20200414/build/../mt_wifi/embedded/include/rtmp.h:618:18: error: 'TX_RING_SIZE' undeclared here (not in a function); did you mean 'TC_RTAB_SIZE'?
  RTMP_DMACB Cell[TX_RING_SIZE];
                  ^~~~~~~~~~~~
                  TC_RTAB_SIZE
/home/bruce/MT7628/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt7628-linuxap_v4p1-20200414/build/../mt_wifi/embedded/include/rtmp.h:629:18: error: 'RX_RING_SIZE' undeclared here (not in a function); did you mean 'TX_RING_SIZE'?
  RTMP_DMACB Cell[RX_RING_SIZE];

增加 #include "rtmp_def.h";注释 L79 #ifdef RTMP_MAC_SDIO 及 L89  #endif /* RTMP_MAC_SDIO */

 

  CC [M]  /home/bruce/MT7628/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt7628-linuxap_v4p1-20200414/build/../mt_wifi/embedded/ap/ap.o
In file included from /home/bruce/MT7628/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt7628-linuxap_v4p1-20200414/build/../mt_wifi/embedded/include/rt_config.h:59:0,
                 from /home/bruce/MT7628/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt7628-linuxap_v4p1-20200414/build/../mt_wifi/embedded/ap/ap.c:29:
/home/bruce/MT7628/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt7628-linuxap_v4p1-20200414/build/../mt_wifi/embedded/include/rtmp.h:797:24: error: 'NUM_OF_TX_RING' undeclared here (not in a function); did you mean 'RTMP_TX_RING'?
  ULONG OneSecOsTxCount[NUM_OF_TX_RING];
                        ^~~~~~~~~~~~~~
                        RTMP_TX_RING
/home/bruce/MT7628/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt7628-linuxap_v4p1-20200414/build/../mt_wifi/embedded/include/rtmp.h:1567:64: error: 'struct _TX_BLK' declared inside parameter list will not be visible outside of this definition or declaration [-Werror]
  NDIS_STATUS (*wdev_hard_tx)(struct _RTMP_ADAPTER *pAd, struct _TX_BLK *pTxBlk);
                                                                ^~~~~~~
/home/bruce/MT7628/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt7628-linuxap_v4p1-20200414/build/../mt_wifi/embedded/include/rtmp.h:1580:2: error: unknown type name 'RSSI_SAMPLE'
  RSSI_SAMPLE RssiSample;
  ^~~~~~~~~~~
/home/bruce/MT7628/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt7628-linuxap_v4p1-20200414/build/../mt_wifi/embedded/include/rtmp.h:2699:24: error: 'WMM_QUE_NUM' undeclared here (not in a function); did you mean 'PCI_BUS_NUM'?
  QUEUE_HEADER tx_queue[WMM_QUE_NUM];

增加 #include "mac/mac_mt/smac/mt_mac.h"

 

  CC [M]  /home/bruce/MT7628/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt7628-linuxap_v4p1-20200414/build/../mt_wifi/embedded/ap/ap.o
In file included from /home/bruce/MT7628/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt7628-linuxap_v4p1-20200414/build/../mt_wifi/embedded/include/rt_config.h:59:0,
                 from /home/bruce/MT7628/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt7628-linuxap_v4p1-20200414/build/../mt_wifi/embedded/ap/ap.c:29:
/home/bruce/MT7628/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt7628-linuxap_v4p1-20200414/build/../mt_wifi/embedded/include/rtmp.h:1568:64: error: 'struct _TX_BLK' declared inside parameter list will not be visible outside of this definition or declaration [-Werror]
  NDIS_STATUS (*wdev_hard_tx)(struct _RTMP_ADAPTER *pAd, struct _TX_BLK *pTxBlk);
                                                                ^~~~~~~
/home/bruce/MT7628/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt7628-linuxap_v4p1-20200414/build/../mt_wifi/embedded/include/rtmp.h:1581:2: error: unknown type name 'RSSI_SAMPLE'
  RSSI_SAMPLE RssiSample;
  ^~~~~~~~~~~
/home/bruce/MT7628/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt7628-linuxap_v4p1-20200414/build/../mt_wifi/embedded/include/rtmp.h:2858:2: error: unknown type name 'RSSI_SAMPLE'
  RSSI_SAMPLE RssiSample;
  ^~~~~~~~~~~
/home/bruce/MT7628/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt7628-linuxap_v4p1-20200414/build/../mt_wifi/embedded/include/rtmp.h:3541:2: error: unknown type name 'RSSI_SAMPLE'
  RSSI_SAMPLE RssiSample;
  ^~~~~~~~~~~
/home/bruce/MT7628/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt7628-linuxap_v4p1-20200414/build/../mt_wifi/embedded/include/rtmp.h:5221:2: error: unknown type name 'TX_AC_PARAM_T'
  TX_AC_PARAM_T   CurrEdcaParam[CMD_EDCA_AC_MAX];

增加 #include "iface/rtmp_pci.h"

 

  CC [M]  /home/bruce/MT7628/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt7628-linuxap_v4p1-20200414/build/../mt_wifi/embedded/ap/ap.o
In file included from /home/bruce/MT7628/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt7628-linuxap_v4p1-20200414/build/../mt_wifi/embedded/include/rt_config.h:59:0,
                 from /home/bruce/MT7628/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt7628-linuxap_v4p1-20200414/build/../mt_wifi/embedded/ap/ap.c:29:
/home/bruce/MT7628/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt7628-linuxap_v4p1-20200414/build/../mt_wifi/embedded/include/rtmp.h:1582:2: error: unknown type name 'RSSI_SAMPLE'
  RSSI_SAMPLE RssiSample;
  ^~~~~~~~~~~
/home/bruce/MT7628/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt7628-linuxap_v4p1-20200414/build/../mt_wifi/embedded/include/rtmp.h:2859:2: error: unknown type name 'RSSI_SAMPLE'
  RSSI_SAMPLE RssiSample;
  ^~~~~~~~~~~
/home/bruce/MT7628/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt7628-linuxap_v4p1-20200414/build/../mt_wifi/embedded/include/rtmp.h:3542:2: error: unknown type name 'RSSI_SAMPLE'
  RSSI_SAMPLE RssiSample;

增加 #include "phy/phy.h"

 

  CC [M]  /home/bruce/MT7628/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt7628-linuxap_v4p1-20200414/build/../mt_wifi/embedded/ap/ap.o
In file included from /home/bruce/MT7628/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt7628-linuxap_v4p1-20200414/build/../mt_wifi/embedded/include/rt_config.h:59:0,
                 from /home/bruce/MT7628/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt7628-linuxap_v4p1-20200414/build/../mt_wifi/embedded/ap/ap.c:29:
/home/bruce/MT7628/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt7628-linuxap_v4p1-20200414/build/../mt_wifi/embedded/include/rtmp.h:5223:2: error: unknown type name 'TX_AC_PARAM_T'
  TX_AC_PARAM_T   CurrEdcaParam[CMD_EDCA_AC_MAX];
  ^~~~~~~~~~~~~
/home/bruce/MT7628/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt7628-linuxap_v4p1-20200414/build/../mt_wifi/embedded/include/rtmp.h:5223:32: error: 'CMD_EDCA_AC_MAX' undeclared here (not in a function); did you mean '__TCA_ACT_MAX'?
  TX_AC_PARAM_T   CurrEdcaParam[CMD_EDCA_AC_MAX];
                                ^~~~~~~~~~~~~~~
                                __TCA_ACT_MAX
/home/bruce/MT7628/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt7628-linuxap_v4p1-20200414/build/../mt_wifi/embedded/include/rtmp.h:5426:2: error: unknown type name 'RXWI_STRUC'
  RXWI_STRUC *pRxWI; /*in frame buffer and after "rx_info" fields */
  ^~~~~~~~~~
/home/bruce/MT7628/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt7628-linuxap_v4p1-20200414/build/../mt_wifi/embedded/ap/ap.c: In function 'set_wdev_if_addr':
/home/bruce/MT7628/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt7628-linuxap_v4p1-20200414/build/../mt_wifi/embedded/ap/ap.c:58:6: error: unused variable 'idx' [-Werror=unused-variable]
  INT idx = wdev->func_idx;
      ^~~
/home/bruce/MT7628/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt7628-linuxap_v4p1-20200414/build/../mt_wifi/embedded/ap/ap.c: In function 'MacTableMaintenance':
/home/bruce/MT7628/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt7628-linuxap_v4p1-20200414/build/../mt_wifi/embedded/ap/ap.c:1204:3: error: implicit declaration of function 'CheckSkipTX' [-Werror=implicit-function-declaration]
   CheckSkipTX(pAd, pEntry);

增加  #include "mcu/mt_cmd.h"

 

  CC [M]  /home/bruce/MT7628/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt7628-linuxap_v4p1-20200414/build/../mt_wifi/embedded/ap/ap.o
In file included from /home/bruce/MT7628/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt7628-linuxap_v4p1-20200414/build/../mt_wifi/embedded/include/rt_config.h:59:0,
                 from /home/bruce/MT7628/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt7628-linuxap_v4p1-20200414/build/../mt_wifi/embedded/ap/ap.c:29:
/home/bruce/MT7628/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt7628-linuxap_v4p1-20200414/build/../mt_wifi/embedded/include/rtmp.h:5427:2: error: unknown type name 'RXWI_STRUC'
  RXWI_STRUC *pRxWI; /*in frame buffer and after "rx_info" fields */
  ^~~~~~~~~~
/home/bruce/MT7628/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt7628-linuxap_v4p1-20200414/build/../mt_wifi/embedded/ap/ap.c: In function 'set_wdev_if_addr':
/home/bruce/MT7628/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt7628-linuxap_v4p1-20200414/build/../mt_wifi/embedded/ap/ap.c:58:6: error: unused variable 'idx' [-Werror=unused-variable]
  INT idx = wdev->func_idx;

增加  #include "mac/mac_mt/mt_mac_ctrl.h"

 

  CC [M]  /home/bruce/MT7628/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt7628-linuxap_v4p1-20200414/build/../mt_wifi/embedded/ap/ap.o
/home/bruce/MT7628/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt7628-linuxap_v4p1-20200414/build/../mt_wifi/embedded/ap/ap.c: In function 'set_wdev_if_addr':
/home/bruce/MT7628/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt7628-linuxap_v4p1-20200414/build/../mt_wifi/embedded/ap/ap.c:58:6: error: unused variable 'idx' [-Werror=unused-variable]
  INT idx = wdev->func_idx;
      ^~~
/home/bruce/MT7628/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt7628-linuxap_v4p1-20200414/build/../mt_wifi/embedded/ap/ap.c: In function 'MacTableMaintenance':
/home/bruce/MT7628/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt7628-linuxap_v4p1-20200414/build/../mt_wifi/embedded/ap/ap.c:1204:3: error: implicit declaration of function 'CheckSkipTX' [-Werror=implicit-function-declaration]
   CheckSkipTX(pAd, pEntry);
   ^~~~~~~~~~~
/home/bruce/MT7628/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt7628-linuxap_v4p1-20200414/build/../mt_wifi/embedded/ap/ap.c:1684:3: error: implicit declaration of function 'MtAsicSetRTSTxCntLimit'; did you mean 'AsicSetRetryLimit'? [-Werror=implicit-function-declaration]
   MtAsicSetRTSTxCntLimit(pAd, TRUE, 0x7);

因为没有加入mt_ps.o

 

  CC [M]  /home/bruce/MT7628/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt7628-linuxap_v4p1-20200414/build/../mt_wifi/embedded/ap/ap_cfg.o
/home/bruce/MT7628/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt7628-linuxap_v4p1-20200414/build/../mt_wifi/embedded/ap/ap_cfg.c: In function 'Show_DriverInfo_Proc':
/home/bruce/MT7628/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt7628-linuxap_v4p1-20200414/build/../mt_wifi/embedded/ap/ap_cfg.c:6683:126: error: macro "__DATE__" might prevent reproducible builds [-Werror=date-time]
  MTWF_LOG(DBG_CAT_ALL, DBG_SUBCAT_ALL, DBG_LVL_OFF, ("driver version: %s (%s %s) .\n", AP_DRIVER_VERSION, __DATE__, __TIME__));
                                                                                                                              ^
/home/bruce/MT7628/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt7628-linuxap_v4p1-20200414/build/../mt_wifi/embedded/ap/ap_cfg.c:6683:126: error: macro "__TIME__" might prevent reproducible builds [-Werror=date-time]
cc1: all warnings being treated as errors
scripts/Makefile.build:326: recipe for target '/home/bruce/MT7628/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt7628-linuxap_v4p1-20200414/build/../mt_wifi/embedded/ap/ap_cfg.o' failed

解决macro "__TIME__" might prevent reproducible builds [-Werror=date-time]错误

 

  CC [M]  /home/bruce/MT7628/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt7628-linuxap_v4p1-20200414/build/../mt_wifi/embedded/common/mlme.o
/home/bruce/MT7628/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt7628-linuxap_v4p1-20200414/build/../mt_wifi/embedded/common/mlme.c: In function 'MlmeEnqueueForWsc':
/home/bruce/MT7628/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt7628-linuxap_v4p1-20200414/build/../mt_wifi/embedded/common/mlme.c:5667:5: error: this 'if' clause does not guard... [-Werror=misleading-indentation]
     if (RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_HALT_IN_PROGRESS))
     ^~
/home/bruce/MT7628/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt7628-linuxap_v4p1-20200414/build/../mt_wifi/embedded/common/mlme.c:5671:2: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
  if (MsgLen > MGMT_DMA_BUFFER_SIZE)
  ^~
cc1: all warnings being treated as errors

gcc编译警告关于(warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] if(err)之类的问题) ,修改第common/mlme.c:5667行为:

if (RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_HALT_IN_PROGRESS)) return FALSE;

后面还有类似的问题,添加 EXTRA_CFLAGS += -Wno-misleading-indentation 以解决

 

  CC [M]  /home/bruce/MT7628/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt7628-linuxap_v4p1-20200414/build/../mt_wifi/embedded/os/linux/rt_profile.o
/home/bruce/MT7628/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt7628-linuxap_v4p1-20200414/build/../mt_wifi/embedded/os/linux/rt_profile.c: In function 'RTMPReadParametersHook':
/home/bruce/MT7628/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt7628-linuxap_v4p1-20200414/build/../mt_wifi/embedded/os/linux/rt_profile.c:239:27: error: 'struct file' has no member named 'f_dentry'; did you mean 'f_owner'?
      fsize = (ULONG)srcf->f_dentry->d_inode->i_size;
                           ^~~~~~~~
                           f_owner

编译驱动时error: ‘struct file’ has no member named ‘f_dentry’

 

  CC [M]  /home/bruce/MT7628/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt7628-linuxap_v4p1-20200414/build/../mt_wifi/embedded/common/wsc.o
In file included from ./include/linux/spinlock.h:297:0,
                 from ./include/linux/seqlock.h:36,
                 from ./include/linux/time.h:6,
                 from ./include/linux/stat.h:19,
                 from ./include/linux/module.h:10,
                 from /home/bruce/MT7628/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt7628-linuxap_v4p1-20200414/build/../mt_wifi/embedded/include/os/rt_linux.h:18,
                 from /home/bruce/MT7628/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt7628-linuxap_v4p1-20200414/build/../mt_wifi/embedded/include/rtmp_os.h:46,
                 from /home/bruce/MT7628/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt7628-linuxap_v4p1-20200414/build/../mt_wifi/embedded/include/rtmp_comm.h:75,
                 from /home/bruce/MT7628/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt7628-linuxap_v4p1-20200414/build/../mt_wifi/embedded/include/rt_config.h:35,
                 from /home/bruce/MT7628/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt7628-linuxap_v4p1-20200414/build/../mt_wifi/embedded/common/wsc.c:32:
/home/bruce/MT7628/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt7628-linuxap_v4p1-20200414/build/../mt_wifi/embedded/common/wsc.c: In function 'WscGetConfWithoutTrigger':
/home/bruce/MT7628/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt7628-linuxap_v4p1-20200414/build/../mt_wifi/embedded/common/wsc.c:9536:20: error: 'tasklist_lock' undeclared (first use in this function); did you mean 'tasklet_unlock'?
         read_lock(&tasklist_lock);
                    ^
./include/linux/spinlock_api_up.h:28:32: note: in definition of macro '___LOCK'
   do { __acquire(lock); (void)(lock); } while (0)
                                ^~~~
./include/linux/spinlock_api_up.h:60:32: note: in expansion of macro '__LOCK'
 #define _raw_read_lock(lock)   __LOCK(lock)
                                ^~~~~~
./include/linux/rwlock.h:65:26: note: in expansion of macro '_raw_read_lock'
 #define read_lock(lock)  _raw_read_lock(lock)
                          ^~~~~~~~~~~~~~
/home/bruce/MT7628/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt7628-linuxap_v4p1-20200414/build/../mt_wifi/embedded/common/wsc.c:9536:9: note: in expansion of macro 'read_lock'
         read_lock(&tasklist_lock);
         ^~~~~~~~~
/home/bruce/MT7628/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt7628-linuxap_v4p1-20200414/build/../mt_wifi/embedded/common/wsc.c:9536:20: note: each undeclared identifier is reported only once for each function it appears in
         read_lock(&tasklist_lock);

[进程管理] 内核版本2.6.32中,tasklist_lock没有做导出怎么办, 修改common/wsc.c L9532处为

   {
#define WSC_SINGLE_TRIGGER_APPNAME  "goahead"

        struct task_struct *p;
        // read_lock(&tasklist_lock);
		rcu_read_lock();
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,21)
	for_each_process(p)
#else
	for_each_task(p)
#endif
	{
            if(!strcmp(p->comm, WSC_SINGLE_TRIGGER_APPNAME))
                send_sig(SIGXFSZ, p, 0);
        }
        // read_unlock(&tasklist_lock);
		rcu_read_unlock();
    }
/* ---  added by [email protected], 08/03/12 */
#endif /* WSC_SINGLE_TRIGGER */
#endif /* LINUX */

 

  CC [M]  /home/bruce/MT7628/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt7628-linuxap_v4p1-20200414/build/../mt_wifi/embedded/common/wsc.o
/home/bruce/MT7628/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt7628-linuxap_v4p1-20200414/build/../mt_wifi/embedded/common/wsc.c: In function 'WscGetConfWithoutTrigger':
/home/bruce/MT7628/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt7628-linuxap_v4p1-20200414/build/../mt_wifi/embedded/common/wsc.c:9539:2: error: implicit declaration of function 'for_each_process'; did you mean 'for_each_node'? [-Werror=implicit-function-declaration]
  for_each_process(p)
  ^~~~~~~~~~~~~~~~
  for_each_node
/home/bruce/MT7628/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt7628-linuxap_v4p1-20200414/build/../mt_wifi/embedded/common/wsc.c:9543:2: error: expected ';' before '{' token
  {
  ^

增加 EXTRA_CFLAGS += -Wno-implicit-function-declaration

 

  CC [M]  /home/bruce/MT7628/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt7628-linuxap_v4p1-20200414/build/../mt_wifi/embedded/common/wsc.o
/home/bruce/MT7628/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt7628-linuxap_v4p1-20200414/build/../mt_wifi/embedded/common/wsc.c: In function 'WscGetConfWithoutTrigger':
/home/bruce/MT7628/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt7628-linuxap_v4p1-20200414/build/../mt_wifi/embedded/common/wsc.c:9543:2: error: expected ';' before '{' token
  {
  ^

这个没有找到具体原因,先屏蔽再看

  LD [M]  /home/bruce/MT7628/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt7628-linuxap_v4p1-20200414/build/mt7628.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /home/bruce/MT7628/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt7628-linuxap_v4p1-20200414/build/mt7628.mod.o
  LD [M]  /home/bruce/MT7628/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/mt7628-linuxap_v4p1-20200414/build/mt7628.ko
make: Leaving directory '/home/bruce/MT7628/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/linux-4.14.171'
[email protected]:~/MT7628/openwrt$ 

编译通过,具体过程可看我另一遍网文  OpenWRT 无线网络配置