neurobin / MT7630E

Modified easy installation package
https://neurobin.org/projects/softwares/unix/MT7630E/
232 stars 70 forks source link

[centOS] error while installing #82

Closed ugurustaoglu closed 6 years ago

ugurustaoglu commented 7 years ago

centOS 7 3.10.0-693.el7.x86_64 New install | yes DKMS | no

Hi, I am a new user and trying to install centOS to my laptop. I got the following error while installing MT7630E driver. I saw the similar error in the previous threads which was resolved with different driver version. I tried all the versions from 2.0.6-latest without luck. I got the same error message. Really appreciate if you can help me!

[root@localhost MT7630E-release]# ./install make -C /lib/modules/3.10.0-693.el7.x86_64/build M=/home/uustaoglu/Desktop/MT7630E-release/rt2x00 modules make[1]: Entering directory `/usr/src/kernels/3.10.0-693.el7.x86_64' CC [M] /home/uustaoglu/Desktop/MT7630E-release/rt2x00/rt2x00dev.o In file included from /home/uustaoglu/Desktop/MT7630E-release/rt2x00/rt2x00dev.c:32:0: /home/uustaoglu/Desktop/MT7630E-release/rt2x00/rt2x00.h:2171:40: error: ‘IEEE80211_NUM_BANDS’ undeclared here (not in a function) struct ieee80211_supported_band bands[IEEE80211_NUM_BANDS]; ^ /home/uustaoglu/Desktop/MT7630E-release/rt2x00/rt2x00.h:2172:22: error: field ‘curr_band’ has incomplete type enum ieee80211_band curr_band; ^ /home/uustaoglu/Desktop/MT7630E-release/rt2x00/rt2x00dev.c: In function ‘rt2x00lib_channel’: /home/uustaoglu/Desktop/MT7630E-release/rt2x00/rt2x00dev.c:955:32: error: ‘IEEE80211_BAND_2GHZ’ undeclared (first use in this function) entry->band = channel <= 14 ? IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ; ^ /home/uustaoglu/Desktop/MT7630E-release/rt2x00/rt2x00dev.c:955:32: note: each undeclared identifier is reported only once for each function it appears in /home/uustaoglu/Desktop/MT7630E-release/rt2x00/rt2x00dev.c:955:54: error: ‘IEEE80211_BAND_5GHZ’ undeclared (first use in this function) entry->band = channel <= 14 ? IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ; ^ /home/uustaoglu/Desktop/MT7630E-release/rt2x00/rt2x00dev.c: In function ‘rt2x00lib_probe_hw_modes’: /home/uustaoglu/Desktop/MT7630E-release/rt2x00/rt2x00dev.c:1030:20: error: ‘IEEE80211_BAND_2GHZ’ undeclared (first use in this function) rt2x00dev->bands[IEEE80211_BAND_2GHZ].n_channels = 14; ^ /home/uustaoglu/Desktop/MT7630E-release/rt2x00/rt2x00dev.c:1059:20: error: ‘IEEE80211_BAND_5GHZ’ undeclared (first use in this function) rt2x00dev->bands[IEEE80211_BAND_5GHZ].n_channels = ^ In file included from include/linux/linkage.h:4:0, from include/linux/kernel.h:6, from /home/uustaoglu/Desktop/MT7630E-release/rt2x00/rt2x00dev.c:27: /home/uustaoglu/Desktop/MT7630E-release/rt2x00/rt2x00dev.c: In function ‘rt2x00lib_remove_hw’: /home/uustaoglu/Desktop/MT7630E-release/rt2x00/rt2x00dev.c:1093:41: error: ‘IEEE80211_BAND_2GHZ’ undeclared (first use in this function) if (likely(rt2x00dev->hw->wiphy->bands[IEEE80211_BAND_2GHZ])) { ^ include/linux/compiler.h:152:40: note: in definition of macro ‘likely’

define likely(x) __builtin_expect(!!(x), 1)

                                    ^

/home/uustaoglu/Desktop/MT7630E-release/rt2x00/rt2x00dev.c:1097:31: error: ‘IEEE80211_BAND_5GHZ’ undeclared (first use in this function) rt2x00dev->hw->wiphy->bands[IEEE80211_BAND_5GHZ] = NULL; ^ make[2]: [/home/uustaoglu/Desktop/MT7630E-release/rt2x00/rt2x00dev.o] Error 1 make[1]: [module/home/uustaoglu/Desktop/MT7630E-release/rt2x00] Error 2 make[1]: Leaving directory `/usr/src/kernels/3.10.0-693.el7.x86_64' make: *** [all] Error 2

ugurustaoglu commented 6 years ago

Ok, after spending 1 week, i solved this issue. The problem was that kernel version in CentOS7 was too old for this driver. I upgraded the kernel from elrepo, and additionally I installed kernel-devel package. After updating, the driver can be installed without a problem. My current kernel version is 4.13.12-1.el7.elrepo.x86_46 You can follow the link below for kernel upgrade walkthrough https://www.tecmint.com/install-upgrade-kernel-version-in-centos-7/

Tip: if you cannot reach to the repo as you don't have wifi connection, just copy the required rpms and use yum localinstall

ezze commented 6 years ago

@ugurustaoglu, thank you for sharing this. I had a similar issue on CentOS 7, and installing the latest kernel from elrepo.org solved it. Unfortunately, I can't install the driver. The system freezes during the installation like it was on Ubuntu. Fixes proposed there worked for me on Ubuntu. Did you make any changes to the source code for your kernel version on CentOS? My current kernel version is 4.14.14-1.el7.elrepo.x86_64.

ugurustaoglu commented 6 years ago

In my case, I just did the kernel upgrade and install the driver without a problem.. It looks like this driver is not compatible with older and newer kernels.. I can confirm that it is working on 4.13.12-1.el7.elrepo.x86_46 without additional effort.