Problem compiling BCM Wireless driver on 2.6.37 (lib80211 symbol issue)
Dear List, I recently compiled and booted up the 2.6.37 kernel on my Ubuntu (10.04), from 2.6.36.1. I have been trying to compile the Broadcom Wireless driver on 2.6.37, after making some changes in the source code. Just to add, this driver has been working fine on 2.6.36.1 which my machine ran earlier. ---8<--- $> uname -a Linux Tiger-L 2.6.37 #2 SMP Thu Mar 3 22:45:04 IST 2011 i686 GNU/Linux $> lspci | grep Broadcom 03:00.0 Network controller: Broadcom Corporation BCM4312 802.11b/g (rev 01) ---8<--- I have been trying to compile the Broadcom driver hybrid-portsrc-x86_32-v5.60.48.36.tar.gz, which I got from Broadcom website. [ It is quite possible that newer version is available on the same website, but I intend to get this version up, if possible.] This driver requires the 80211 Library kernel module (lib80211.ko) to be loaded as it accesses the security (crypto) algo functions which are available in this library. Thus: ---8<--- $> modprobe lib80211 $> lsmod | grep lib80211 lib80211 5058 0 ---8<--- Then, I made some changes in the code (as the code base was not getting directly compiled on this new kernel). I have attached the patch with this email in case that is required. Furtheron, on compiling the module, following is what I get: ---8<--- (in the driver directory) $> make clean KBUILD_NOPEDANTIC=1 make -C /lib/modules/`uname -r`/build M=`pwd` clean make[1]: Entering directory `/opt/kernels/linux-2.6.37' CLEAN /home/shrey/work/Things_for_Wifi_on_Linux/wifi_driver_broadcom_2.6.37/.tmp_versions CLEAN /home/shrey/work/Things_for_Wifi_on_Linux/wifi_driver_broadcom_2.6.37/Module.symvers make[1]: Leaving directory `/opt/kernels/linux-2.6.37' $> make KBUILD_NOPEDANTIC=1 make -C /lib/modules/`uname -r`/build M=`pwd` make[1]: Entering directory `/opt/kernels/linux-2.6.37' LD /home/shrey/work/Things_for_Wifi_on_Linux/wifi_driver_broadcom_2.6.37/built-in.o CC [M] /home/shrey/work/Things_for_Wifi_on_Linux/wifi_driver_broadcom_2.6.37/src/shared/linux_osl.o CC [M] /home/shrey/work/Things_for_Wifi_on_Linux/wifi_driver_broadcom_2.6.37/src/wl/sys/wl_linux.o CC [M] /home/shrey/work/Things_for_Wifi_on_Linux/wifi_driver_broadcom_2.6.37/src/wl/sys/wl_iw.o LD [M] /home/shrey/work/Things_for_Wifi_on_Linux/wifi_driver_broadcom_2.6.37/wl.o Building modules, stage 2. MODPOST 1 modules WARNING: "lib80211_get_crypto_ops" [/home/shrey/work/Things_for_Wifi_on_Linux/wifi_driver_broadcom_2.6.37/wl.ko] undefined! CC /home/shrey/work/Things_for_Wifi_on_Linux/wifi_driver_broadcom_2.6.37/wl.mod.o LD [M] /home/shrey/work/Things_for_Wifi_on_Linux/wifi_driver_broadcom_2.6.37/wl.ko make[1]: Leaving directory `/opt/kernels/linux-2.6.37' ---8<--- On searching for the lib80211_get_crypto_ops symbol: ---8<--- $> cat /proc/kallsyms | grep lib80211_get_crypto_ops f826273c r __ksymtab_lib80211_get_crypto_ops [lib80211] f82627b4 r __kstrtab_lib80211_get_crypto_ops [lib80211] f826278c r __kcrctab_lib80211_get_crypto_ops [lib80211] f8262020 T lib80211_get_crypto_ops [lib80211] <<<##### $> $> zcat /proc/config.gz | grep -i lib80211 CONFIG_LIB80211=m <<<##### CONFIG_LIB80211_CRYPT_WEP=m CONFIG_LIB80211_CRYPT_CCMP=m CONFIG_LIB80211_CRYPT_TKIP=m # CONFIG_LIB80211_DEBUG is not set $> ---8<--- This is what I get when I inserted the kernel: ---8<--- $> sudo insmod ./wl.ko [sudo] password for shrey: insmod: error inserting './wl.ko': -1 Invalid parameters shrey@Tiger-L:~/work/Things_for_Wifi_on_Linux/wifi_driver_broadcom_2.6.37$ dmesg | tail | grep wl [ 1025.190669] wl: no symbol version for lib80211_get_crypto_ops [ 1025.190674] wl: Unknown symbol lib80211_get_crypto_ops (err -22) $> ---8<--- As far as I understand the symbol for lib80211_get_crypto_ops function is available is exported: ---8<--- 251 return alg->ops; 252 } 253 EXPORT_SYMBOL(lib80211_get_crypto_ops); 254 255 static void *lib80211_crypt_null_init(int keyidx) 256 { 257 return (void *)1; "net/wireless/lib80211.c" 284 lines --89%-- ---8<--- and hence, it should be available to my module on request. I am not sure what is happening or where should I look next. Can anyone on the list point me out as to what I could be missing. Also, initially the compilation was giving issues about MODULE_LICENSE not being GPL, which I explicitly did by adding in the code (that is not part of the patch I have attached). I don't think that would affect this situation as the symbol lib80211_get_crypto_ops is not restricted to GPL modules only. Any help would be deeply appreciated. TIA, Shreyansh
On Sun, Mar 20, 2011 at 09:04:21PM +0530, Shreyansh Jain wrote:
Dear List,
I recently compiled and booted up the 2.6.37 kernel on my Ubuntu (10.04), from 2.6.36.1. I have been trying to compile the Broadcom Wireless driver on 2.6.37, after making some changes in the source code. Just to add, this driver has been working fine on 2.6.36.1 which my machine ran earlier.
<snip> Why not ask the authors of that code? As it is closed source, they are the only ones that can legally help you out. Or you could try the 2.6.38 kernel which has support for this hardware already in it... best of luck, greg k-h
Hi Greg On Sun, Mar 20, 2011 at 9:28 PM, Greg KH <greg@kroah.com> wrote:
On Sun, Mar 20, 2011 at 09:04:21PM +0530, Shreyansh Jain wrote:
Dear List,
I recently compiled and booted up the 2.6.37 kernel on my Ubuntu (10.04), from 2.6.36.1. I have been trying to compile the Broadcom Wireless driver on 2.6.37, after making some changes in the source code. Just to add, this driver has been working fine on 2.6.36.1 which my machine ran earlier.
<snip>
Why not ask the authors of that code? As it is closed source, they are the only ones that can legally help you out.
Well, I have not considered asking the authors because I have the code, I can successfully compile it and then, unable to link to the kernel because of a missing function which is present in another module and exported in the kernel. Yes, this driver might not be GPL'd, but I certainly have its code. As for help on compilation, if a source code is not getting compiled and giving a common error like symbol not found (and that symbol being present in another GPL'd module), any issue of the code not GPL shouldn't prevent the code from being compiled-linked-loaded. Probably, Its just that I am missing some basic point (of a random kernel module compilation-loading) which I am not able to figure out. And yes, thanks for your suggestion - I will search for an appropriate list (specific for this driver) and post there as well.
Or you could try the 2.6.38 kernel which has support for this hardware already in it...
Certainly that is an option - its just that I haven't yet compiled the 2.6.38 kernel. In case nothing works out on this issue, I would take this path. But, not before understanding why this is not working.
best of luck,
Thanks!
greg k-h
Shreyansh
On Sun, Mar 20, 2011 at 11:42:36PM +0530, Shreyansh Jain wrote:
Hi Greg
On Sun, Mar 20, 2011 at 9:28 PM, Greg KH <greg@kroah.com> wrote:
On Sun, Mar 20, 2011 at 09:04:21PM +0530, Shreyansh Jain wrote:
Dear List,
I recently compiled and booted up the 2.6.37 kernel on my Ubuntu (10.04), from 2.6.36.1. I have been trying to compile the Broadcom Wireless driver on 2.6.37, after making some changes in the source code. Just to add, this driver has been working fine on 2.6.36.1 which my machine ran earlier.
<snip>
Why not ask the authors of that code? As it is closed source, they are the only ones that can legally help you out.
Well, I have not considered asking the authors because I have the code, I can successfully compile it and then, unable to link to the kernel because of a missing function which is present in another module and exported in the kernel.
Wait, why ask some random people instead of the people who can actually fix the problem for you (i.e. the authors of the code?)
Yes, this driver might not be GPL'd, but I certainly have its code.
Yes, but note that just because you have the code, that doesn't mean that anyone else has the rights to change it (including you), or help you out. Please read the license for what you have before making assumptions. best of luck, greg k-h
Hi Greg, On Mon, Mar 21, 2011 at 12:20 AM, Greg KH <greg@kroah.com> wrote:
On Sun, Mar 20, 2011 at 11:42:36PM +0530, Shreyansh Jain wrote:
Hi Greg
<snip>
Why not ask the authors of that code? As it is closed source, they are the only ones that can legally help you out.
Well, I have not considered asking the authors because I have the code, I can successfully compile it and then, unable to link to the kernel because of a missing function which is present in another module and exported in the kernel.
Wait, why ask some random people instead of the people who can actually fix the problem for you (i.e. the authors of the code?)
Yes, this driver might not be GPL'd, but I certainly have its code.
Yes, but note that just because you have the code, that doesn't mean that anyone else has the rights to change it (including you), or help you out. Please read the license for what you have before making assumptions.
Right, I understand your point and apologize for being callous enough pertaining to the licensing issues. Actually, I just went ahead and read the license terms and (as far as what I can make sense of the legal language) it doesn't restrict changes in the code until and unless I am not distributing it and not breaking any IEEE standard compatibility (once again, in case distributing it with a broadcom device). Nevertheless, I will try and search for correct people to answer this or reframe the question in more generic terms if problem still persists. Thanks for correcting me!
best of luck,
greg k-h
- Shreyansh
participants (2)
-
Greg KH -
Shreyansh Jain