Ubuntu 12.04 patched b43 driver compilation error

Posted by Zed on Ask Ubuntu See other posts from Ask Ubuntu or by Zed
Published on 2012-10-03T19:21:18Z Indexed on 2012/10/08 3:48 UTC
Read the original article Hit count: 794

Filed under:
|
|
|

I tried this How do I install this patched b43 driver? guide to install patched b43 driver on Ubuntu 12.04 with 3.2.0-31-generic kernel but I can't pass compilation phase.Here is what I did:

wget http://www.orbit-lab.org/kernel/compat-wireless-3-stable/v3.1/compat-wireless-3.1.1-1.tar.bz2 cd compat-wireless-3.1.1-1/

scripts/driver-select b43

make

make -C /lib/modules/3.2.0-31-generic/build M=/home/marco/compat-wireless-3.1.1-1 modules
make[1]: Entering directory `/usr/src/linux-headers-3.2.0-31-generic'
  CC [M]  /home/marco/compat-wireless-3.1.1-1/compat/main.o
In file included from /home/marco/compat-wireless-3.1.1-1/include/linux/compat-2.6.29.h:5:0,
                 from /home/marco/compat-wireless-3.1.1-1/include/linux/compat-2.6.h:24,
                 from <command-line>:0:
include/linux/netdevice.h:1153:5: warning: "IS_ENABLED" is not defined [-Wundef]
include/linux/netdevice.h:1153:15: error: missing binary operator before token "("
include/linux/netdevice.h: In function ‘netdev_uses_dsa_tags’:
include/linux/netdevice.h:1421:9: error: ‘struct net_device’ has no member named ‘dsa_ptr’
include/linux/netdevice.h:1422:31: error: ‘struct net_device’ has no member named ‘dsa_ptr’
include/linux/netdevice.h: In function ‘netdev_uses_trailer_tags’:
include/linux/netdevice.h:1431:9: error: ‘struct net_device’ has no member named ‘dsa_ptr’
include/linux/netdevice.h:1432:35: error: ‘struct net_device’ has no member named ‘dsa_ptr’
make[3]: *** [/home/marco/compat-wireless-3.1.1-1/compat/main.o] Error 1
make[2]: *** [/home/marco/compat-wireless-3.1.1-1/compat] Error 2
make[1]: *** [_module_/home/marco/compat-wireless-3.1.1-1] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.2.0-31-generic'
make: *** [modules] Error 2

To fix that error I added #include <linux/kconfig.h> to /usr/src/linux-headers-3.2.0-31-generic/include/linux/netdevice.h but now I'm getting something else

make

make -C /lib/modules/3.2.0-31-generic/build M=/home/marco/compat-wireless-3.1.1-1 modules
make[1]: Entering directory `/usr/src/linux-headers-3.2.0-31-generic'
  CC [M]  /home/marco/compat-wireless-3.1.1-1/compat/main.o
  LD [M]  /home/marco/compat-wireless-3.1.1-1/compat/compat.o
  CC [M]  /home/marco/compat-wireless-3.1.1-1/drivers/bcma/main.o
In file included from /home/marco/compat-wireless-3.1.1-1/include/linux/bcma/bcma.h:9:0,
                 from /home/marco/compat-wireless-3.1.1-1/drivers/bcma/bcma_private.h:8,
                 from /home/marco/compat-wireless-3.1.1-1/drivers/bcma/main.c:8:
/home/marco/compat-wireless-3.1.1-1/include/linux/ssb/ssb.h: In function ‘ssb_driver_register’:
/home/marco/compat-wireless-3.1.1-1/include/linux/ssb/ssb.h:236:36: error: ‘THIS_MODULE’ undeclared (first use in this function)
/home/marco/compat-wireless-3.1.1-1/include/linux/ssb/ssb.h:236:36: note: each undeclared identifier is reported only once for each function it appears in
In file included from /home/marco/compat-wireless-3.1.1-1/drivers/bcma/bcma_private.h:8:0,
                 from /home/marco/compat-wireless-3.1.1-1/drivers/bcma/main.c:8:
/home/marco/compat-wireless-3.1.1-1/include/linux/bcma/bcma.h: In function ‘bcma_driver_register’:
/home/marco/compat-wireless-3.1.1-1/include/linux/bcma/bcma.h:170:37: error: ‘THIS_MODULE’ undeclared (first use in this function)
/home/marco/compat-wireless-3.1.1-1/drivers/bcma/main.c: At top level:
/home/marco/compat-wireless-3.1.1-1/drivers/bcma/main.c:12:20: error: expected declaration specifiers or ‘...’ before string constant
/home/marco/compat-wireless-3.1.1-1/drivers/bcma/main.c:13:16: error: expected declaration specifiers or ‘...’ before string constant
/home/marco/compat-wireless-3.1.1-1/drivers/bcma/main.c:182:1: warning: data definition has no type or storage class [enabled by default]
/home/marco/compat-wireless-3.1.1-1/drivers/bcma/main.c:182:1: warning: type defaults to ‘int’ in declaration of ‘EXPORT_SYMBOL_GPL’ [-Wimplicit-int]
/home/marco/compat-wireless-3.1.1-1/drivers/bcma/main.c:182:1: warning: parameter names (without types) in function declaration [enabled by default]
/home/marco/compat-wireless-3.1.1-1/drivers/bcma/main.c:188:1: warning: data definition has no type or storage class [enabled by default]
/home/marco/compat-wireless-3.1.1-1/drivers/bcma/main.c:188:1: warning: type defaults to ‘int’ in declaration of ‘EXPORT_SYMBOL_GPL’ [-Wimplicit-int]
/home/marco/compat-wireless-3.1.1-1/drivers/bcma/main.c:188:1: warning: parameter names (without types) in function declaration [enabled by default]
make[3]: *** [/home/marco/compat-wireless-3.1.1-1/drivers/bcma/main.o] Error 1
make[2]: *** [/home/marco/compat-wireless-3.1.1-1/drivers/bcma] Error 2
make[1]: *** [_module_/home/marco/compat-wireless-3.1.1-1] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.2.0-31-generic'
make: *** [modules] Error 2

Any suggestion what to try next?

© Ask Ubuntu or respective owner

Related posts about 12.04

Related posts about wireless