無法為Linux驅動程式Asus PCE-N53(Ralink RT5592晶片組)編譯無線驅動程式

無法為Linux驅動程式Asus PCE-N53(Ralink RT5592晶片組)編譯無線驅動程式

我之前已經在我認為是較舊的核心上編譯了這個驅動程式。然而我現在是 15.10,只是無法弄清楚。

dylan@xaelah:~$ uname -r
4.2.0-18-generic

這裡的輸出是sudo lshw

我已經從以下網站下載了原始碼這裡

然後我 CD 到該目錄並發出sudo make
以下是輸出:

make -C tools
make[1]: Entering directory '/home/dylan/Downloads/patched-Asus-PCE-N53-linux-driver-master/tools'
gcc -g bin2h.c -o bin2h
make[1]: Leaving directory '/home/dylan/Downloads/patched-Asus-PCE-N53-linux-driver-master/tools'
/home/dylan/Downloads/patched-Asus-PCE-N53-linux-driver-master/tools/bin2h
cp -f os/linux/Makefile.6 /home/dylan/Downloads/patched-Asus-PCE-N53-linux-driver-master/os/linux/Makefile
make -C /lib/modules/4.2.0-18-generic/build SUBDIRS=/home/dylan/Downloads/patched-Asus-PCE-N53-linux-driver-master/os/linux modules
make[1]: Entering directory '/usr/src/linux-headers-4.2.0-18-generic'
  CC [M]  /home/dylan/Downloads/patched-Asus-PCE-N53-linux-driver-master/os/linux/../../sta/sta_cfg.o
In file included from /home/dylan/Downloads/patched-Asus-PCE-N53-linux-driver-master/include/rtmp_os.h:44:0,
                 from /home/dylan/Downloads/patched-Asus-PCE-N53-linux-driver-master/include/rtmp_comm.h:69,
                 from /home/dylan/Downloads/patched-Asus-PCE-N53-linux-driver-master/include/rt_config.h:33,
                 from /home/dylan/Downloads/patched-Asus-PCE-N53-linux-driver-master/os/linux/../../sta/sta_cfg.c:28:
/home/dylan/Downloads/patched-Asus-PCE-N53-linux-driver-master/os/linux/../../sta/sta_cfg.c: In function ‘RTMPQueryInformation’:
/home/dylan/Downloads/patched-Asus-PCE-N53-linux-driver-master/os/linux/../../sta/sta_cfg.c:3953:30: 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), p
                              ^
/home/dylan/Downloads/patched-Asus-PCE-N53-linux-driver-master/include/os/rt_linux.h:665:16: note: in definition of macro ‘DBGPRINT_RAW’
         printk Fmt;               \
                ^
/home/dylan/Downloads/patched-Asus-PCE-N53-linux-driver-master/os/linux/../../sta/sta_cfg.c:3953:4: note: in expansion of macro ‘DBGPRINT’
    DBGPRINT(RT_DEBUG_TRACE, ("sizeof UCHAR=%d, channel=%d \n", sizeof(UCHAR), p
    ^
/home/dylan/Downloads/patched-Asus-PCE-N53-linux-driver-master/os/linux/../../sta/sta_cfg.c: In function ‘RTMPIoctlShow’:
/home/dylan/Downloads/patched-Asus-PCE-N53-linux-driver-master/os/linux/../../sta/sta_cfg.c:4896:85: error: macro "__DATE__" might prevent reproducible builds [-Werror=date-time]
 intf(extra, size, "Driver version-%s, %s %s\n", STA_DRIVER_VERSION, __DATE__, _
                                                                     ^
/home/dylan/Downloads/patched-Asus-PCE-N53-linux-driver-master/os/linux/../../sta/sta_cfg.c:4896:95: error: macro "__TIME__" might prevent reproducible builds [-Werror=date-time]
 , size, "Driver version-%s, %s %s\n", STA_DRIVER_VERSION, __DATE__, __TIME__ );
                                                                     ^
cc1: some warnings being treated as errors
scripts/Makefile.build:258: recipe for target '/home/dylan/Downloads/patched-Asus-PCE-N53-linux-driver-master/os/linux/../../sta/sta_cfg.o' failed
make[2]: *** [/home/dylan/Downloads/patched-Asus-PCE-N53-linux-driver-master/os/linux/../../sta/sta_cfg.o] Error 1
Makefile:1398: recipe for target '_module_/home/dylan/Downloads/patched-Asus-PCE-N53-linux-driver-master/os/linux' failed
make[1]: *** [_module_/home/dylan/Downloads/patched-Asus-PCE-N53-linux-driver-master/os/linux] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.2.0-18-generic'
Makefile:384: recipe for target 'LINUX' failed
make: *** [LINUX] Error 2

顯然我不能sudo make install

我也不擔心類型不匹配和其他警告,因為它們出現在以前的版本中並且仍然有效。我也嘗試過sudo make -i但沒有運氣

我已經下載了構建要點、內核原始碼和標頭...

如果你們還需要什麼,請告訴我。我搜尋過谷歌,發現了類似的問題,但沒有解決方案。甚至還有在此網站上,但沒有答案,其他替代方案也不起作用。

任何幫助,將不勝感激!

編輯:

我還嘗試按如下方式運行 make -

sudo make RT_CFLAGS="-Wno-error=date-time"

同樣的錯誤....

然後我做了sudo make clean然後跑sudo make RT_CFLAGS="-Wno-error=date-time" -i 這是過去的垃圾箱

答案1

我可以對她進行編譯:

$ lsb_release -dc
Description:    Ubuntu 15.10
Codename:   wily

$ uname -r
4.2.0-18-generic

建議不要用於sudo編譯。如果以下說明失敗,您可能應該重新開始。

  1. 克隆了 git 儲存庫。

    git clone https://github.com/unused/patched-Asus-PCE-N53-linux-driver.git
    
    cd patched-Asus-PCE-N53-linux-driver/
    
  2. 加入-Wno-error=date-time編譯標誌

    vim os/linux/config.mk +178
    

    尋找WFLAGS:=

    WFLAGS := -DAGGREGATION_SUPPORT -DPIGGYBACK_SUPPORT -DWMM_SUPPORT  -DLINUX -Wall -Wstrict-prototypes -Wno-trigraphs -Wno-error=date-time
    
  3. 編譯

    make
    

    至此,模組編譯成功:

    ls -l os/linux/rt5592sta.ko

    -rw-rw-r-- 1 user user 1767056 Nov 21 10:29 /home/user/Desktop/sand_box/patched-Asus-PCE-N53-linux-driver/os/linux/rt5592sta.ko
    

    modinfo /home/user/Desktop/sand_box/patched-Asus-PCE-N53-linux-driver/os/linux/rt5592sta.ko

    filename:       /home/user/Desktop/sand_box/patched-Asus-PCE-N53-linux-driver/os/linux/rt5592sta.ko
    version:        2.6.0.0_20120326
    srcversion:     150B71061DC1EBE4DE31E22
    alias:          pci:v00001814d00005592sv*sd*bc*sc*i*
    depends:        
    vermagic:       4.2.0-18-generic SMP mod_unload modversions 
    parm:           mac:rt28xx: wireless mac addr (charp)
    

但我發現make腳本試圖將其複製到/tftpboot資料夾中很奇怪。可能開發人員正在尋找在另一台機器上更新/測試它的快速方法。

LD [M]  /home/user/Desktop/sand_box/patched-Asus-PCE-N53-linux-driver/os/linux/rt5592sta.ko
make[1]: Leaving directory '/usr/src/linux-headers-4.2.0-18-generic'
cp -f /home/user/Desktop/sand_box/patched-Asus-PCE-N53-linux-driver/os/linux/rt5592sta.ko /tftpboot
cp: cannot create regular file ‘/tftpboot’: Permission denied
Makefile:384: recipe for target 'LINUX' failed
make: *** [LINUX] Error 1

無論如何,請嘗試完成剩餘的安裝步驟。如果您遇到任何相關問題,請告訴我。

相關內容