[Angstrom-devel] Kernel modules build/install issues, was: Re: Fwd: ipaq h4100 bluetooth and wifi issues

daniel at steen-family.com daniel at steen-family.com
Tue Sep 18 22:41:19 CEST 2007


Hm.  How would I know if its a "module already loaded" error?  The strange thing is that I've completely deleted the tmp folder in my  OE folder and started from scratch, and I still get this error. 
Also the module does show up in lsmod after I do the load, and it
shows up as in use.  I just can't get any kind of response from the
bluetooth device.  I typically do the following:


load h4000_bt.ko module
hciattach /dev/ttyS1 any (I've also tried S2 and S3)
hciconfig hci0 up

and I get:  "Can't init device hci0: Connection timed out (110)"

when I do hciconfig without any options I get an entry for hci0, but the BD Address is set to all zeroes (this is normally the case before I do an "up" on that interface).

Also I can't put the ipaq to sleep after I load the module.  It drops to the "console" screen, prints "suspending console(s)" for a while and then either wakes up again or hangs.


I've included the relavent output of dmesg below:

<6>[ 9771.470000] h4000 Bluetooth Driver
<3>[ 9771.500000] Alignment trap: not handling ldm with s-bit set
<3>[ 9771.510000] Alignment trap: not handling instruction 7972636e at [<c000e450>]
<1>[ 9771.510000] Unhandled fault: alignment exception (0x0f3) at 0xffffffdd
<4>[ 9771.520000] Internal error: : f3 [#1]
<4>[ 9771.520000] Modules linked in: h4000_bt acx snd_pcm_oss snd_mixer_oss i2c_pxa snd_h4000_audio snd_uda1380 i2c_core snd_pxa2xx_i2sound snd_pcm snd_timer snd_page_alloc snd rfcomm hidp hid l2cap bluetooth
<4>[ 9771.520000] CPU: 0
<4>[ 9771.520000] PC is at pxa_set_btuart_info+0x14/0x1c
<4>[ 9771.520000] LR is at h4000_bluetooth_probe+0x1c/0x54 [h4000_bt]
<4>[ 9771.520000] pc : [<c000e454>]    lr : [<bf06819c>]    Not tainted
<4>[ 9771.520000] sp : c3501dd0  ip : c3501de8  fp : c3501de4
<4>[ 9771.520000] r10: c4814000  r9 : 00000014  r8 : c02b9ba4
<4>[ 9771.520000] r7 : c385c880  r6 : bf068a74  r5 : bf068aa0  r4 : bf068cc0
<4>[ 9771.520000] r3 : bf068a74  r2 : 00000001  r1 : c04ebb48  r0 : bf068b14
<4>[ 9771.520000] Flags: Nzcv  IRQs on  FIQs on  Mode SVC_32  Segment user
<4>[ 9771.520000] Control: 397F
<4>[ 9771.520000] Table: A2828000  DAC: 00000015
<4>[ 9771.520000] Process insmod (pid: 6070, stack limit = 0xc3500258)
<4>[ 9771.520000] Stack: (0xc3501dd0 to 0xc3502000)
<4>[ 9771.520000] 1dc0:                                     c014930c c02b9b00 c3501df4 c3501de8 
<4>[ 9771.520000] 1de0: c014afb0 bf06818c c3501e1c c3501df8 c0149470 c014af9c c00817dc c385c880 
<4>[ 9771.520000] 1e00: bf068a74 c02b9b00 bf068a74 00000014 c3501e3c c3501e20 c01495e8 c01493ac 
<4>[ 9771.520000] 1e20: c02205a8 c02b9bd8 c02b9b00 c01496c8 c3501e54 c3501e40 c014974c c014953c 
<4>[ 9771.520000] 1e40: 00000000 c3501e5c c3501e84 c3501e58 c01488b8 c01496d4 00000014 c02c5b80 
<4>[ 9771.520000] 1e60: c02c5b80 c02b9b48 bf068a74 bf068a88 c02c5a80 00000000 c3501e94 c3501e88 
<4>[ 9771.520000] 1e80: c01492bc c014887c c3501ebc c3501e98 c0148c14 c01492a8 c2bbe000 bf068a74 
<4>[ 9771.520000] 1ea0: c2bbe000 bf068b40 c2bbe1c4 00000014 c3501ed4 c3501ec0 c0149a58 c0148bbc 
<4>[ 9771.520000] 1ec0: c0222650 c2bbe19c c3501ee4 c3501ed8 c014b258 c01499d0 c3501ef4 c3501ee8 
<4>[ 9771.520000] 1ee0: bf0a901c c014b1f8 c3501fa4 c3501ef8 c005b018 bf0a900c 00000000 c3501f08 
<4>[ 9771.520000] 1f00: 00012008 00000000 00000000 00000000 00000000 00000000 00000000 00000000 
<4>[ 9771.520000] 1f20: 00000000 00000000 00000000 00000000 00000000 00000000 c4814f80 c0615960 
<4>[ 9771.520000] 1f40: 00000000 c4814b50 c4814a60 c4814b78 00000000 0000003e 0000003e bf0683f8 
<4>[ 9771.520000] 1f60: c3500000 c48147d4 c4814ba0 00000012 00000000 00000000 c0084534 00008edc 
<4>[ 9771.520000] 1f80: 00000007 00012018 00000080 c0020de8 c3500000 00000000 00000000 c3501fa8 
<4>[ 9771.520000] 1fa0: c0020c40 c0059dc8 00008edc 00000007 00012018 000013d0 00012008 0000002f 
<4>[ 9771.520000] 1fc0: 00008edc 00000007 00012018 00000080 beaf6dea 00000000 00012008 00000000 
<4>[ 9771.520000] 1fe0: 00004000 beaf6b74 00008e10 400cacc4 60000010 00012018 00000000 00000000 
<4>[ 9771.520000] Backtrace: 
<4>[ 9771.520000] [<bf068180>] (h4000_bluetooth_probe+0x0/0x54 [h4000_bt]) from [<c014afb0>] (platform_drv_probe+0x20/0x24)
<4>[ 9771.520000]  r4 = C02B9B00 
<4>[ 9771.520000] [<c014af90>] (platform_drv_probe+0x0/0x24) from [<c0149470>] (really_probe+0xd0/0x190)
<4>[ 9771.520000] [<c01493a0>] (really_probe+0x0/0x190) from [<c01495e8>] (driver_probe_device+0xb8/0xc8)
<4>[ 9771.520000]  r8 = 00000014  r7 = BF068A74  r6 = C02B9B00  r5 = BF068A74
<4>[ 9771.520000]  r4 = C385C880 
<4>[ 9771.520000] [<c0149530>] (driver_probe_device+0x0/0xc8) from [<c014974c>] (__driver_attach+0x84/0xe4)
<4>[ 9771.520000]  r6 = C01496C8  r5 = C02B9B00  r4 = C02B9BD8 
<4>[ 9771.520000] [<c01496c8>] (__driver_attach+0x0/0xe4) from [<c01488b8>] (bus_for_each_dev+0x48/0x80)
<4>[ 9771.520000]  r5 = C3501E5C  r4 = 00000000 
<4>[ 9771.520000] [<c0148870>] (bus_for_each_dev+0x0/0x80) from [<c01492bc>] (driver_attach+0x20/0x28)
<4>[ 9771.520000]  r7 = 00000000  r6 = C02C5A80  r5 = BF068A88  r4 = BF068A74
<4>[ 9771.520000] [<c014929c>] (driver_attach+0x0/0x28) from [<c0148c14>] (bus_add_driver+0x64/0x184)
<4>[ 9771.520000] [<c0148bb0>] (bus_add_driver+0x0/0x184) from [<c0149a58>] (driver_register+0x94/0x9c)
<4>[ 9771.520000]  r8 = 00000014  r7 = C2BBE1C4  r6 = BF068B40  r5 = C2BBE000
<4>[ 9771.520000]  r4 = BF068A74 
<4>[ 9771.520000] [<c01499c4>] (driver_register+0x0/0x9c) from [<c014b258>] (platform_driver_register+0x6c/0x88)
<4>[ 9771.520000]  r4 = C2BBE19C 
<4>[ 9771.520000] [<c014b1ec>] (platform_driver_register+0x0/0x88) from [<bf0a901c>] (h4000_bluetooth_init+0x1c/0x2c [h4000_bt])
<4>[ 9771.520000] [<bf0a9000>] (h4000_bluetooth_init+0x0/0x2c [h4000_bt]) from [<c005b018>] (sys_init_module+0x125c/0x135c)
<4>[ 9771.520000] [<c0059dbc>] (sys_init_module+0x0/0x135c) from [<c0020c40>] (ret_fast_syscall+0x0/0x2c)
<4>[ 9771.520000] Code: 32335f35 62666f5f 655f3436 7972636e (69007470) 


----- Original Message ----
From: Paul Sokolovsky <pmiscml at gmail.com>
To: daniel at steen-family.com
Cc: Angstrom distro devel <angstrom-distro-devel at linuxtogo.org>
Sent: Tuesday, September 11, 2007 6:32:48 AM
Subject: Kernel modules build/install issues, was: Re: [Angstrom-devel] Fwd: ipaq h4100 bluetooth and wifi issues

Hello Daniel,

Tuesday, September 4, 2007, 1:39:07 AM, you wrote:


[]

> On the bluetooth side of things I am still getting a "segmentation fault"
> when I try to load the h4000_bt.ko module.  Any ideas?  I have attached the
> output of dmesg to this email.  Here is my configuration:

  The attachment didn't get thru, but it is the same "module already
loaded" error you reported before, right? Well, I finally seem to
have understood where it comes from.

  When kernel config in OE changes, it could happen that some
driver goes from "modular" to "builtin" state. In other words, there
used to be a package for that module but now it's not needed. However,
the older package is still in deploy dir. If such a module is
RRECOMMENDed somewhere, it will go into image, and then have a chance
to be loaded. As all those symbols are already defined in kernel,
there's a small (yet harmless) kaboom.

  So, on each kernel recipe rebuild (and only then), one needs to
manually remove (or move to morgue dir to be more correct) all
previous kernel module packages:

rm tmp/deploy/glibc/ipk/h4000/kernel-module-*

  Again, this should happen only if kernel is to be rebuilt, not
unconditionally before any image rebuild.

> ipaq - h4100
> version - Linux version 2.6.21-hh12 (koen at bitbake) (gcc version 4.1.2) #1
> PREEMPT Tue Aug 28 02:58:07 CEST 2007

  And this means that this issue happens on official Angstrom build
server too, with noone to do cleanups manually, of course. Koen,
Richard, any ideas how to automate it? Do we speak about adding a
pre-package task which would fish in deploy dir? Would this be ok?
(But hardly any other choice of course.)

> Thanks,
> -Dan



-- 
Best regards,
 Paul                            mailto:pmiscml at gmail.com







More information about the Angstrom-distro-devel mailing list