uclinux下挂载u盘问题

在uclinux环境下挂载U盘时遇到错误提示"No such device or address"。通过检查系统启动信息和U盘插入后的响应,发现内核已有USB驱动但缺少SCSI磁盘支持。启用SCSI磁盘支持并重新编译内核后,U盘被正确识别,并成功挂载到sda1。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 在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,成功。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值