uclinux下挂载u盘问题

 在uclinux下挂载优盘时出现一下错误:

mount -t msdos /dev/sda1 /ramfs

mount: Mounting /dev/sda1 on /ramfs failed: No such device or address

 

分析:

1.系统启动信息

usbmon: debugfs is not available
MCF532x USB EHCI: is found. ID=0x5 Rev=0x41
ehci ehci.1: EHCI Host Controller
ehci ehci.1: new USB bus registered, assigned bus number 1
ehci ehci.1: irq 176, io mem 0xfc0b4000
ehci ehci.1: USB 0.0 started, EHCI 1.00, driver 10 Dec 2004
usb usb1: Product: EHCI Host Controller
usb usb1: Manufacturer: uClinux 2.6.17.7-uc1 ehci_hcd
usb usb1: SerialNumber: ehci.1
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
MCF532x USB EHCI: is found. ID=0x5 Rev=0x41
ehci ehci.0: EHCI Host Controller
ehci ehci.0: new USB bus registered, assigned bus number 2
ehci ehci.0: irq 175, io mem 0xfc0b0000
ehci ehci.0: USB 0.0 started, EHCI 1.00, driver 10 Dec 2004
usb usb2: Product: EHCI Host Controller
usb usb2: Manufacturer: uClinux 2.6.17.7-uc1 ehci_hcd
usb usb2: SerialNumber: ehci.0
usb usb2: configuration #1 chosen from 1 choice
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 1 port detected
ehci-mcf532x: can't find transceiver!
Initializing USB Mass Storage driver...
usbcore: registered new driver usb-storage
USB Mass Storage support registered.
usbcore: registered new driver usbhid
drivers/usb/input/hid-core.c: v2.6:USB HID core driver
udc: Freescale MCF532x UDC driver version 27 October 2006 init
udc: No external transceiver!
udc: MCF532x USB Device is found. ID=0x5 Rev=0x41

可见:内核中已经有usb驱动。

 

2.u盘插入后,输出如下信息

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: Product: Flash Disk
usb 1-1: Manufacturer: USB
usb 1-1: SerialNumber: 2F693C30B8360028
usb 1-1: configuration #1 chosen from 1 choice
scsi0 : SCSI emulation for USB Mass Storage devices
  Vendor: Aigo USB  Model: Storage Device    Rev: 2.00
  Type:   Direct-Access                      ANSI SCSI revision: 02

可见:驱动程序已经找到u盘,但是没有和设备描述符关联上。

 

3.参考文档:http://www.gentoo.org/doc/zh_cn/usb-guide.xml

发现:内核配置时,没有选上这个选项 <*>   SCSI disk support

 

4.选上SCSI disk support后,重新编译内核,再插入u盘,显示一下信息

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
scsi0 : SCSI emulation for USB Mass Storage devices
  Vendor: Aigo USB  Model: Storage Device    Rev: 2.00                 //u盘类型--爱国者
  Type:   Direct-Access                      ANSI SCSI revision: 02
ready
SCSI device sda: 512000 512-byte hdwr sectors (262 MB)            //u盘容量--262M
sda: Write Protect is off
sda: assuming drive cache: write through
SCSI device sda: 512000 512-byte hdwr sectors (262 MB)
sda: Write Protect is off
sda: assuming drive cache: write through
 sda: sda1                                                                                         //挂载点--sda1
sd 0:0:0:0: Attached scsi removable disk sda
可见:u盘备挂载在sda1上。

 

5.再次mount,成功。

展开阅读全文

没有更多推荐了,返回首页