Nexus S bluetooth not working with kernel built from git with herring_defconfig

213 views
Skip to first unread message

morfic

unread,
Jan 5, 2011, 10:29:30 AM1/5/11
to Android Building
Hi,

when i build a Nexus S kernel from git://android.git.kernel.org/kernel/samsung.git
I end up with a kernel that works with exception from bluetooth not
enabling.

I am building the unmodified source with the .config from make
ARCH=arm herring_defconfig
I make sure to boot the kernel with the modules from the build moved
to /system/modules/ before booting the kernel.
I have created a boot.img with mkbootimg from this kernel and several
ramdisks from kernels that all have working bluetooth.
However, the bluetooth does not work with the unmodified source and
the defconfig for this device.
I am building as shown below:

#!/bin/bash
CCTC="../aosp/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-
eabi-"
make ARCH=arm clean
make -j8 ARCH=arm CROSS_COMPILE=$CCTC prepare
make -j8 ARCH=arm CROSS_COMPILE=$CCTC modules
find -name *.ko -exec cp -v {} ../kernelupdatezip/system/modules/ \;
chmod 711 ../kernelupdatezip/system/modules/*
make -j8 ARCH=arm CROSS_COMPILE=$CCTC
~/bin/mkbootimg --kernel arch/arm/boot/zImage --base 0x30000000 --
pagesize 0x1000 --ramdisk ../dumpedstuff/boot.img-ramdisk.gz -o
boot.img
cp boot.img ../kernelupdatezip/
ls -alh arch/arm/boot/zImage
ls -alh boot.img


the reason to make prepare, make modules, "cp modules", then "make the
kernel" is that this way i can make sure a Vibrant kernel gets the
right modules included in the initrd, on nexus S i am instead copying
them into the ".zip skeleton", the resulting zImage would be the same.

i then either push the modules to /system/modules and fastboot boot ./
boot.img to test the kernel or zip up the the skeleton wtih 'zip -r ../
kernel.zip *' from inside the skeleton and flash this from recovery
(clockwork3.0.0.0)


phone boots up, everything comes up, but when i try to enable
bluetooth it tries for a while and then stops.

After 1st attempt:
<6>[ 363.534388] wake enabled for irq 165
<6>[ 363.542985] SysRq : HELP : loglevel(0-9) reBoot Crash terminate-
all-tasks(E) memory-full-oom-kill(F) kill-all-tasks(I) thaw-
filesystems(J) show-memory-usage(M) nice-all-RT-tasks(N) powerOff show-
registers(P) show-all-timers(Q) Sync show-task-states(T) Unmount show-
blocked-tasks(W)

The second time i try i find this in dmesg:

<6>[ 436.046871] request_suspend_state: sleep (0->3) at 435856360127
(2011-01-05 14:51:32.441910792 UTC)
<7>[ 436.260988] save exit: isCheckpointed 0
<7>[ 436.261378] save exit: isCheckpointed 0
<6>[ 441.186170] request_suspend_state: wakeup (3->0) at 440995652707
(2011-01-05 14:51:37.581203497 UTC)
<6>[ 441.186766] s3cfb_late_resume is called
<6>[ 441.187143] FIMD src sclk = 166750000
<6>[ 441.233605] s3cfb_late_resume is complete
<4>[ 444.475729] ------------[ cut here ]------------
<4>[ 444.475950] WARNING: at kernel/irq/manage.c:290 __enable_irq
+0x4c/0x84()
<4>[ 444.476084] Unbalanced enable for IRQ 165
<4>[ 444.476266] Modules linked in:
<4>[ 444.476449] Backtrace:
<4>[ 444.476644] [<c0030fbc>] (dump_backtrace+0x0/0x110) from
[<c03caae0>] (dump_stack+0x18/0x1c)
<4>[ 444.476863] r7:00000009 r6:00000122 r5:c008bcd0 r4:e5277e40
<4>[ 444.477446] [<c03caac8>] (dump_stack+0x0/0x1c) from [<c0053ba4>]
(warn_slowpath_common+0x54/0x6c)
<4>[ 444.478554] [<c0053b50>] (warn_slowpath_common+0x0/0x6c) from
[<c0053c60>] (warn_slowpath_fmt+0x38/0x40)
<4>[ 444.479724] r9:c03ef5b0 r8:c4d65a38 r7:60000013 r6:c056e284
r5:000000a5
<4>[ 444.480465] r4:c056e248
<4>[ 444.480920] [<c0053c28>] (warn_slowpath_fmt+0x0/0x40) from
[<c008bcd0>] (__enable_irq+0x4c/0x84)
<4>[ 444.481879] r3:000000a5 r2:c04e451a
<4>[ 444.482412] [<c008bc84>] (__enable_irq+0x0/0x84) from
[<c008c228>] (enable_irq+0x54/0x7c)
<4>[ 444.483336] r5:000000a5 r4:c056e248
<4>[ 444.483846] [<c008c1d4>] (enable_irq+0x0/0x7c) from [<c003d36c>]
(bluetooth_set_power+0xd0/0x190)
<4>[ 444.484949] r7:e6d40b80 r6:e79be000 r5:00000000 r4:00000001
<4>[ 444.485644] [<c003d29c>] (bluetooth_set_power+0x0/0x190) from
[<c003d440>] (bt_rfkill_set_block+0x14/0x18)
<4>[ 444.486848] r5:00000000 r4:c4d65a00
<4>[ 444.487284] [<c003d42c>] (bt_rfkill_set_block+0x0/0x18) from
[<c03c3210>] (rfkill_set_block+0x94/0xe0)
<4>[ 444.488451] [<c03c317c>] (rfkill_set_block+0x0/0xe0) from
[<c03c39fc>] (rfkill_state_store+0x74/0x8c)
<4>[ 444.489589] r5:00000001 r4:c4d65a30
<4>[ 444.490031] [<c03c3988>] (rfkill_state_store+0x0/0x8c) from
[<c01e9734>] (dev_attr_store+0x24/0x28)
<4>[ 444.491154] r6:00000001 r5:e5277f70 r4:c4dc5360
<4>[ 444.491723] [<c01e9710>] (dev_attr_store+0x0/0x28) from
[<c0101750>] (sysfs_write_file+0x110/0x144)
<4>[ 444.492859] [<c0101640>] (sysfs_write_file+0x0/0x144) from
[<c00b769c>] (vfs_write+0xb8/0x164)
<4>[ 444.493927] [<c00b75e4>] (vfs_write+0x0/0x164) from [<c00b780c>]
(sys_write+0x44/0x70)
<4>[ 444.494901] r8:00000001 r7:00000000 r6:00000000 r5:4945fb47
r4:e492e180
<4>[ 444.495735] [<c00b77c8>] (sys_write+0x0/0x70) from [<c002cfc0>]
(ret_fast_syscall+0x0/0x30)
<4>[ 444.496770] r8:c002d168 r7:00000004 r6:4945fc10 r5:82302150
r4:00000081
<4>[ 444.497616] ---[ end trace 3513c28bb2bed3b1 ]---

http://www.zerorealm.org/bt-bugreport for a full 'adb bugreport'

let me know if you need anything else.

I hope it's something i missed....easiest to fix problems.

Thanks in advance for your time,

Daniel

Jean-Baptiste Queru

unread,
Jan 5, 2011, 5:59:18 PM1/5/11
to android-...@googlegroups.com
I got a bit of feedback from our experts:

There are 2 parts: rfkill driver and loading the firmware. There are
paths in init.<product>.rc which need to match.

Try to do the following:

Test stub to check: bttest needs to be built.
$adb shell bttest enable

If that doesn't work
$ echo 1 to /sys/class/rfkill/rfkill0/state
$ /system/bin/brcm_patchram_plus --enable_hci --patchram
/vendor/firmware/bcm4329.hcd /dev/<device specific>
s3c2410_serial0 is for Nexus-S

Need to check the path of the firmware file on Vibrant.
That assumes Vibrant is using BCM 4329.

JBQ

> --
> You received this message because you are subscribed to the "Android Building" mailing list.
> To post to this group, send email to android-...@googlegroups.com
> To unsubscribe from this group, send email to
> android-buildi...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>

--
Jean-Baptiste M. "JBQ" Queru
Software Engineer, Android Open-Source Project, Google.

Questions sent directly to me that have no reason for being private
will likely get ignored or forwarded to a public forum with no further
warning.

morfic

unread,
Jan 5, 2011, 9:13:34 PM1/5/11
to Android Building
I saw a cmdline set in. .config so seeing an example without --cmdline
on mkbootimg did nit seem very suspect.

I now know omitting it, breaks Bluetooth, using it, does not.

Yes, this sounds odd. Comparing kernels, the only difference I found
today was the lack of a cmdline.

I now have a perfect Nexus S kernel.

Still. Why does only Bluetooth break?

I added --cmdline 'no_console_suspend=1 console=bull's

How does this relate to Bluetooth??

Thanks,

Daniel
> >http://www.zerorealm.org/bt-bugreportfor a full 'adb bugreport'
Reply all
Reply to author
Forward
0 new messages