Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader > Kobo Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 06-08-2013, 04:03 PM   #1
a3nm
Member
a3nm doesn't littera3nm doesn't littera3nm doesn't litter
 
Posts: 11
Karma: 204
Join Date: May 2013
Device: Kobo Glo
Getting WiFi to work with a custom kernel on Glo

Hi,

Because the stock Glo kernel has no iptables support, I have compiled a custom kernel with this option from the original kernel : https://github.com/kobolabs/Kobo-Rea....6.35.3.tar.gz

I managed to write it to the Glo's internal SD card using dd if=uImage of=/dev/mmcblk0 bs=512 seek=2048 and to get the device to boot. However, of course, the modules used by the device need to be upgraded. I managed to compile functional versions of the USB network interface modules in /drivers/ntx508/usb/gadget and even managed to compile a new /drivers/ntx508/wifi/dhd.ko using https://github.com/kobolabs/Kobo-Rea...2-03112011.tgz

However, after all this, though the device is usable and I can connect to the device from USB (indicating that the relevant modules are operational), the WiFi is not working. I can perform:
Code:
busybox insmod /drivers/ntx508/wifi/dhd.ko
busybox insmod /drivers/ntx508/wifi/sdio_wifi_pwr.ko
and an eth0 interface shows up in /sbin/ifconfig -a. However, trying to run "/sbin/ifconfig eth0 up" fails with "ifconfig: SIOCSIFFLAGS: Operation not permitted" (though I'm root) and "wlarm_le -i eth0 up" fails with "wlarm_le: wl driver adapter not found". Interestingly, trying to "rmmod sdio_wifi_pwr" triggers an oops (that gets written to dmesg):
Code:
kernel BUG at drivers/mmc/core/sdio_io.c:29!
Unable to handle kernel NULL pointer dereference at virtual address 00000000
pgd = 80004000
[00000000] *pgd=00000000
Internal error: Oops: 817 [#1] PREEMPT
last sysfs file: /sys/devices/platform/pmic_battery.1/power_supply/mc13892_bat/status
Modules linked in: dhd ipv6 g_ether arcotg_udc [last unloaded: sdio_wifi_pwr]
CPU: 0    Not tainted  (2.6.35.3-850-gbc67621a3nm+ #9)
PC is at __bug+0x1c/0x28
LR is at __bug+0x18/0x28
pc : [<80027c28>]    lr : [<80027c24>]    psr: 60000013
sp : 8e0f9dd8  ip : 900fe000  fp : 00000000
r10: 00000001  r9 : 7f085718  r8 : 8e0f9e00
r7 : 7f087700  r6 : 8e0f9e47  r5 : 00000004  r4 : 0001000e
r3 : 00000000  r2 : 8e0f9dcc  r1 : 80321bd4  r0 : 00000033
Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
Control: 10c5387d  Table: 7e08c019  DAC: 00000017
Process kmmcd (pid: 153, stack limit = 0x8e0f82e8)
Stack: (0x8e0f9dd8 to 0x8e0fa000)
9dc0:                                                       00000000 8020bbe0
9de0: 8d567304 7f07e7d8 8004eb4c 8e027140 803a15c8 8e027170 8e027140 803a15c8
9e00: ffffffff 00000000 00000002 8e0f9e68 00000000 8d5679e0 00000001 0001000e
9e20: 00000000 00000000 00000000 7f07e8ac 8e0f9e47 00000001 0001000e 7f07f5c8
9e40: 8d5679e0 10000001 8d760000 8d5679e0 8e0f9e68 00000001 8e0861a0 7f079608
9e60: 8e0f9e68 ffffe925 8e0f9e7c 00000000 0000001a 8029748c a0000013 00000000
9e80: 00200200 8d760000 8eb730ac 8e4a1540 00000001 8e0861a0 00000000 7f079878
9ea0: 8d760000 7f07b4a4 8d760000 00000001 8e0f9eb0 0000027f 8eb73000 8eb730ac
9ec0: 8e1b96c0 8eb7303c 8e0861a0 7f06b814 8eb73000 7f06b9a4 8e4a1540 8d760000
9ee0: 8e4a1540 7f0874c8 00000000 7f079c64 8eb730ac 7f0874bc 8e4a1a40 7f07fc50
9f00: 8e5dfe00 8e5dfe08 7f08559c 8020ab18 8e5dfe08 7f08559c 8ebacc08 801ada88
9f20: 00000000 8e5dfe3c 8e5dfe08 801adaf0 00000000 8e5dfe08 8e086000 801ad68c
9f40: 8e5dfe08 801ab4e0 8e5dfe08 8e086000 0000006f 8020ad80 00000001 8020a1cc
9f60: 00000000 8e086000 ffffff85 8e17c340 80205f58 8020a258 8020a200 8e0861a0
9f80: 8e086000 80205fe4 8e0861a0 8e0f9fac 8e17c340 8e0f8000 8e0861a4 8e17c340
9fa0: 80205f58 80065090 8e0f9fd4 00000000 8e027140 8006902c 8e0f9fb8 8e0f9fb8
9fc0: 8e029f30 80064f28 8e17c340 00000013 00000000 80068964 00000000 00000000
9fe0: 8e0f9fe0 8e0f9fe0 8e029f30 800688ec 800258b4 800258b4 fffbffff ffffffff
[<80027c28>] (__bug+0x1c/0x28) from [<8020bbe0>] (sdio_claim_host+0x2c/0x40)
[<8020bbe0>] (sdio_claim_host+0x2c/0x40) from [<7f07e7d8>] (sdioh_request_byte+0x19c/0x25
0 [dhd])
[<7f07e7d8>] (sdioh_request_byte+0x19c/0x250 [dhd]) from [<7f07e8ac>] (sdioh_cfg_write+0x
20/0x24 [dhd])
[<7f07e8ac>] (sdioh_cfg_write+0x20/0x24 [dhd]) from [<7f07f5c8>] (bcmsdh_cfg_write+0x4c/0
x88 [dhd])
[<7f07f5c8>] (bcmsdh_cfg_write+0x4c/0x88 [dhd]) from [<7f079608>] (dhdsdio_htclk.isra.1+0
x40/0x260 [dhd])
[<7f079608>] (dhdsdio_htclk.isra.1+0x40/0x260 [dhd]) from [<7f079878>] (dhdsdio_clkctl.is
ra.2+0x50/0xd0 [dhd])
[<7f079878>] (dhdsdio_clkctl.isra.2+0x50/0xd0 [dhd]) from [<7f07b4a4>] (dhd_bus_stop+0x58
/0x24c [dhd])
[<7f07b4a4>] (dhd_bus_stop+0x58/0x24c [dhd]) from [<7f06b814>] (dhd_bus_detach+0x2c/0x44 
[dhd])
[<7f06b814>] (dhd_bus_detach+0x2c/0x44 [dhd]) from [<7f06b9a4>] (dhd_detach+0x178/0x1d8 [
dhd])
[<7f079c64>] (dhdsdio_release+0x38/0x100 [dhd]) from [<7f07fc50>] (bcmsdh_remove+0x1c/0x9
0 [dhd])
[<7f07fc50>] (bcmsdh_remove+0x1c/0x90 [dhd]) from [<8020ab18>] (sdio_bus_remove+0x1c/0x58
)
[<8020ab18>] (sdio_bus_remove+0x1c/0x58) from [<801ada88>] (__device_release_driver+0x84/
0xd0)
[<801ada88>] (__device_release_driver+0x84/0xd0) from [<801adaf0>] (device_release_driver
+0x1c/0x28)
[<801adaf0>] (device_release_driver+0x1c/0x28) from [<801ad68c>] (bus_remove_device+0x74/
0x84)
[<801ad68c>] (bus_remove_device+0x74/0x84) from [<801ab4e0>] (device_del+0x110/0x16c)
[<801ab4e0>] (device_del+0x110/0x16c) from [<8020ad80>] (sdio_remove_func+0x1c/0x28)
[<8020ad80>] (sdio_remove_func+0x1c/0x28) from [<8020a1cc>] (mmc_sdio_remove+0x48/0x7c)
[<8020a1cc>] (mmc_sdio_remove+0x48/0x7c) from [<8020a258>] (mmc_sdio_detect+0x58/0x7c)
[<8020a258>] (mmc_sdio_detect+0x58/0x7c) from [<80205fe4>] (mmc_rescan+0x8c/0x308)
[<80205fe4>] (mmc_rescan+0x8c/0x308) from [<80065090>] (worker_thread+0x168/0x218)
[<80065090>] (worker_thread+0x168/0x218) from [<80068964>] (kthread+0x78/0x84)
[<80068964>] (kthread+0x78/0x84) from [<800258b4>] (kernel_thread_exit+0x0/0x8)
Code: e59f0010 e1a01003 eb09b050 e3a03000 (e5833000)
Has anyone gotten the WiFi to work with a custom kernel for the Kobo Glo? My prime suspect is this sdio_wifi_pwr that should probably be recompiled somehow, but I do not know where this file comes from and how to recompile it (Google isn't very helpful). Any ideas?

Thanks!
a3nm is offline   Reply With Quote
Old 06-11-2013, 06:13 AM   #2
giorgio130
Time Waster
giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.
 
Posts: 422
Karma: 289160
Join Date: May 2011
Device: Kobo Glo and Aura HD
sdio_wifi_pwr.c is included in the kernel source, if you made a "normal" kernel build with proper configuration it should be drivers/mmc/card/sdio_wifi_pwr.ko
Try to load it!
giorgio130 is offline   Reply With Quote
Advert
Old 08-17-2015, 04:25 PM   #3
pantec
Junior Member
pantec began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Aug 2015
Device: Kobo Mini / Glo
You need to integrate the driver into your kernel sources and recompile the kernel.
I've prepared a kernel patch to 2.6.x kernels.

1. Get the driver bcm-dhd-falcon-5901132-03112011.tgz from https://github.com/kobolabs/Kobo-Rea.../hw/imx508/ntx and unpack it somewhere on your disc

2a. let the environment variable KOBOLABS_SUPPLIED_DHD point to the BCM-DHD source tree
export KOBOLABS_SUPPLIED_DHD= <where_you_unpacked_bcm_dhd_falcon.tgz>

2b. let the environment variable KSRC point to your kernel sources

3. get my kernel patch (see attached file at the end) and unpack it
tar -xvzf kobo_bcmdhd.tgz -C $KSRC/drivers/net/wireless

4. relink sources and headers
cd $KSRC/drivers/net/wireless/kobo_bcmdhd
. relink-sources.cmds

5. run kernel menuconfig
cd $KSRC
make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- menuconfig

6. select Kobo DHD in wireless-devices section, you must unselect CFG80211 support in wireless network options, the cfg80211 stuff doesn't compile on 2.x kernels

7. compile kernel and modules, there is no need to fake module version etc, since the module is fully integrated into the kernel compilation
Attached Files
File Type: bz2 kobo_bcmdhd.tar.bz2 (3.9 KB, 221 views)

Last edited by pantec; 08-17-2015 at 04:41 PM.
pantec is offline   Reply With Quote
Old 03-29-2024, 04:27 PM   #4
bitfreak
Enthusiast
bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.
 
Posts: 35
Karma: 3790
Join Date: Jan 2024
Device: Kobo
OMG, this is a stale thread, but still lets hope someone can answer

I tried following the steps but I can't seem to get the KOBO DHD under wireless.

Now apparently step 4. was incomplete as you still need to apply pantec's patch, so I added these commands
Code:
cd ..
patch -p1 <kobo_bcmdhd/patch.diff
But after that, nothing extra appears under
Device Drivers/Network device support/Wireless LAN

Does anyone have an idea what I'm doing wrong ?

Steps I took:
Spoiler:

Code:
1.
wget https://github.com/kobolabs/Kobo-Reader/raw/master/hw/imx508/ntx/bcm-dhd-falcon-5901132-03112011.tgz
mkdir bcm-dhd-falcon-5901132-03112011
tar -xvf bcm-dhd-falcon-5901132-03112011.tgz -Cbcm-dhd-falcon-5901132-03112011

2a.
export KOBOLABS_SUPPLIED_DHD=bcm-dhd-falcon-5901132-03112011

2b.
tar -xvf linux-2.6.35.3.tar.gz
export KSRC=linux-2.6.35.3

3.
wget "https://www.mobileread.com/forums/attachment.php?attachmentid=141151&d=1439843541" -O kobo_bcmdhd.tar.bz2
tar -xvf kobo_bcmdhd.tar.bz2 -C $KSRC/drivers/net/wireless

4.
cd $KSRC/drivers/net/wireless/kobo_bcmdhd
. relink-sources.cmds
cd ..
patch -p1 <kobo_bcmdhd/patch.diff 

5.
cd $KSRC
make ARCH=arm CROSS_COMPILE=arm-kobo-linux-gnueabihf- menuconfig
bitfreak is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Custom Kernel] Next/Prev page using any buttons seaniko7 Kindle Developer's Corner 30 07-05-2018 12:22 PM
[K3] Custom Kernel (rescue shell !, kexec, patched recovery) seaniko7 Kindle Developer's Corner 16 03-29-2014 05:13 PM
Custom kernel for Kindle 3 yifanlu Kindle Developer's Corner 61 07-06-2013 11:58 AM
Custom 3.3 kernel with kexec support and patched recovery seaniko7 Kindle Developer's Corner 10 09-09-2012 04:14 PM
Custom kernel in Kindle 4 NT? zatix Kindle Developer's Corner 1 02-27-2012 09:09 AM


All times are GMT -4. The time now is 01:07 PM.


MobileRead.com is a privately owned, operated and funded community.