kuba-moo / mt7630e

Mediatek driver for MT7630E WiFi+BT combo with my fixes
42 stars 8 forks source link

Unable to install driver with error #16

Closed nileshcool closed 8 years ago

nileshcool commented 9 years ago

Here is the error I recevied while installing the driver

[nilesh@NileshDBl mt7630e-master]$ make make -C /lib/modules/uname -r/build M=/home/nilesh/Downloads/mt7630e-master/rt2x00 modules make[1]: Entering directory /usr/src/kernels/3.10.0-229.el7.x86_64' CC [M] /home/nilesh/Downloads/mt7630e-master/rt2x00/rt2800pci.o In file included from /home/nilesh/Downloads/mt7630e-master/rt2x00/rt2x00.h:40:0, from /home/nilesh/Downloads/mt7630e-master/rt2x00/rt2800pci.c:43: /home/nilesh/Downloads/mt7630e-master/rt2x00/rt2800pci.c: In function ‘rt2800pci_txstatus_interrupt’: include/linux/kfifo.h:395:13: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] __dummy = (typeof(__val))NULL; \ ^ /home/nilesh/Downloads/mt7630e-master/rt2x00/rt2800pci.c:1490:8: note: in expansion of macro ‘kfifo_put’ if (!kfifo_put(&rt2x00dev->txstatus_fifo, status)) { ^ include/linux/kfifo.h:395:11: warning: assignment makes pointer from integer without a cast [enabled by default] __dummy = (typeof(__val))NULL; \ ^ /home/nilesh/Downloads/mt7630e-master/rt2x00/rt2800pci.c:1490:8: note: in expansion of macro ‘kfifo_put’ if (!kfifo_put(&rt2x00dev->txstatus_fifo, status)) { ^ include/linux/kfifo.h:398:47: error: invalid type argument of unary ‘*’ (have ‘u32’) __ret = __kfifo_in_r(__kfifo, __val, sizeof(*__val), \ ^ /home/nilesh/Downloads/mt7630e-master/rt2x00/rt2800pci.c:1490:8: note: in expansion of macro ‘kfifo_put’ if (!kfifo_put(&rt2x00dev->txstatus_fifo, status)) { ^ include/linux/kfifo.h:392:9: warning: passing argument 2 of ‘__kfifo_in_r’ makes pointer from integer without a cast [enabled by default] struct __kfifo *__kfifo = &__tmp->kfifo; \ ^ /home/nilesh/Downloads/mt7630e-master/rt2x00/rt2800pci.c:1490:8: note: in expansion of macro ‘kfifo_put’ if (!kfifo_put(&rt2x00dev->txstatus_fifo, status)) { ^ include/linux/kfifo.h:819:21: note: expected ‘const void *’ but argument is of type ‘u32’ extern unsigned int __kfifo_in_r(struct __kfifo *fifo, ^ include/linux/kfifo.h:407:6: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] *(typeof(__tmp->type))__val; \ ^ /home/nilesh/Downloads/mt7630e-master/rt2x00/rt2800pci.c:1490:8: note: in expansion of macro ‘kfifo_put’ if (!kfifo_put(&rt2x00dev->txstatus_fifo, status)) { ^ /home/nilesh/Downloads/mt7630e-master/rt2x00/rt2800pci.c: At top level: /home/nilesh/Downloads/mt7630e-master/rt2x00/rt2800pci.c:1624:2: warning: initialization from incompatible pointer type [enabled by default] .flush = rt2x00mac_flush, ^ /home/nilesh/Downloads/mt7630e-master/rt2x00/rt2800pci.c:1624:2: warning: (near initialization for ‘rt2800pci_mac80211_ops.flush’) [enabled by default] make[2]: *** [/home/nilesh/Downloads/mt7630e-master/rt2x00/rt2800pci.o] Error 1 make[1]: *** [_module_/home/nilesh/Downloads/mt7630e-master/rt2x00] Error 2 make[1]: Leaving directory/usr/src/kernels/3.10.0-229.el7.x86_64' make: *\ [all] Error 2

Here is the O/P of lscpi -nn command [nilesh@NileshDBl ~]$ lspci -nn 00:00.0 Host bridge [0600]: Intel Corporation 3rd Gen Core processor DRAM Controller [8086:0154](rev 09) 00:02.0 VGA compatible controller [0300]: Intel Corporation 3rd Gen Core processor Graphics Controller [8086:0166](rev 09) 00:14.0 USB controller [0c03]: Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller [8086:1e31](rev 04) 00:16.0 Communication controller [0780]: Intel Corporation 7 Series/C210 Series Chipset Family MEI Controller #1 [8086:1e3a](rev 04) 00:1a.0 USB controller [0c03]: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #2 [8086:1e2d](rev 04) 00:1b.0 Audio device [0403]: Intel Corporation 7 Series/C210 Series Chipset Family High Definition Audio Controller [8086:1e20](rev 04) 00:1c.0 PCI bridge [0604]: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 1 [8086:1e10](rev c4) 00:1c.1 PCI bridge [0604]: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 2 [8086:1e12](rev c4) 00:1c.3 PCI bridge [0604]: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 4 [8086:1e16](rev c4) 00:1d.0 USB controller [0c03]: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #1 [8086:1e26](rev 04) 00:1f.0 ISA bridge [0601]: Intel Corporation HM76 Express Chipset LPC Controller [8086:1e59](rev 04) 00:1f.2 SATA controller [0106]: Intel Corporation 7 Series Chipset Family 6-port SATA Controller [AHCI mode] [8086:1e03](rev 04) 00:1f.3 SMBus [0c05]: Intel Corporation 7 Series/C210 Series Chipset Family SMBus Controller [8086:1e22](rev 04) 02:00.0 Network controller [0280]: MEDIATEK Corp. MT7630e 802.11bgn Wireless Network Adapter [14c3:7630] 03:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. Device [10ec:5289](rev 01) 03:00.2 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168](rev 0a)

and the o/p of lshw command sudo lshw -C network *-network UNCLAIMED
description: Network controller product: MT7630e 802.11bgn Wireless Network Adapter vendor: MEDIATEK Corp. physical id: 0 bus info: pci@0000:02:00.0 version: 00 width: 32 bits clock: 33MHz capabilities: pm msi pciexpress bus_master cap_list configuration: latency=0 resources: memory:f7d00000-f7dfffff

Hope I have provided all the information needed, for rectification and modification in the driver code

nileshcool commented 9 years ago

One more thing, I forgot to mention that I am working on a Centos 7 OS rather then a ubuntu machine

kuba-moo commented 9 years ago

Your kernel is too old for this driver. Can you try to upgrade to something more recent?

nileshcool commented 9 years ago

I thought this driver is ment to be working with Kernel 3.5 and above. But then, so from which version of kernel will the driver work on, following is the o/p of uname

[nilesh@NileshDBl ~]$ uname -a Linux NileshDBl.local 3.10.0-229.el7.x86_64 #1 SMP Fri Mar 6 11:36:42 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

hope this is some how helpfull to you

nileshcool commented 9 years ago

Done, upgraded to 4.1.1, but still unable to install the drivers $ uname -r 4.1.1-1.el7.elrepo.x86_64

kuba-moo commented 8 years ago

What's the error for 4.1?

nileshcool commented 8 years ago

Here is the error

[nilesh@NileshDBl mt7630e-master]$ make make -C /lib/modules/uname -r/build M=/home/nilesh/Downloads/mt7630e-master/rt2x00 modules make: * /lib/modules/4.1.1-1.el7.elrepo.x86_64/build: No such file or directory. Stop. make: * [all] Error 2

[nilesh@NileshDBl mt7630e-master]$ sudo yum install kernel-headers Loaded plugins: fastestmirror, langpacks Loading mirror speeds from cached hostfile

though I have make, kernel-headers and all other required modules for compilling code, still getting error "make: *\ /lib/modules/4.1.1-1.el7.elrepo.x86_64/build: No such file or directory. Stop."

kuba-moo commented 8 years ago

OK, but you don't have header for the 4.1 kernel. yum just sees ernel-headers-3.10.0-229.7.2.el7.x86_64 and thinks it's done. Where did you get the kernel? Find matching kernel-headers from the same source, please.

nileshcool commented 8 years ago

Done, Got the new kernel-header here is the o/p of last few lines Downloading packages: kernel-ml-headers-4.1.1-1.el7.elrepo.x86_64.rpm | 951 kB 00:00:06
Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : kernel-ml-headers-4.1.1-1.el7.elrepo.x86_64 1/1 Verifying : kernel-ml-headers-4.1.1-1.el7.elrepo.x86_64 1/1

Installed: kernel-ml-headers.x86_64 0:4.1.1-1.el7.elrepo

Complete!

But still, not able to install the drivers, here is the o/p

[nilesh@NileshDBl ~]$ cd Downloads/mt7630e-master/ [nilesh@NileshDBl mt7630e-master]$ make make -C /lib/modules/uname -r/build M=/home/nilesh/Downloads/mt7630e-master/rt2x00 modules make: * /lib/modules/4.1.1-1.el7.elrepo.x86_64/build: No such file or directory. Stop. make: * [all] Error 2

Also, here is a few other data [nilesh@NileshDBl mt7630e-master]$ uname -r 4.1.1-1.el7.elrepo.x86_64 [nilesh@NileshDBl mt7630e-master]$ sudo yum --enablerepo=elrepo-kernel install kernel-ml-headers [sudo] password for nilesh: Loaded plugins: fastestmirror, langpacks Loading mirror speeds from cached hostfile

Hope, this will be enough for debugging

nileshcool commented 8 years ago

sorry sir, the above error was due to no kernel-devel package, but now that I installed kernel-devel also, still I am getting error, [nilesh@NileshDBl ~]$ cd Downloads/mt7630e-master/ [nilesh@NileshDBl mt7630e-master]$ make make -C /lib/modules/uname -r/build M=/home/nilesh/Downloads/mt7630e-master/rt2x00 modules make[1]: Entering directory /usr/src/kernels/4.1.2-1.el7.elrepo.x86_64' arch/x86/Makefile:114: stack-protector enabled but compiler support broken Makefile:664: Cannot use CONFIG_CC_STACKPROTECTOR_STRONG: -fstack-protector-strong not supported by compiler make[1]: gcc: Command not found CC [M] /home/nilesh/Downloads/mt7630e-master/rt2x00/rt2x00dev.o /bin/sh: gcc: command not found make[2]: *** [/home/nilesh/Downloads/mt7630e-master/rt2x00/rt2x00dev.o] Error 127 make[1]: *** [_module_/home/nilesh/Downloads/mt7630e-master/rt2x00] Error 2 make[1]: Leaving directory/usr/src/kernels/4.1.2-1.el7.elrepo.x86_64' make: *\ [all] Error 2 [nilesh@NileshDBl mt7630e-master]$ sudo yum --enablerepo=elrepo-kernel install make [sudo] password for nilesh: Loaded plugins: fastestmirror, langpacks Loading mirror speeds from cached hostfile

Dependencies Resolved

Package Arch Version Repository Size

Installing: redhat-lsb x86_64 4.1-27.el7.centos.1 base 25 k Installing for dependencies: glibc-devel x86_64 2.17-78.el7 base 1.0 M glibc-headers x86_64 2.17-78.el7 base 656 k perl-CPAN noarch 1.9800-285.el7 base 292 k perl-ExtUtils-Install noarch 1.58-285.el7 base 73 k perl-ExtUtils-MakeMaker noarch 6.68-3.el7 base 275 k perl-ExtUtils-ParseXS noarch 1:3.18-2.el7 base 77 k perl-devel x86_64 4:5.16.3-285.el7 base 452 k redhat-lsb-languages x86_64 4.1-27.el7.centos.1 base 18 k

Transaction Summary

Install 1 Package (+8 Dependent packages)

Total download size: 2.9 M Installed size: 6.7 M Is this ok [y/d/N]: y Downloading packages: (1/9): perl-ExtUtils-Install-1.58-285.el7.noarch.rpm | 73 kB 00:00:02
(2/9): perl-ExtUtils-MakeMaker-6.68-3.el7.noarch.rpm | 275 kB 00:00:05
(3/9): perl-CPAN-1.9800-285.el7.noarch.rpm | 292 kB 00:00:10
(4/9): glibc-headers-2.17-78.el7.x86_64.rpm | 656 kB 00:00:13
(5/9): perl-devel-5.16.3-285.el7.x86_64.rpm | 452 kB 00:00:08
(6/9): glibc-devel-2.17-78.el7.x86_64.rpm | 1.0 MB 00:00:14
(7/9): redhat-lsb-4.1-27.el7.centos.1.x86_64.rpm | 25 kB 00:00:00
(8/9): redhat-lsb-languages-4.1-27.el7.centos.1.x86_64.rpm | 18 kB 00:00:00
perl-ExtUtils-ParseXS-3.18-2.e FAILED
http://mirror.dhakacom.com/centos/7.1.1503/os/x86_64/Packages/perl-ExtUtils-ParseXS-3.18-2.el7.noarch.rpm: [Errno 14] curl#6 - "Could not resolve host: mirror.dhakacom.com; Name or service not known" Trying other mirror.

(9/9): perl-ExtUtils-ParseXS-3.18-2.el7.noarch.rpm | 77 kB 00:00:00

Total 157 kB/s | 2.9 MB 00:00:18
Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : glibc-headers-2.17-78.el7.x86_64 1/9 Installing : glibc-devel-2.17-78.el7.x86_64 2/9 Installing : 1:perl-ExtUtils-ParseXS-3.18-2.el7.noarch 3/9 Installing : 4:perl-devel-5.16.3-285.el7.x86_64 4/9 Installing : perl-ExtUtils-MakeMaker-6.68-3.el7.noarch 5/9 Installing : perl-ExtUtils-Install-1.58-285.el7.noarch 6/9 Installing : perl-CPAN-1.9800-285.el7.noarch 7/9 Installing : redhat-lsb-languages-4.1-27.el7.centos.1.x86_64 8/9 Installing : redhat-lsb-4.1-27.el7.centos.1.x86_64 9/9 Verifying : perl-ExtUtils-Install-1.58-285.el7.noarch 1/9 Verifying : glibc-devel-2.17-78.el7.x86_64 2/9 Verifying : perl-CPAN-1.9800-285.el7.noarch 3/9 Verifying : redhat-lsb-languages-4.1-27.el7.centos.1.x86_64 4/9 Verifying : redhat-lsb-4.1-27.el7.centos.1.x86_64 5/9 Verifying : glibc-headers-2.17-78.el7.x86_64 6/9 Verifying : 1:perl-ExtUtils-ParseXS-3.18-2.el7.noarch 7/9 Verifying : 4:perl-devel-5.16.3-285.el7.x86_64 8/9 Verifying : perl-ExtUtils-MakeMaker-6.68-3.el7.noarch 9/9

Installed: redhat-lsb.x86_64 0:4.1-27.el7.centos.1

Dependency Installed: glibc-devel.x86_64 0:2.17-78.el7 glibc-headers.x86_64 0:2.17-78.el7 perl-CPAN.noarch 0:1.9800-285.el7
perl-ExtUtils-Install.noarch 0:1.58-285.el7 perl-ExtUtils-MakeMaker.noarch 0:6.68-3.el7 perl-ExtUtils-ParseXS.noarch 1:3.18-2.el7
perl-devel.x86_64 4:5.16.3-285.el7 redhat-lsb-languages.x86_64 0:4.1-27.el7.centos.1

Complete! [nilesh@NileshDBl mt7630e-master]$ make make -C /lib/modules/uname -r/build M=/home/nilesh/Downloads/mt7630e-master/rt2x00 modules make[1]: Entering directory /usr/src/kernels/4.1.2-1.el7.elrepo.x86_64' arch/x86/Makefile:114: stack-protector enabled but compiler support broken Makefile:664: Cannot use CONFIG_CC_STACKPROTECTOR_STRONG: -fstack-protector-strong not supported by compiler make[1]: gcc: Command not found CC [M] /home/nilesh/Downloads/mt7630e-master/rt2x00/rt2x00dev.o /bin/sh: gcc: command not found make[2]: *** [/home/nilesh/Downloads/mt7630e-master/rt2x00/rt2x00dev.o] Error 127 make[1]: *** [_module_/home/nilesh/Downloads/mt7630e-master/rt2x00] Error 2 make[1]: Leaving directory/usr/src/kernels/4.1.2-1.el7.elrepo.x86_64' make: * [all] Error 2 [nilesh@NileshDBl mt7630e-master]$ clear  [nilesh@NileshDBl mt7630e-master]$ make make -C /lib/modules/uname -r/build M=/home/nilesh/Downloads/mt7630e-master/rt2x00 modules make[1]: Entering directory `/usr/src/kernels/4.1.2-1.el7.elrepo.x86_64' arch/x86/Makefile:114: stack-protector enabled but compiler support broken Makefile:664: Cannot use CONFIG_CC_STACKPROTECTOR_STRONG: -fstack-protector-strong not supported by compiler make[1]: gcc: Command not found CC [M] /home/nilesh/Downloads/mt7630e-master/rt2x00/rt2x00dev.o /bin/sh: gcc: command not found make[2]: ** [/home/nilesh/Downloads/mt7630e-master/rt2x00/rt2x00dev.o] Error 127 make[1]: [module/home/nilesh/Downloads/mt7630e-master/rt2x00] Error 2 make[1]: Leaving directory`/usr/src/kernels/4.1.2-1.el7.elrepo.x86_64' make: *\ [all] Error 2 [nilesh@NileshDBl mt7630e-master]$ uname -r 4.1.2-1.el7.elrepo.x86_64

Hope, I am going into right direction

nileshcool commented 8 years ago

Sorry for my mistake, but I guess you can understand, though I am not very new to Linux, but still a novice in the field of source compiling, and driver installation (guess yum has made it so)

The case was missing gcc library, i installed gcc, and the installation was complete

But, their is a problem, that the driver is causing the system to hang sometimes. I will give you a complete review after few days.

But one again, thanks very much for the driver.