5329EVB, new LTIB and mounting USB sticks?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

5329EVB, new LTIB and mounting USB sticks?

2,598 Views
jpa
Contributor IV
Can anyone give hints about getting USB mass storage devices working under the latest 5329EVB LTIB?

The best I can seem to get is a stream of "device descriptor read/64, error -71" messages before SCSI gives up and says "Device offlined - not ready after error recovery".

Device is fine under PC Linux, and worked (mostly) under a previous LTIB - but only by manually mounting the drive, and only after a long series of patches. 

Board and EVM are fairly old at this point, could that be a factor?

John
Labels (1)
0 Kudos
5 Replies

334 Views
mwaddel
Contributor I
With this release, the usb device changed from a scsi interface
(sdb) to "Low Performance USB Block driver" (uba). 

This should be fixed in the next rev of the device driver, but for this
bsp the instructions in the USB needs to be mounted with
the /dev/uba* interface and the scsi interface should be disabled.
The default kernel configuration in the
 ltib/config/platform/m532xevb/linux-2.6.22.config
has the setup defined this way.

The device driver documentation has the device interface
listed incorrectly, it says

mount -t msdos /dev/sda1 /mnt

it should read

mount -t msdos /dev/uba1 /mnt
0 Kudos

334 Views
jpa
Contributor IV
Thanks, but I'm still stuck. 

I disabled the SCSI interface and I no longer get the disconnect messages, but the mount fails with "no such file or directory".

Knowing that I had made extensive changes to the ltib and kernel configuration, I renamed the ltib directory and reinstalled ltib. 

* The first builds couldn't be loaded onto the EVB because they were too big.
* I disabled the microwindows, CAN4Linux, mp3play, and play packages and got the image size small enough to load.
* mount -t msdos /dev/uba1 /mnt still yields "no such device or address"

John
0 Kudos

334 Views
mwaddel
Contributor I
A couple of things to try:

Some of the USB devices are built as modules.  This
allows for host and gadget devices to be prebuilt.  So
for a thumb driver you need to insmod or modprobe the
host device:

# modprobe ehci-hcd

This should give you a bunch of USB host messages.

After that the following messages should be displayed
when you insert the drive:

usb 1-1: new full speed USB device using ehci and address 2
usb 1-1: not running at top speed; connect to a high speed hub
usb 1-1: configuration #1 chosen from 1 choice
 uba:

The last line tells you the device is uba not uba1. 

(There's a remote chance that it's not uba or uba1.  If that
happens you'll need to create the correct device in
<ltib>/bin/device_genromfs.txt.  Us the other entries in that
file as an example of the syntax.)

So the mount command would be:

mount -t msdos /dev/uba /mnt/rwfs

I just validated this again and was able to mount a thumb drive.

Hope this helps.

--Matt
0 Kudos

334 Views
jpa
Contributor IV
Okay, I've had some success...steps outlined below in case they help someone else...

Only problem now is that it only works once.  If I pull the thumb drive without umount and reinsert, it gets assigned to ubb1 without creating a new node in /dev and I haven't figured out the proper numbers to create a new node.  I've seen some threads on this over at uClinux, but if anyone has hints on AUTO mounting the USB stick, I'll gladly take them.  I don't think I can count on my users pressing an 'eject' button. 

USB stick functionality after clean LTIB install:
* disabled microwindows, mp3play and play packages to get image size down to flash-able size
(at this point, no response to USB stick and 'modprobe ehci-hcd' says "module not found"
* in kernel, made echi-hcd 'built-in'.  DO NOT ENABLE LIBUSUAL
(at this point, stick is recognized on power up, and I get the uba:uba1 message.)
( 'mkdir /var/disk' followed by 'mount -t msdos /dev/uba1 /var/disk' works, as does 'ls /var/disk')
 
Thanks, again, for all your help, Matt. 

John
0 Kudos

334 Views
jpa
Contributor IV
Matt,

Thanks for your help...modprobe ehci-hcd returns "modprobe: could not parse modules.dep" and indeed, I haven't located a modules.dep or modprobe.conf on the target yet. 

inserting the usb thumb drive returns everything you note EXCEPT the line about uba.  That is, "usb 1-1: configuration #1 chosen from 1 choice" is the last line. 

I've made substantial changes from the default configuration in my blind attempts to get this working, so I'll try (again) re-installing the LTIB and try your modprobe suggestion from a fresh install. 

I'll post again with my results once I'm there. 

{I had already tried mounting both uba and uba1 as well as creating new device nodes with higher numbers.}

John
0 Kudos