[U-Boot-Users] usb storage return value is always true
Aras Vaichas
arasv at magtech.com.au
Wed Mar 19 02:56:59 CET 2008
I'm using U-Boot 1.3.2 with AT91RM9200 custom board (based on DK)
At boot time I want to detect that a USB storage device has been
inserted, and then I want to attempt to load an image off it and upgrade
my system.
If I run "usb storage" it always returns 0 - even if there is no USB
storage device inserted. If I run fatload on a non-existent device, it
has a very long timeout period.
e.g.
U-Boot> usb start
(Re)start USB...
USB: scanning bus for devices... 1 USB Device(s) found
scanning bus for storage devices... 0 Storage Device(s) found
U-Boot> usb storage; echo $?
No storage devices, perhaps not 'usb start'ed..?
0
U-Boot> usb start
(Re)start USB...
USB: scanning bus for devices... 2 USB Device(s) found
scanning bus for storage devices... 1 Storage Device(s) found
U-Boot> usb storage; echo $?
Device 0: Vendor: Prod.: Rev: PMAP
Type: Removable Hard Disk
Capacity: 245.5 MB = 0.2 GB (502784 x 512)
0
Is there a way to detect if a USB storage device has been inserted?
Aras
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
More information about the U-Boot
mailing list