Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

alx drivers fails to build in 3.7.x Arch linux kernel for device AR8161 #2

Open
hadrons123 opened this Issue · 14 comments

5 participants

hadrons123 mishudark Yi, Shunli Kim Ebert Felix Kaechele
hadrons123

alx drivers doesnt build in in 3.7.4 kernel.
make
./scripts/gen-compat-autoconf.sh /home/flexible/Downloads/compat-wireless-2012-12-18-p/.config /home/flexible/Downloads/compat-wireless-2012-12-18-p/config.mk > include/linux/compat_autoconf.h
make -C /lib/modules/3.7.4-1-ARCH/build M=/home/flexible/Downloads/compat-wireless-2012-12-18-p modules
make[1]: Entering directory /usr/src/linux-3.7.4-1-ARCH'
CC [M] /home/flexible/Downloads/compat-wireless-2012-12-18-p/compat/main.o
CC [M] /home/flexible/Downloads/compat-wireless-2012-12-18-p/compat/compat-3.8.o
LD [M] /home/flexible/Downloads/compat-wireless-2012-12-18-p/compat/compat.o
scripts/Makefile.build:44: /home/flexible/Downloads/compat-wireless-2012-12-18-p/drivers/net/ethernet/atheros/alx/Makefile: No such file or directory
make[4]: *** No rule to make target
/home/flexible/Downloads/compat-wireless-2012-12-18-p/drivers/net/ethernet/atheros/alx/Makefile'. Stop.
make[3]: *** [/home/flexible/Downloads/compat-wireless-2012-12-18-p/drivers/net/ethernet/atheros/alx] Error 2
make[2]: *** [/home/flexible/Downloads/compat-wireless-2012-12-18-p/drivers/net/ethernet/atheros] Error 2
make[1]: *** [module/home/flexible/Downloads/compat-wireless-2012-12-18-p] Error 2
make[1]: Leaving directory `/usr/src/linux-3.7.4-1-ARCH'
make: *** [modules] Error 2
[root@arch compat-wireless-2012-12-18-p]#

Any idea how to handle this?

mishudark

I have the same problem

Yi, Shunli

The same issue on Fedora 18 with kernel 3.7.4-204.fc18.x86_64.

The workaround is:
download the latest version compat-drivers-2013-02-03.tar.gz and then copy the alx driver from old release:
"cp compat-wireless-3.6.6-1/drivers/net/ethernet/atheros/alx compat-drivers-2013-02-03/drivers/net/ethernet/atheros/"
then run "./script/driver-select alx" and "make & make install".

It works on my Fedora 18.

hadrons123

where did you get the compat-drivers-2013-02-03 ? I couldn't find it. please can you provide me the link?

Yi, Shunli
hadrons123

Thanks for the link. But in arch linux it doesn't work the way I am trying.
I 'm not sure what else I could do. this is the error.
make: *** /lib/modules/3.7.4-1-ARCH/build: No such file or directory. Stop.
make: *** [modules] Error 2

hadrons123

Tried with a different kernel. Different error with warning. Couldn't make out what it means.

cc1: some warnings being treated as errors
make[4]: *** [/home/freedom/Downloads/compat-drivers-2013-02-03/drivers/net/ethernet/atheros/alx/alx_main.o] Error 1
make[3]: *** [/home/freedom/Downloads/compat-drivers-2013-02-03/drivers/net/ethernet/atheros/alx] Error 2
make[2]: *** [/home/freedom/Downloads/compat-drivers-2013-02-03/drivers/net/ethernet/atheros] Error 2
make[1]: *** [module/home/freedom/Downloads/compat-drivers-2013-02-03] Error 2
make[1]: Leaving directory `/usr/src/linux-3.7.5-2-ck'
make: *** [modules] Error 2

mishudark
hadrons123

That's what I thought first and tried with a custom kernel from https://aur.archlinux.org/packages/linux-ck/ which has headers installed. I 'm not sure if any patches in the this CK kernel is preventing the build process.

mishudark
Yi, Shunli
hadrons123

Now I am trying with mainline kernel and thanks for your tip. I got past the first error. But I still have some more errors.
[root@arch compat-drivers-2013-02-03]# make
make -C /lib/modules/3.8.0-1-mainline/build M=/home/freedom/Downloads/compat-drivers-2013-02-03 modules
make[1]: Entering directory /usr/src/linux-3.8.0-1-mainline'
CC [M] /home/freedom/Downloads/compat-drivers-2013-02-03/drivers/net/ethernet/atheros/alx/alx_main.o
/home/freedom/Downloads/compat-drivers-2013-02-03/drivers/net/ethernet/atheros/alx/alx_main.c:1962:22: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘alx_init_adapter_special’
/home/freedom/Downloads/compat-drivers-2013-02-03/drivers/net/ethernet/atheros/alx/alx_main.c:2017:22: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘alx_init_adapter’
/home/freedom/Downloads/compat-drivers-2013-02-03/drivers/net/ethernet/atheros/alx/alx_main.c:3479:22: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘alx_init’
/home/freedom/Downloads/compat-drivers-2013-02-03/drivers/net/ethernet/atheros/alx/alx_main.c:3787:23: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘alx_remove’
/home/freedom/Downloads/compat-drivers-2013-02-03/drivers/net/ethernet/atheros/alx/alx_main.c:3910:17: error: ‘alx_init’ undeclared here (not in a function)
/home/freedom/Downloads/compat-drivers-2013-02-03/drivers/net/ethernet/atheros/alx/alx_main.c:3911:2: error: implicit declaration of function ‘__devexit_p’ [-Werror=implicit-function-declaration]
/home/freedom/Downloads/compat-drivers-2013-02-03/drivers/net/ethernet/atheros/alx/alx_main.c:3911:29: error: ‘alx_remove’ undeclared here (not in a function)
/home/freedom/Downloads/compat-drivers-2013-02-03/drivers/net/ethernet/atheros/alx/alx_main.c:142:12: warning: ‘alx_validate_mac_addr’ defined but not used [-Wunused-function]
/home/freedom/Downloads/compat-drivers-2013-02-03/drivers/net/ethernet/atheros/alx/alx_main.c:217:12: warning: ‘alx_init_hw_callbacks’ defined but not used [-Wunused-function]
/home/freedom/Downloads/compat-drivers-2013-02-03/drivers/net/ethernet/atheros/alx/alx_main.c:1705:12: warning: ‘alx_alloc_all_rtx_queue’ defined but not used [-Wunused-function]
/home/freedom/Downloads/compat-drivers-2013-02-03/drivers/net/ethernet/atheros/alx/alx_main.c:1764:13: warning: ‘alx_free_all_rtx_queue’ defined but not used [-Wunused-function]
/home/freedom/Downloads/compat-drivers-2013-02-03/drivers/net/ethernet/atheros/alx/alx_main.c:1780:12: warning: ‘alx_set_interrupt_param’ defined but not used [-Wunused-function]
/home/freedom/Downloads/compat-drivers-2013-02-03/drivers/net/ethernet/atheros/alx/alx_main.c:1831:13: warning: ‘alx_reset_interrupt_param’ defined but not used [-Wunused-function]
/home/freedom/Downloads/compat-drivers-2013-02-03/drivers/net/ethernet/atheros/alx/alx_main.c:1921:12: warning: ‘alx_set_interrupt_mode’ defined but not used [-Wunused-function]
/home/freedom/Downloads/compat-drivers-2013-02-03/drivers/net/ethernet/atheros/alx/alx_main.c:1948:13: warning: ‘alx_reset_interrupt_mode’ defined but not used [-Wunused-function]
/home/freedom/Downloads/compat-drivers-2013-02-03/drivers/net/ethernet/atheros/alx/alx_main.c:2132:12: warning: ‘alx_set_register_info_special’ defined but not used [-Wunused-function]
/home/freedom/Downloads/compat-drivers-2013-02-03/drivers/net/ethernet/atheros/alx/alx_main.c:3050:13: warning: ‘alx_timer_routine’ defined but not used [-Wunused-function]
/home/freedom/Downloads/compat-drivers-2013-02-03/drivers/net/ethernet/atheros/alx/alx_main.c:3071:13: warning: ‘alx_task_routine’ defined but not used [-Wunused-function]
cc1: some warnings being treated as errors
make[4]: *** [/home/freedom/Downloads/compat-drivers-2013-02-03/drivers/net/ethernet/atheros/alx/alx_main.o] Error 1
make[3]: *** [/home/freedom/Downloads/compat-drivers-2013-02-03/drivers/net/ethernet/atheros/alx] Error 2
make[2]: *** [/home/freedom/Downloads/compat-drivers-2013-02-03/drivers/net/ethernet/atheros] Error 2
make[1]: *** [_module_/home/freedom/Downloads/compat-drivers-2013-02-03] Error 2
make[1]: Leaving directory
/usr/src/linux-3.8.0-1-mainline'
make: *** [modules] Error 2
[root@arch compat-drivers-2013-02-03]#

hadrons123

Ok, I got back to 3.7.4 kernel and it worked with your tip. thank you.

Kim Ebert

This works for me.

diff -r compat-wireless-2012-03-12-p/drivers/net/ethernet/atheros/alx/alx_main.c compat-drivers-2013-02-03/drivers/net/ethernet/atheros/alx/alx_main.c
1961c1961
< static int __devinit alx_init_adapter_special(struct alx_adapter *adpt)
---
> static int alx_init_adapter_special(struct alx_adapter *adpt)
2016c2016
< static int __devinit alx_init_adapter(struct alx_adapter *adpt)
---
> static int  alx_init_adapter(struct alx_adapter *adpt)
3478c3478
< static int __devinit alx_init(struct pci_dev *pdev,
---
> static int  alx_init(struct pci_dev *pdev,
3786c3786
< static void __devexit alx_remove(struct pci_dev *pdev)
---
> static void alx_remove(struct pci_dev *pdev)
3910c3910
<       .remove      = __devexit_p(alx_remove),
---
>       .remove      = alx_remove,

references for changes https://patchwork.kernel.org/patch/2012501/

uname -a

Linux USSTiconderoga 3.8.1-201.fc18.x86_64 #1 SMP Thu Feb 28 19:23:08 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

Felix Kaechele
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.