即使打了補丁,Ralink 148f:760b mt7601 驅動程式也不會基於 12.04 構建

即使打了補丁,Ralink 148f:760b mt7601 驅動程式也不會基於 12.04 構建

各位 Ubuntu 同胞們大家好;)

我買了這個便宜的 Ralink wifi 適配器,認為它會像我習慣使用 Ubuntu 一樣神奇地工作。 ;) 然而,這個驅動程式安裝給我帶來的麻煩比我預想的要多得多。我花了幾個小時在木板上搜尋,嘗試了一切。嗯...我從一開始就知道這將是正確的方法(我的意思是答案):

Ralink MT7601U (148f:7601) Wi-Fi 轉接器安裝

但是,即使應用了補丁,我也會得到以下資訊:

ahti@ahti:~/data/drivers/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913$ make
make -C tools
make[1]: Siirrytään hakemistoon "/home/ahti/data/drivers/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/tools"
gcc -g bin2h.c -o bin2h
make[1]: Poistutaan hakemistosta "/home/ahti/data/drivers/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/tools"
/home/ahti/data/drivers/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/tools/bin2h
cp -f os/linux/Makefile.6 /home/ahti/data/drivers/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/Makefile
make -C /lib/modules/3.2.0-70-generic/build SUBDIRS=/home/ahti/data/drivers/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux modules
make[1]: Siirrytään hakemistoon "/usr/src/linux-headers-3.2.0-70-generic"
  CC [M]  /home/ahti/data/drivers/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/../../os/linux/rt_profile.o
In file included from /home/ahti/data/drivers/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/include/rtmp_os.h:44:0,
                 from /home/ahti/data/drivers/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/include/rtmp_comm.h:75,
                 from /home/ahti/data/drivers/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/include/rt_config.h:33,
                 from /home/ahti/data/drivers/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/../../os/linux/rt_profile.c:28:
/home/ahti/data/drivers/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/include/os/rt_linux.h:282:2: virhe: unknown type name ”kuid_t”
/home/ahti/data/drivers/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/include/os/rt_linux.h:283:2: virhe: unknown type name ”kgid_t”
/home/ahti/data/drivers/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/../../os/linux/rt_profile.c: Funktio ”announce_802_3_packet”:
/home/ahti/data/drivers/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/../../os/linux/rt_profile.c:331:16: varoitus: käyttämätön muuttuja ”pAd” [-Wunused-variable]
/home/ahti/data/drivers/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/../../os/linux/rt_profile.c: Funktio ”STA_MonPktSend”:
/home/ahti/data/drivers/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/../../os/linux/rt_profile.c:399:9: varoitus: format ”%d” expects argument of type ”int”, but argument 3 has type ”long unsigned int” [-Wformat]
make[2]: *** [/home/ahti/data/drivers/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/../../os/linux/rt_profile.o] Virhe 1
make[1]: *** [_module_/home/ahti/data/drivers/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux] Virhe 2
make[1]: Poistutaan hakemistosta "/usr/src/linux-headers-3.2.0-70-generic"
make: *** [LINUX] Virhe 2

抱歉,我的控制台輸出是芬蘭語(順便說一句,我如何用英語更改那些奇怪的控制台輸出?主要是對於apt 和構建工具,如果不可能在終端會話中對所有內容使用英語語言環境?不可能?

但是,是的,這基本上就是我現在的處境。

我也嘗試使用NDIS 包裝方法,但 unshield 無法提取 Windows 驅動程式可執行文件,而且我在任何地方都找不到 .sys/.inf 組合,因此這個想法被放棄了。

任何幫助表示讚賞。我知道這是用戶命名空間問題,但我沒有做過任何核心編碼,儘管我是一名編碼員,因此無法自己解決這個問題。

哦,如果需要的話,我的系統訊息的微小部分:Ubuntu 12.04(精確),核心:3.2.0-70-generic(#105-Ubuntu SMP Wed Sep 24 19:49:16 UTC 2014),GCC 版本: 4.6(x86_64) -linux-gnu)、Gnome 3.4.2

提前謝謝了!

答案1

回答我自己。

我太急於應用補丁了。在沒有應用補丁的情況下,驅動程式已編譯。然而,它似乎要么映射不正確,要么無法與我的 148f:760b(<- 注意 b 而不是 1)usb 適配器配合使用。我什至修改了設備列表以添加新的別名,但即使在加載驅動程式或一堆與其相關的其他內容之後,適配器也無法被識別。

但是當我在Windows 7 中安裝驅動程式時(似乎在Windows XP 上不起作用),並且在安裝過程之後將位於C:/ProgramData/Mediatek Driver/RT2870 Wireless LAN Card/Driver/ 中的驅動程式資料夾複製到Ubuntu 並使用 ndis 包裝器和 ndiswrapper-dkms 套件加載它,適配器立即可以運行。實際上,在 Windows 端,由於某種原因,它根本無法識別我的 WLAN,但在 Ubuntu 上,只需單擊一下,我就可以立即無線上網。

所以,到處都有奇怪的行為,但最終還是起作用了。

答案2

您可能不再使用 Ubuntu 12.04,但無論如何,以下是應用補丁時遇到的編譯錯誤的解決方案:

這些補丁僅適用於 Linux 核心 >=3.5。使其與 Ubuntu 12.04 核心相容3.2你必須做一個小修正:

在 中include/os/rt_linux.h,尋找以下區塊。在我的版本中,它從第 280 行開始,但您的版本可能會略有不同,具體取決於您從何處獲取原始程式碼:

typedef struct _OS_FS_INFO_
{
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)
    uid_t               fsuid;
    gid_t               fsgid;
#else
    kuid_t              fsuid;
    kgid_t              fsgid;
#endif
    mm_segment_t    fs;
} OS_FS_INFO;

得到這一行(在我的例子中是282):

#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)

並將其更改為

#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0)

現在嘗試編譯,它應該可以工作:)

相關內容