RT3070驱动程序无法编译

RT3070驱动程序无法编译

我正在尝试在 Arch 上编译 RT3070 驱动程序,但它没有编译。当我运行时,某些文件会编译,但大多数其他文件会吐出错误消息并且不会编译。我不知道该怎么做才能编译它。这是 make 后输出的所有内容:

make -C tools
make[1]: Entering directory '/home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/tools'
gcc -g bin2h.c -o bin2h
make[1]: Leaving directory '/home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/tools'
/home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/tools/bin2h
cp -f os/linux/Makefile.6 /home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/Makefile
make -C /lib/modules/3.16.1-1-ARCH/build SUBDIRS=/home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux modules
make[1]: Entering directory '/usr/lib/modules/3.16.1-1-ARCH/build'
  CC [M]  /home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../common/crypt_md5.o
  CC [M]  /home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../common/crypt_sha2.o
  CC [M]  /home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../common/crypt_hmac.o
  CC [M]  /home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../common/crypt_aes.o
/home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../common/crypt_aes.c: In function ‘AES_Key_Wrap’:
/home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../common/crypt_aes.c:1459:6: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long unsigned int’ [-Wformat=]
      DBGPRINT(RT_DEBUG_ERROR, ("AES_Key_Wrap: allocate %d bytes memory failure.\n", sizeof(UINT8)*PlainTextLength));
      ^
/home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../common/crypt_aes.c: In function ‘AES_Key_Unwrap’:
/home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../common/crypt_aes.c:1554:6: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long unsigned int’ [-Wformat=]
      DBGPRINT(RT_DEBUG_ERROR, ("AES_Key_Unwrap: allocate %d bytes memory failure.\n", sizeof(UINT8)*PlainLength));
      ^
  CC [M]  /home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../common/crypt_arc4.o
  CC [M]  /home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../common/mlme.o
In file included from /home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/include/rtmp_os.h:44:0,
                 from /home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/include/rtmp_comm.h:69,
                 from /home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/include/rt_config.h:33,
                 from /home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../common/mlme.c:28:
/home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../common/mlme.c: In function ‘MlmeResetRalinkCounters’:
/home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../common/mlme.c:568:7: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
       (UINT32)&pAd->RalinkCounters.OneSecEnd -
       ^
/home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/include/os/rt_linux.h:468:76: note: in definition of macro ‘NdisZeroMemory’
 #define NdisZeroMemory(Destination, Length)         memset(Destination, 0, Length)
                                                                            ^
/home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../common/mlme.c:569:7: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
       (UINT32)&pAd->RalinkCounters.OneSecStart);
       ^
/home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/include/os/rt_linux.h:468:76: note: in definition of macro ‘NdisZeroMemory’
 #define NdisZeroMemory(Destination, Length)         memset(Destination, 0, Length)
                                                                            ^
  CC [M]  /home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../common/cmm_wep.o
  CC [M]  /home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../common/action.o
  CC [M]  /home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../common/cmm_data.o
/home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../common/cmm_data.c: In function ‘RtmpPrepareHwNullFrame’:
/home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../common/cmm_data.c:3142:4: warning: passing argument 2 of ‘hex_dump’ from incompatible pointer type
    hex_dump("null frame before", &longValue, 4);
    ^
In file included from /home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/include/rt_config.h:66:0,
                 from /home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../common/cmm_data.c:28:
/home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/include/rt_os_util.h:679:6: note: expected ‘unsigned char *’ but argument is of type ‘UINT32 *’
 void hex_dump(char *str, unsigned char *pSrcBufVA, unsigned int SrcBufLen);
      ^
In file included from /home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/include/rtmp_os.h:44:0,
                 from /home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/include/rtmp_comm.h:69,
                 from /home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/include/rt_config.h:33,
                 from /home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../common/cmm_data.c:28:
/home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/include/os/rt_linux.h:787:2: warning: passing argument 2 of ‘RTUSBReadMACRegister’ makes integer from pointer without a cast
  RTUSBReadMACRegister((_A), (_R), (PUINT32) (_pV))
  ^
/home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../common/cmm_data.c:3150:4: note: in expansion of macro ‘RTMP_IO_READ32’
    RTMP_IO_READ32(pAd, pAd->NullBufOffset + TXWISize+ i, &longValue);
    ^
In file included from /home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/include/rt_config.h:61:0,
                 from /home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../common/cmm_data.c:28:
/home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/include/rtmp.h:7214:10: note: expected ‘USHORT’ but argument is of type ‘USHORT *’
 NTSTATUS RTUSBReadMACRegister(
          ^
/home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../common/cmm_data.c:3151:4: warning: passing argument 2 of ‘hex_dump’ from incompatible pointer type
    hex_dump("null frame after", &longValue, 4);
    ^
In file included from /home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/include/rt_config.h:66:0,
                 from /home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../common/cmm_data.c:28:
/home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/include/rt_os_util.h:679:6: note: expected ‘unsigned char *’ but argument is of type ‘UINT32 *’
 void hex_dump(char *str, unsigned char *pSrcBufVA, unsigned int SrcBufLen);
      ^
/home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../common/cmm_data.c:3021:8: warning: unused variable ‘MlmeRate’ [-Wunused-variable]
  UCHAR MlmeRate;
        ^
  CC [M]  /home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../common/rtmp_init.o
/home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../common/rtmp_init.c: In function ‘NICInitializeAsic’:
/home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../common/rtmp_init.c:1826:11: warning: unused variable ‘apidx’ [-Wunused-variable]
  INT    i,apidx;
           ^
/home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../common/rtmp_init.c:1826:9: warning: unused variable ‘i’ [-Wunused-variable]
  INT    i,apidx;
         ^
  CC [M]  /home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../common/rtmp_init_inf.o
  CC [M]  /home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../common/cmm_tkip.o
  CC [M]  /home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../common/cmm_aes.o
  CC [M]  /home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../common/cmm_sync.o
  CC [M]  /home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../common/eeprom.o
  CC [M]  /home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../common/cmm_sanity.o
  CC [M]  /home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../common/cmm_info.o
  CC [M]  /home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../common/cmm_cfg.o
  CC [M]  /home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../common/cmm_wpa.o
/home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../common/cmm_wpa.c: In function ‘PeerPairMsg3Action’:
/home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../common/cmm_wpa.c:1031:13: warning: unused variable ‘Cancelled’ [-Wunused-variable]
  BOOLEAN    Cancelled;
             ^
/home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../common/cmm_wpa.c: In function ‘RTMPToWirelessSta’:
/home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../common/cmm_wpa.c:424:31: warning: iteration 4u invokes undefined behavior [-Waggressive-loop-optimizations]
       if(pAd->TxSwQueue[Index].Number > 0)
                               ^
/home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../common/cmm_wpa.c:423:6: note: containing loop
      for(Index = 0; Index < 5; Index ++)
      ^
  CC [M]  /home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../common/cmm_radar.o
  CC [M]  /home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../common/spectrum.o
/home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../common/spectrum.c: In function ‘PeerMeasureReportAction’:
/home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../common/spectrum.c:1972:3: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long unsigned int’ [-Wformat=]
   DBGPRINT(RT_DEBUG_ERROR, ("%s unable to alloc memory for measure report buffer (size=%d).\n", __FUNCTION__, sizeof(MEASURE_RPI_REPORT)));
   ^
  CC [M]  /home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../common/rtmp_timer.o
  CC [M]  /home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../common/rt_channel.o
  CC [M]  /home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../common/cmm_profile.o
  CC [M]  /home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../common/cmm_asic.o
/home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../common/cmm_asic.c: In function ‘AsicGetAutoAgcOffsetForTemperatureSensor’:
/home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../common/cmm_asic.c:1188:28: warning: assignment discards ‘const’ qualifier from pointer target type
   TxPowerTuningTableEntry0 = &TxPowerTuningTable[TuningTableIndex0 + TX_POWER_TUNING_ENTRY_OFFSET];
                            ^
/home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../common/cmm_asic.c:1201:28: warning: assignment discards ‘const’ qualifier from pointer target type
   TxPowerTuningTableEntry1 = &TxPowerTuningTable[TuningTableIndex1 + TX_POWER_TUNING_ENTRY_OFFSET];
                            ^
  CC [M]  /home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../common/cmm_cmd.o
  CC [M]  /home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../common/ps.o
  CC [M]  /home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../common/uapsd.o
  CC [M]  /home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../rate_ctrl/ra_ctrl.o
  CC [M]  /home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../rate_ctrl/alg_legacy.o
  CC [M]  /home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../rate_ctrl/alg_ags.o
  CC [M]  /home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../os/linux/rt_profile.o
/home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../os/linux/rt_profile.c: In function ‘STA_MonPktSend’:
/home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../os/linux/rt_profile.c:463:9: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long unsigned int’ [-Wformat=]
         DBGPRINT(RT_DEBUG_ERROR, ("%s : Size is too large! (%d)\n", __FUNCTION__, pRxBlk->DataSize + sizeof(wlan_ng_prism2_header)));
         ^
  CC [M]  /home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../chips/rtmp_chip.o
/home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../chips/rtmp_chip.c: In function ‘RTMPReadChannelPwr’:
/home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../chips/rtmp_chip.c:1380:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
  UCHAR  Tx2ALC = 0, Tx2FinePowerCtrl = 0;
  ^
  CC [M]  /home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../sta/assoc.o
  CC [M]  /home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../sta/auth.o
  CC [M]  /home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../sta/auth_rsp.o
  CC [M]  /home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../sta/sync.o
  CC [M]  /home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../sta/sanity.o
  CC [M]  /home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../sta/rtmp_data.o
/home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../sta/rtmp_data.c: In function ‘STAHandleRxDataFrame’:
/home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../sta/rtmp_data.c:284:17: warning: unused variable ‘pFmeCtrl’ [-Wunused-variable]
  FRAME_CONTROL *pFmeCtrl = &pHeader->FC;
                 ^
/home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../sta/rtmp_data.c:283:8: warning: unused variable ‘OldPwrMgmt’ [-Wunused-variable]
  UCHAR OldPwrMgmt = PWR_ACTIVE;
        ^
/home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../sta/rtmp_data.c: In function ‘STAFindCipherAlgorithm’:
/home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../sta/rtmp_data.c:1740:4: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
    && (!ADHOC_ON(pAd))) || (ADHOC_ON(pAd) && (pAd->SharedKey[BSS0][KeyIdx].KeyLen == 0)))
    ^
  CC [M]  /home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../sta/connect.o
  CC [M]  /home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../sta/wpa.o
  CC [M]  /home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../sta/sta_cfg.o
/home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../sta/sta_cfg.c: In function ‘RTMPQueryInformation’:
/home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../sta/sta_cfg.c:4039:4: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long unsigned int’ [-Wformat=]
    DBGPRINT(RT_DEBUG_TRACE, ("sizeof UCHAR=%d, channel=%d \n", sizeof(UCHAR), pAd->CommonCfg.Channel));
    ^
/home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../sta/sta_cfg.c: In function ‘RTMPIoctlShow’:
/home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../sta/sta_cfg.c:4987:85: error: macro "__DATE__" might prevent reproducible builds [-Werror=date-time]
             snprintf(extra, size, "Driver version-%s, %s %s\n", STA_DRIVER_VERSION, __DATE__, __TIME__ );
                                                                                     ^
/home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../sta/sta_cfg.c:4987:95: error: macro "__TIME__" might prevent reproducible builds [-Werror=date-time]
             snprintf(extra, size, "Driver version-%s, %s %s\n", STA_DRIVER_VERSION, __DATE__, __TIME__ );
                                                                                               ^
/home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../sta/sta_cfg.c: In function ‘set_quality’:
/home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../sta/sta_cfg.c:5548:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
  BOOLEAN bInitial = FALSE;
  ^
cc1: some warnings being treated as errors
scripts/Makefile.build:257: recipe for target '/home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../sta/sta_cfg.o' failed
make[2]: *** [/home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../sta/sta_cfg.o] Error 1
Makefile:1333: recipe for target '_module_/home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux' failed
make[1]: *** [_module_/home/user/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux] Error 2
make[1]: Leaving directory '/usr/lib/modules/3.16.1-1-ARCH/build'
Makefile:388: recipe for target 'LINUX' failed
make: *** [LINUX] Error 2

答案1

受到 jayhendren 对您问题的评论的启发:

一种解决方案是安装包雷凌固件它还包含 USB 无线加密狗的驱动程序。

现在它已包含在非免费固件包裹。

相关内容