Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
ffxx68
Old
(Last edited by ffxx68; 16th December 2011 at 03:14 PM.)
#1  
Member - OP
Thanks Meter 7
Posts: 63
Join Date: Feb 2011
Default [Q] BCM4329 and wlan.ko for Renesas EV tablets

I'm trying to see if the Kernel image built out of this sources:

https://github.com/ffxx68/EVBSP-Kernel

can safely replace the one found in the latest 2.2 stock release (which is 0908) for this device.

Before simply having a "blind" test, replacing the uImage found in the zip with mine, recalc the MD5 and give it a try flashing to tablet, I'd like to match the correct module drivers first.

These are the drivers found in the stock firmware, in the android-fs /lib/modules:

-rw-r--r-- 1 1000 1000 5282033 Aug 24 04:16 8192cu.ko
-rw-r--r-- 1 1000 1000 255881 Dec 15 09:22 em_ave.ko
-rw-r--r-- 1 1000 1000 249144 Dec 15 09:24 fw_bcm4329.bin
-rw-r--r-- 1 1000 1000 206144 Dec 15 09:25 inter_dsp.ko
-rw-r--r-- 1 1000 1000 1315 Aug 24 04:16 nvram.txt
-rw-r--r-- 1 1000 1000 2887102 Aug 24 04:16 pvrsrvkm.ko
-rw-r--r-- 1 1000 1000 1747051 Aug 24 04:16 wlan.ko

Out of these, only em_ave.ko and inter_dsp.ko were re-built along with the kernel.

Googling around, I managed to figure out the following:

8192cu.ko is for the Realtek RTL8192C WiFi chipset, which we don't have on our board... I wonder why it's there.

pvrsrvkm.ko is for the PowerVRSGX530 built-in graphic coprocessor. Can be reused as is, I think.

wlan.ko is the WiFi module driver, which I'm worried the most about. I'm not sure if I can leave the stock one, or if I should find a way to rebuild it, as I can use the firmware of bcm4329 (the actual wireless chipset) coming with the Kernel.

One thing I don't understand is that my build produced also this .ko:

drivers/net/wireless/bcm4329/dhd.ko

which should be our wlan.ko, but filename and size are very different!

Someone who can shed some light on this?

Thanks a lot
 
ffxx68
Old
(Last edited by ffxx68; 16th December 2011 at 03:12 PM.)
#2  
Member - OP
Thanks Meter 7
Posts: 63
Join Date: Feb 2011
Version comparison is like below.

From my tablet's dmesg, I get Dongle and BCM4329 FW version both set to "4.218.248.6":

<4>Dongle Host Driver, version 4.218.248.6
<4>mmc2: queuing unknown CIS tuple 0x80 (50 bytes)
<4>mmc2: queuing unknown CIS tuple 0x80 (7 bytes)
<4>mmc2: queuing unknown CIS tuple 0x80 (4 bytes)
<6>request_suspend_state: wakeup (3->0) at 37369186598 (2011-12-16 14:16:05.741250002 UTC)
<4>mmc2: queuing unknown CIS tuple 0x02 (1 bytes)
<6>mmc2: new SDIO card at address 0001
<4>DHD: dongle ram size is set to 294912(orig 294912)
<4>Firmware version = wl0: Sep 15 2010 14:23:11 version 4.218.248.6
<4>wlan0: Broadcom Dongle Host Driver mac=cc:52:af:2b:22:66

While the kernel module source has this:

bcm4329/include/epivers.h:#define EPI_VERSION_STR "4.218.248.23"

While I can assume the file is just renamed to wlan.ko during installation, can this explain such a huge difference in the resulting .ko size?

dhd.ko (from kernel build) is 241513
wlan.ko (from stock tablet fw) is 1747051

PS - as the original kernel totally missed the bcm4329 support (probably done for a different board version), I grabbed it from https://github.com/pershoot/gtab-2632
 
ffxx68
Old
#3  
Member - OP
Thanks Meter 7
Posts: 63
Join Date: Feb 2011
I've made some (little) progress with respect to this issue.

I've re-compiled the bcm4329 as a module under a different kernel source (from CyanogenMod; same version 2.6.35 as the one I already have onboard).

I then moved the recompiled module and firmware onto the device, simply renaming it (I back up the original ones first!):

Code:
 > adb push dhd.ko /lib/modules/wlan.ko
3066 KB/s (290474 bytes in 0.092s)

 > adb push fw_bcm4329.bin /lib/modules/fw_bcm4329.bin
2948 KB/s (249144 bytes in 0.082s)
But, when I'm restarting the module I get these:

Code:
<4>dhd: Unknown symbol __raw_spin_lock_init (err 0)
<4>dhd: Unknown symbol kmem_cache_alloc_notrace (err 0)
<4>dhd: Unknown symbol __gnu_mcount_nc (err 0)
<4>dhd: Unknown symbol __gpio_set_value (err 0)
<4>dhd: Unknown symbol __tracepoint_kmalloc (err 0)
<4>dhd: Unknown symbol kmalloc_caches (err 0)
Any idea?

Is it possible the original wlan.ko (which is much larger) has been statically linked to some libraries that are not found in the stock firmware?
 
ffxx68
Old
(Last edited by ffxx68; 27th December 2011 at 02:18 PM.)
#4  
Member - OP
Thanks Meter 7
Posts: 63
Join Date: Feb 2011
Changing a few .config values (apart from version, the CyanogenMod kernel is evidently different from my device one) I managed to clear up all errors, except this:

Code:
 <4>dhd: Unknown symbol __gpio_set_value (err 0)
The Linux Cross Reference at http://lxr.free-elec..._gpio_set_value helped me a lot finding where those symbols are found, so that I could fix the corresponding CONFIG.

E.g. __gpio_set_value is in the drivers/gpio/gpiolib.c so I guess CONFIG_GPIOLIB is the one to disable. Infact I'm struggling to find which option this correspond to, in "make menuconfig"...

I need the kernel just as an "environment" where the BCM4329 driver compiles, so I'm not worried about breaking Kernel functionalities, as far as it can compile modules.
 
ffxx68
Old
#5  
Member - OP
Thanks Meter 7
Posts: 63
Join Date: Feb 2011
There has been some progress with respect to my trials I repoerted above, and now the project has gone Open Source.

The quesiton about how to integrate the BCM4329 remains open, and I still hope someone with greater experience than mine can contribute to the discussion which I've started here:

https://groups.google.com/forum/#!to...sp/QTTlwhF9qRk
 
Post Reply+
Tags
bcm4329, renesas, wlan.ko
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...