[Q] Help!! wifi error after loading compiled franco kernel

shashi_hv

Senior Member
Jun 24, 2011
72
8
0
Bangalore
Hi All,
This is my first thread on this forum. Please help in resolving an error that I am facing. I could compile and link successfully franco kernel after downloading the source from franco's github:):)!!

The only problem I face is with wifi. It displays error in the wi-fi option!! This is some what similar to what we used to get in the initial version of gingerbread kernel what Franco had made earlier!! I get the same error even with the stock GB source code of LG or with paulo's kernel source!!! Strange!!!!

The wifi driver(bcm4325) seems to be same except for some tweaks to the original GB source(In the case of Franco's)!! In either case, I am getting the error. The only difference I see is that of the compiler option -Ofast(Optimization option) was used by Franco while since I updated to the latest version of gcc, I do not get the -Ofast option!! So it uses the -Os option instead!!

Error is(logcat):
D/WifiService( 1726): setWifiEnabledBlocking : Country code is COM
E/WifiService( 1726): Failed to load Wi-Fi driver.

Same compiling options were used to compile both zImage and modules?? What could be wrong here? I am not sure what could be wrong here!!! Can anybody help me on this??

Thanks in advace.
 

dr.notor

Senior Member
Jul 25, 2011
720
354
0
-Os has always been ****... Other than that, unless you can somehow make the log more verbose, NFC. :( Can you get something more useful when you try to load the module manually with insmod?
 

shashi_hv

Senior Member
Jun 24, 2011
72
8
0
Bangalore
-Os has always been ****... Other than that, unless you can somehow make the log more verbose, NFC. :( Can you get something more useful when you try to load the module manually with insmod?
I tried it thro' the init.rc too. I dont any other ways to do insmod!!

But it failed even on that account!!
 

shashi_hv

Senior Member
Jun 24, 2011
72
8
0
Bangalore
I dont use -Ofast anymore. Did you manually add wireless.ko to lib/modules from your compiled kernel?

Sent from my u8800 using XDA Premium App
Yup franco. I copied to modules and then signed it with command:

"java -classpath testsign.jar testsign port.zip signed-port.zip"

I really can't understand why this is getting failed as the same compile options were used for both zImage and wireless.ko!! Rest all works fine except the wifi error!!! The idea i think is as long as all the executables are of same signature, then it should work fine, right?? I am confused on what could be the problem!!!
 

shashi_hv

Senior Member
Jun 24, 2011
72
8
0
Bangalore
-Os has always been ****... Other than that, unless you can somehow make the log more verbose, NFC. :( Can you get something more useful when you try to load the module manually with insmod?
Today I will try with other compile options, either O1, O2.... etc.

Strange thing is that I face this problem with all other available kernels also!! Like for ex., original GB source from LG, paulo's kernel!! All of it!!
 

shashi_hv

Senior Member
Jun 24, 2011
72
8
0
Bangalore
Uh, I do not understand a word.

Code:
$ su
# busybox insmod /system/lib/modules/wireless.ko
What is the output of the above.
Weird!!! Though I see the file being there thro' file manager, I get the error as "No such file or directory"!!

I was telling that I tried to insert this same command even in the init.rc file at the boot option!!
 

dr.notor

Senior Member
Jul 25, 2011
720
354
0
Weird!!! Though I see the file being there thro' file manager, I get the error as "No such file or directory"!!

I was telling that I tried to insert this same command even in the init.rc file at the boot option!!
You have been already told that you need to manually add /system/lib/modules with the ones you want (such as wireless.ko or tun.ko or cifs.ko) to the ZIP you are flashing.

Flashing zImage only will not flash the modules!!!!

As for your file manager, I recommend this as a "file manager"

Code:
# ls -l /system/lib/modules
-rw-r--r--    1 0        0            19948 Aug  1  2008 tun.ko
-rw-r--r--    1 0        0           191854 Aug  1  2008 wireless.ko
 
Last edited:

shashi_hv

Senior Member
Jun 24, 2011
72
8
0
Bangalore
You have been already told that you need to manually add /system/lib/modules with the ones you want (such as wireless.ko or tun.ko or cifs.ko) to the ZIP you are flashing.

Flashing zImage only will not flash the modules!!!!

As for your file manager, I recommend this as a "file manager"

Code:
# ls -l /system/lib/modules
-rw-r--r--    1 0        0            19948 Aug  1  2008 tun.ko
-rw-r--r--    1 0        0           191854 Aug  1  2008 wireless.ko
I know that notor!!!

I copied the tun.ko and wireless.ko to the appropriate folder and built the zip file which i flashed!!

The problem is very weird. I see the file wireless.ko if I browse thro' file manager. Even when i press tab in busybox, wireless.ko gets auto populated or even the ls command lists it!!

It is much more weird that if I tried to do insmode ....../tun.ko, i get the error as 'exec format error' but a 'no such file' for the wireless.ko!! Though I flashed both these of these!!
 

dr.notor

Senior Member
Jul 25, 2011
720
354
0
You know, go wipe the files in /system/lib/modules and flash your kernel and modules from the SAME KERNEL you have compiled.

Also, it is insmod, not insmode and generally if you are posting something, copy and paste the exact output of a command instead of telling us stories about what the output says.
 

shashi_hv

Senior Member
Jun 24, 2011
72
8
0
Bangalore
Yup thats what i was thinking too.. i would wipe and try copying it once again.

Definitely i would have shown you the screen shots.. but i am not in a position to grab those and paste it here, as i am in office right now.. but the point is i understand some of linux system and familiar wirh it!!

I tried to create and flash the zip the standard way thats available on net and it did not worked!! Thats the point!! So wanted to know am i missing anything!!

Sent from my LG Optimus One P500 using XDA Premium App
 

shashi_hv

Senior Member
Jun 24, 2011
72
8
0
Bangalore
Well, things like 'exec format error' clearly suggest that you flashed some weird corrupt junk... :p
I tried this!!!

1. su
2. rm -f /system/lib/modules/wireless.ko
3. rm -f /system/lib/modules/tun.ko

Now the files were not there in the directory. Flashed the same zip file which I used earlier and found the wireless.ko and tun.ko in the same path!!! But still the problem prevails!!

Just to confirm once again that I indeed copied the compiled wireless.ko and tun.ko and built the zip file!! No problem in that!!!

Why do not you try to do insmod of any existing file in the modules path and report what error you get?? I think even you should get the same error even in your phone too!! I tried this command on an already existing libra.ko in the same path and got the same error!!!
 

dr.notor

Senior Member
Jul 25, 2011
720
354
0
for a few weeks i has compiled my kernel with optimizations -O3 and got "no such device" when tried to insmod the wifi module ...
possibly the wifi module gets corrupted when the kernel is to much optimized...
Yeah. Just leave the thing alone. There is basically nothing you will optimize by subverting various crazy -O3 -fzomgoptimized -fflying-phone flags to kernel compile. Leave the stock CFLAGS stuff alone.
 

shashi_hv

Senior Member
Jun 24, 2011
72
8
0
Bangalore
Yeah. Just leave the thing alone. There is basically nothing you will optimize by subverting various crazy -O3 -fzomgoptimized -fflying-phone flags to kernel compile. Leave the stock CFLAGS stuff alone.
On a different note, can anybody tell me who will load the wireless.ko and tun.ko at boot time? I mean is there any kind of scripts like the init.rc or any other *.sh scripts under /system/etc?
 

shashi_hv

Senior Member
Jun 24, 2011
72
8
0
Bangalore
I tried to see in the init.qcom.wifi.sh script, but its based on the property 'wlan.driver.status'!! I dont see this property under getprop command, but added one using setprop, but no success!!!
 

dr.notor

Senior Member
Jul 25, 2011
720
354
0
Suggestion: restore the stock init **** and leave it alone. There is absolutely no need to mess with that to get WiFi working on any ROM. Others, like tun.ko, you need to load manually via initscript or whatever. Go fix your kernel compile and it will just work.