BeagleBoard XM USB Kernel Panic -- SOLVED

Hi,

I solved this issue while writing up the email. It wasn’t immediately found in a search on the web, even with many results coming from this newsgroup. I thought I would post anyway in case it helps someone else someday.

“”"
I’m getting a USB kernel panic plus several suspicious messages on the console of my recently purchased, fresh out of the box BeagleBoard XM.

I’ve tried about 6 different 5V power supplies from 1.0A to 6.5A, but all demonstrate the same error.

I’ve posted the output to pastebin: http://pastebin.com/BXxqEkNf
but here are the highlights:

I can get all the way to the login prompt on the serial port, but I get a kernel panic as soon as the USB cable is plugged from the BB XM board to my computer USB host port.

Unable to handle kernel NULL pointer dereference at virtual address 00000014
“”"

WORKAROUND: Using a serial connection, log in after the boot, but before plugging in the USB, and do a “modprobe g_ether”. (Requires a 5V supply). I don’t know why it isn’t already configured to load this, especially when the BB “Getting Started” page only offers USB as the means of communicating with the board.

Without going into a rant of how difficult it is to figure out the undocumented method of autoloading the module, I discovered the “/etc/default/usb-gadget” file must have its “USB_MODE” set to “networking”.

While on the subject of usb-gadget, you can get the whole story by inspecting the “/usr/bin/usb-gadget” file and comparing the list of possible USB_MODE settings with the modules under “/lib/modules/uname -r/kernel/drivers/usb/gadget”. In my case, “USB_MODE” can be storage, serial, and gadgetfs.

BTW, anyone know how to get g_ether to load via the kernel command line arguments? I tried modifying uEnv.txt without success (i.e. modifying optargs="" with different settings such as g_ether and usb-gadget=networking, etc.)

Mike

Not sure exactly about loading via uEnv.txt, but maybe writing an early init script would work ? Here are a couple of lines from my uEnv.txt file though . . .

netargs=setenv bootargs console=${console} ${optargs} root=/dev/nfs nfsroot=${serverip}:${rootpath},vers=3 rw ip=${static_ip}
uenvcmd=setenv autoload no; run loadtftp; run netargs; bootm 0x80200000 - 0x815f0000

so perhaps something like . . .

netargs=setenv bootargs console=${console} ${optargs} modprobe …

But im not sure. Of course thats jus tan example based on my current uEnv.txt. file, not like you would have to or even want to use nfs boot arguments.

Do note that I am using a 3.8 kernel, and the Beagelbone black, but many uEnv options do seem to be at least similar.