From: Sergei Trofimovich <slyfox@inbox.ru>
To: u-boot@lists.denx.de
Subject: [U-Boot] 'usb start' works very unstable
Date: Sat, 7 Aug 2010 10:18:48 +0300 [thread overview]
Message-ID: <20100807101848.636cb978@mosly> (raw)
I have 250GB USB-HDD attached to sheevaplug and using u-boot
U-Boot 2010.03-00176-g42f7128 (Aug 06 2010 - 22:24:34)
Marvell-Sheevaplug
It's a tip of 'u-boot-marvell/testing' branch.
I'm currently booting linux kernel from NAND
and using ext4 rootfs placed on this USB HDD.
Everything works mostly fine here (in-NAND
kernel and usb survive multiple reboots).
The problem is faulty usb detection in u-boot prompt.
After some reboots (one reboot is usually enough)
u-boot can't find attached USB storages:
# reboot linux kernel and stop at u-boot prompt
Marvell>> usb start
(Re)start USB...
USB: Register 10011 NbrPorts 1
USB EHCI 1.00
scanning bus for devices... 2 USB Device(s) found
scanning bus for storage devices... error in inquiry
0 Storage Device(s) found
Marvell>> usb start
(Re)start USB...
USB: Register 10011 NbrPorts 1
USB EHCI 1.00
scanning bus for devices... 2 USB Device(s) found
scanning bus for storage devices... 0 Storage Device(s) found
#ok, usb is dead? let's see if linux kernel will find it
Marvell>> nand read 0x01000000 0x00100000 0x00400000
NAND read: device 0 offset 0x100000, size 0x400000
4194304 bytes read: OK
Marvell>> setenv boot
bootdelay bootargs bootcmd
Marvell>> setenv bootargs console=ttyS0,115200 root=/dev/sda3 rw rootwait #points to usb hdd!
Marvell>> bootm 0x01000000
## Booting kernel from Legacy Image at 01000000 ...
Image Name: Linux-2.6.35
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2192340 Bytes = 2.1 MB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... OK
Loading Kernel Image ... OK
OK
Starting kernel ...
<skip>
[ 22.867424] Waiting for root device /dev/sda3...
[ 23.015860] scsi0 : usb-storage 1-1:1.0
[ 26.054268] scsi 0:0:0:0: Direct-Access StoreJet Transcend PQ: 0 ANSI: 2 CCS
[ 28.774083] sd 0:0:0:0: [sda] 488397168 512-byte logical blocks: (250 GB/232 GiB)
[ 28.782324] sd 0:0:0:0: [sda] Write Protect is off
[ 28.787167] sd 0:0:0:0: [sda] Assuming drive cache: write through
[ 28.794693] sd 0:0:0:0: [sda] Assuming drive cache: write through
[ 28.800822] sda: sda1 sda2 sda3 sda4
[ 28.909571] sd 0:0:0:0: [sda] Assuming drive cache: write through
[ 28.915736] sd 0:0:0:0: [sda] Attached SCSI disk
[ 28.944594] EXT3-fs (sda3): error: couldn't mount because of unsupported optional features (240)
[ 28.953954] EXT2-fs (sda3): error: couldn't mount because of unsupported optional features (240)
[ 28.992562] EXT4-fs (sda3): mounted filesystem with ordered data mode. Opts: (null)
[ 29.000323] VFS: Mounted root (ext4 filesystem) on device 8:3.
[ 29.006227] Freeing init memory: 112K
INIT: version 2.87 booting
And it finds it! *phew*
It usually takes ~4 seconds to wait for root.
When I power off/power on sheevaplug I am able
to load something directly from USB:
Marvell>> usb start
(Re)start USB...
USB: Register 10011 NbrPorts 1
USB EHCI 1.00
scanning bus for devices... 2 USB Device(s) found
scanning bus for storage devices... 1 Storage Device(s) found
Marvell>> usb storage
Device 0: Vendor: StoreJet Rev: Prod: Transcend
Type: Hard Disk
Capacity: 28759.9 MB = 28.0 GB (488397168 x 512)
Heh, capacity is reported incorrectly, but it works am I'm able
to load kernel from there.
Marvell>> ext2ls usb 0:2 /
<DIR> 1024 .
<DIR> 1024 ..
<DIR> 12288 lost+found
<SYM> 1 boot
0 .keep
4466528 vmlinuz-2.6.35
904705 System.map-2.6.35
49205 config-2.6.35
4466528 vmlinuz-2.6.35.old
904705 System.map-2.6.35.old
49205 config-2.6.35.old
2192404 uImage-2.6.35
331132 u-boot.kwb-20100806
Marvell>> ext2load usb 0:2 0x01000000 /uImage-2.6.35
Loading file "/uImage-2.6.35" from usb device 0:2 (usbda2)
2192404 bytes read
Marvell>> bootm 0x01000000
## Booting kernel from Legacy Image at 01000000 ...
Image Name: Linux-2.6.35
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2192340 Bytes = 2.1 MB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... OK
Loading Kernel Image ... OK
OK
Starting kernel ...
and up to the shell#
If I reboot u-boot can't find usb storages (but the in-NAND kernel will boot):
[ 249.433555] Restarting system.
U-Boot 2010.03-00176-g42f7128 (Aug 06 2010 - 22:24:34)
Marvell-Sheevaplug
...
Hit any key to stop autoboot: 0
Marvell>> usb start
(Re)start USB...
USB: Register 10011 NbrPorts 1
USB EHCI 1.00
scanning bus for devices... 2 USB Device(s) found
scanning bus for storage devices... error in inquiry
0 Storage Device(s) found
All these things are almost 100% reproducible.
Vendor-shipped (Marvell's) u-boot has exactly the same disease:
** MARVELL BOARD: SHEEVA PLUG LE
U-Boot 1.1.4 (Mar 19 2009 - 16:06:59) Marvell version: 3.4.16
--
Sergei
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
Url : http://lists.denx.de/pipermail/u-boot/attachments/20100807/3ef746d5/attachment.pgp
next reply other threads:[~2010-08-07 7:18 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-07 7:18 Sergei Trofimovich [this message]
2010-08-07 11:22 ` [U-Boot] 'usb start' works very unstable Wolfgang Denk
2010-08-07 13:39 ` Sergei Trofimovich
2010-08-07 15:47 ` Wolfgang Denk
2010-08-07 19:35 ` Prafulla Wadaskar
2010-08-07 20:57 ` Sergei Trofimovich
2010-08-08 9:05 ` [U-Boot] [PATCH] disk/part.c: 'usb storage' avoiding overflow when output capacity Sergei Trofimovich
2010-08-08 10:01 ` Sergei Shtylyov
2010-08-08 12:05 ` Sergei Trofimovich
2010-08-09 5:38 ` Prafulla Wadaskar
2010-08-09 18:19 ` Sergei Trofimovich
2010-08-10 21:10 ` Wolfgang Denk
2010-08-07 19:47 ` [U-Boot] 'usb start' works very unstable Prafulla Wadaskar
2010-08-07 22:27 ` Wolfgang Denk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100807101848.636cb978@mosly \
--to=slyfox@inbox.ru \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.