[Kernel Panic] in case of building adb composite gadget dynamically

170 views
Skip to first unread message

atom10jj

unread,
Mar 20, 2009, 5:20:58 AM3/20/09
to android-porting
Hi~ there,

I've been trying to build "g_android"(ADB Composite Gadget)
dynamically.

In case of building statically, ADB and Mass-storage are working well.

But dynamical building doesn't work, I have no idea how to solve this
problem.

My init.rc add g_android.ko using "insmod /lib/modules/g_android.ko".

When I connect the usb cable into a Windows PC,
the target device meets Kernel Panic as the bottom of this e-mail.

My CPU is S3C6410, it runs under linux kernel 2.6.27

Can any one give some help?

Hoping that each day will you feel better

Thanks in advance.

Best Regards,


//Message of Kernel panic
Unable to handle kernel paging request at virtual address e1a02001
pgd = c84c4000
[e1a02001] *pgd=00000000
Internal error: Oops: 1 [#1]
Modules linked in: compass acc_sensor s3c_camera s3c_cmm s3c_g3d
s3c_jpeg s3c_pp
s3c_g2d_driver s3c_mfc s3c_rotator vibrator multipdp yaffs2 dpram
g_android
CPU: 0 Not tainted (2.6.27 #30)
PC is at composite_setup+0x120/0xa80 [g_android]
LR is at 0x3
pc : [<bf003a8c>] lr : [<00000003>] psr: 60000193
sp : c801dd30 ip : e1a02001 fp : c801dd7c
r10: 00080000 r9 : 40000113 r8 : 00000000
r7 : c05c4ccc r6 : c8565fa0 r5 : 00000000 r4 : 00000100
r3 : e1a01fe1 r2 : e1a01fe1 r1 : c8565fc4 r0 : 00000000
Flags: nZCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment user
Control: 00c5387f Table: 584c4008 DAC: 00000015
Process init (pid: 1, stack limit = 0xc801c260)
Stack: (0xc801dd30 to 0xc801e000)
dd20: c801dd4c c05c4ccc f7900000
c052e4c0
dd40: c8565f20 00000040 40000113 00080000 c801dd6c c05c4ccc f7900000
00028000
dd60: c052e4c0 00000000 40000113 00080000 c801ddcc c801dd80 c0357870
bf003978
dd80: a00c3800 00010000 00010001 c0536ea0 c801ddd0 00000002 000000d2
000000d2
dda0: c053765c c84d33e0 00000000 00000000 0000005a c902f2ab c801c000
00020a04
ddc0: c801ddec c801ddd0 c0208e50 c0357080 c052079c 0000005a 00000000
c04ca2dc
dde0: c801de04 c801ddf0 c020a228 c0208e20 c052079c 0000005a c801de24
c801de08
de00: c01cb048 c020a1a0 c85cf720 ffffffff f4000000 00000005 c801de84
c801de28
de20: c01cb8d4 c01cb00c 00000000 c04ca2dc 00000008 00000000 c902f2f8
c902f45c
de40: 00000015 c04ca2dc c902f2ab c801c000 00020a04 c801de84 00000062
c801de74
de60: c020492c c02d8fbc 20000013 ffffffff c02054a8 00000007 c801deac
c801de88
de80: c020492c c02d8fb0 c801deac 000021c4 00000028 c902f0c0 00000014
c902f36c
dea0: c801df7c c801deb0 c02056d0 c02048f4 00000000 00000000 00000000
c8014c40
dec0: c902f54c c801dec4 c902e000 c902f2ab 000021c4 c902fa34 00000013
22222222
dee0: 22222222 00000007 000021c4 00000000 00000000 c7c09cd8 c801df24
c801df08
df00: c0246e6c c02d43d4 00000007 c0201184 c801df2c c801df2c c801df6c
c801df28
df20: c0461b88 c0201138 00000000 c902f36c 22222222 22222222 22222222
22222222
df40: c01cbe08 000021c4 00020a04 0002f980 00000080 000021c4 00020a04
0002f980
df60: 00000000 c01cbe08 c801c000 00000000 c801dfa4 c801df80 c0206aa8
c0205480
df80: c022e09c c022df88 00026010 000080b4 bed98f14 00000080 00000000
c801dfa8
dfa0: c01cbc60 c0206a60 00026010 000080b4 0002f980 000021c4 00020a04
000021c4
dfc0: 00026010 000080b4 bed98f14 00000080 00000000 00000000 00000000
bed98c3c
dfe0: bed98c18 bed98c10 000081f8 00010f8c 20000010 0002f980 ffffffdf
ffffffff
Backtrace:
[<bf00396c>] (composite_setup+0x0/0xa80 [g_android]) from [<c0357870>]
(s3c_udc_
irq+0x7fc/0xf08)
[<c0357074>] (s3c_udc_irq+0x0/0xf08) from [<c0208e50>]
(handle_IRQ_event+0x3c/0x
74)
[<c0208e14>] (handle_IRQ_event+0x0/0x74) from [<c020a228>]
(handle_level_irq+0x9
4/0xec)
r7:c04ca2dc r6:00000000 r5:0000005a r4:c052079c
[<c020a194>] (handle_level_irq+0x0/0xec) from [<c01cb048>]
(__exception_text_sta
rt+0x48/0x64)
r5:0000005a r4:c052079c
[<c01cb000>] (__exception_text_start+0x0/0x64) from [<c01cb8d4>]
(__irq_svc+0x34
/0x80)
Exception stack(0xc801de28 to 0xc801de70)
de20: 00000000 c04ca2dc 00000008 00000000 c902f2f8
c902f45c
de40: 00000015 c04ca2dc c902f2ab c801c000 00020a04 c801de84 00000062
c801de74
de60: c020492c c02d8fbc 20000013
ffffffff
r6:00000005 r5:f4000000 r4:ffffffff
[<c02d8fa4>] (strcmp+0x0/0x40) from [<c020492c>] (find_sec+0x44/0x68)
r4:00000007
[<c02048e8>] (find_sec+0x0/0x68) from [<c02056d0>] (load_module+0x25c/
0x14ec)
r8:c902f36c r7:00000014 r6:c902f0c0 r5:00000028 r4:000021c4
[<c0205474>] (load_module+0x0/0x14ec) from [<c0206aa8>]
(sys_init_module+0x54/0x
188)
[<c0206a54>] (sys_init_module+0x0/0x188) from [<c01cbc60>]
(ret_fast_syscall+0x0
/0x2c)
r7:00000080 r6:bed98f14 r5:000080b4 r4:00026010
Code: e3120002 12800001 e24c2020 e1a03002 (e5b3c020)
Kernel panic - not syncing: Fatal exception in interrupt

Mike Lockwood

unread,
Mar 20, 2009, 8:10:47 AM3/20/09
to android...@googlegroups.com
Hi atom10jj,

I also ran into this problem while attempting to run the android
gadget driver as a module in the x86 kernel. Unfortunately I haven't
had time to track it down, but plan on getting back to this after
cupcake is done. In the mean time I would suggest linking the driver
directly in the kernel (unless you want to help me debug it :-)

Mike
--
Mike Lockwood
Google android team

atom10jj

unread,
Mar 23, 2009, 3:08:59 AM3/23/09
to android-porting
Thank you for your early reply.

I'm gonna wait for it.

BR,



On 3월20일, 오후9시10분, Mike Lockwood <lockw...@android.com> wrote:
> Hi atom10jj,
>
> I also ran into this problem while attempting to run the android
> gadget driver as a module in the x86 kernel. Unfortunately I haven't
> had time to track it down, but plan on getting back to this after
> cupcake is done. In the mean time I would suggest linking the driver
> directly in the kernel (unless you want to help me debug it :-)
>
> Mike
>
>
>
> On Fri, Mar 20, 2009 at 5:20 AM, atom10jj <atom1...@gmail.com> wrote:
>
> > Hi~ there,
>
> > I've been trying to build "g_android"(ADBComposite Gadget)
> > dynamically.
>
> > In case of building statically,ADBand Mass-storage are working well.

海风

unread,
Apr 29, 2009, 11:05:10 AM4/29/09
to android-porting
Hi all,

I meet a question when I compiled the android composite usb driver
statically in linux2.6.28.
I found the ADB function work well, but USB Mass Storage don't work, I
had modified the VIP/PID with
0x18d1/0xdeed which meaning ADB sooner compiste driver. And I found a
new item appear in windows devices management, it is ADB Interface/
Composite sooner ADB interface , under generic serial controller, two
new items appear, one is Composite driver device, it is okay, but
another is USB mass storage is fail, errno code is 10.

Could any one can give me hint!

My cpu is pxa3xx, it run under linux2.6.28.

Sea


On Mar 23, 3:08 pm, atom10jj <atom1...@gmail.com> wrote:
> Thank you for your early reply.
>
> I'm gonna wait for it.
>
> BR,
>
> On 3월20일, 오후9시10분, Mike Lockwood <lockw...@android.com> wrote:
>
>
>
> > Hi atom10jj,
>
> > I also ran into this problem while attempting to run theandroid
> > gadgetdriveras a module in the x86 kernel. Unfortunately I haven't
> > had time to track it down, but plan on getting back to this after
> > cupcake is done. In the mean time I would suggest linking thedriver
> > directly in the kernel (unless you want to help me debug it :-)
>
> > Mike
>
> > On Fri, Mar 20, 2009 at 5:20 AM, atom10jj <atom1...@gmail.com> wrote:
>
> > > Hi~ there,
>
> > > I've been trying to build "g_android"(ADBComposite Gadget)
> > > dynamically.
>
> > > In case of building statically,ADBand Mass-storage are working well.
>
> > > But dynamical building doesn't work, I have no idea how to solve this
> > > problem.
>
> > > My init.rc add g_android.ko using "insmod /lib/modules/g_android.ko".
>
> > > When I connect theusbcable into a Windows PC,
> > Googleandroidteam- Hide quoted text -
>
> - Show quoted text -

RR

unread,
Jul 18, 2009, 12:10:13 PM7/18/09
to Mike Lockwood, android...@googlegroups.com
Hi

I would like to know whether you recommend implementing an
USB gadget driver or an USB function driver for ADB support
on a new device?

Also drivers/usb/gadget/android.c and f_adb.c looks buggy.
Do you have a plan to fix them? Just want to decide whether it
is worth debugging them.

RR

On 3月20日, 午後9:10, Mike Lockwood <lockw...@android.com> wrote:
> Hi atom10jj,
>
> I also ran into this problem while attempting to run the android
> gadget driver as a module in the x86 kernel. Unfortunately I haven't
> had time to track it down, but plan on getting back to this after
> cupcake is done. In the mean time I would suggest linking the driver
> directly in the kernel (unless you want to help me debug it :-)
>
> Mike
>
>
>
>
>
> On Fri, Mar 20, 2009 at 5:20 AM, atom10jj <atom1...@gmail.com> wrote:
>
> > Hi~ there,
>

> > I've been trying to build "g_android"(ADBComposite Gadget)
> > dynamically.
>
> > In case of building statically,ADBand Mass-storage are working well.

> Google android team- 引用テキストを表示しない -
>
> - 引用テキストを表示 -

Mike Lockwood

unread,
Jan 21, 2010, 1:51:24 PM1/21/10
to RR, android...@googlegroups.com
Hi all,

I have finally gotten back to working on USB gadget and finally have
some news about this. As part of our switch from 2.6.29 to 2.6.32, we
will be abandoning the /drivers/usb/function/ drivers and switching to
using gadget for all platforms. This is still a work in progress, but
we now have USB gadget working on HTC Magic (sapphire) and Nexus One
in our experimental 2.6.32 kernel tree. Note that we do not have this
working in 2.6.29, but the changes to the gadget code between 29 and
32 were minimal so it should be easy to backport.

http://android.git.kernel.org/?p=kernel/experimental.git;a=shortlog;h=refs/heads/android-msm-2.6.32-test1

Since the older code in 2.6.27 and 29, we have reworked the
interaction between the driver and the board files to make it more
flexible to specify your USB interface (similar to how it works in the
function drivers). Since all the configuration is driven by the board
files, we do not support building the driver as a module at present.
At some point in the future we would like to have the USB
configuration controlled by userspace - at that point it would be much
easier to build the driver as a module.

In addition to what is on the branch mentioned above, we are working
on getting the USB gadget ACM serial and RNDIS ethernet functions
working with the android gadget driver. Beyond this I am hoping to
work with the Linux USB community to integrate this better with the
gadget/composite framework, but for now the android gadget support is
fairly self contained as a separate composite gadget driver.

Mike

2009/7/18 RR <roundr...@yahoo.co.jp>:

Reply all
Reply to author
Forward
0 new messages