分类: LINUX
2008-04-09 18:46:57
Linux
【平台信息】
目标板(Nano2410)------------------------
CPU: S
SDRAM: HY57V561620(32MB)
FLASH: K
NET: CS8900
HOST---------------------------------------
Linux Realse Version: Fecora Cor 8 (FC8)
CrossCompiler: gcc-
问题的提出:
内核配置时使用smdk2410的默认配置. U盘不能挂载!
插拔U盘提示信息为:
$ usb 1-1: USB disconnect, address 2
usb 1-1: new full speed USB device using s
usb 1-1: configuration #1 chosen from 1 choice
查看partitions下的分区信息,没有出现USB设备
root@kevin /proc
$ cat partitions
major minor #blocks name
31 0 1024 mtdblock0
31 1 3072 mtdblock1
31 2 40960 mtdblock2
31 3 20480 mtdblock3
root@kevin /dev
$ ls u*
urandom usbdev1.1_ep00 usbdev1.2 usbdev1.2_ep01
usbdev1.1 usbdev1.1_ep81 usbdev1.2_ep00 usbdev1.2_ep82
解决方法:
重新配置内核, 启用SCSI device support, SCSI相关模块最好编译进内核,不要以module形式编译.
插上U盘后,显示:
usb 1-1: new full speed USB device using s
usb 1-1: configuration #1 chosen from 1 choice
scsi1 : SCSI emulation for USB Mass Storage devices
scsi 1:0:0:0: Direct-Access USB Flash Disk 1.06 PQ: 0 ANSI: 0 CCS
sd 1:0:0:0: [sda] 129312 512-byte hardware sectors (66 MB)
sd 1:0:0:0: [sda] Write Protect is off
sd 1:0:0:0: [sda] Assuming drive cache: write through
sd 1:0:0:0: [sda] 129312 512-byte hardware sectors (66 MB)
sd 1:0:0:0: [sda] Write Protect is off
sd 1:0:0:0: [sda] Assuming drive cache: write through
sda: sda1
sda: p1 exceeds device capacity
sd 1:0:0:0: [sda] Attached SCSI removable disk
用dmesg查看信息:
dmesg
sd 0:0:0:0: [sda] 129312 512-byte hardware sectors (66 MB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Mode Sense: 00 06 00 00
sd 0:0:0:0: [sda] Assuming drive cache: write through
sd 0:0:0:0: [sda] 129312 512-byte hardware sectors (66 MB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Mode Sense: 00 06 00 00
sd 0:0:0:0: [sda] Assuming drive cache: write through
sda: sda1
sda: p1 exceeds device capacity
sd 0:0:0:0: [sda] Attached SCSI removable disk
selected clock c03200b4 (pclk) quot 27, calc 113169
root@kevin /
$ cat proc/partitions
major minor #blocks name
31 0 1024 mtdblock0
31 1 3072 mtdblock1
31 2 40960 mtdblock2
31 3 20480 mtdblock3
8 0 64656 sda
8 1 64656 sda1
u盘设备名为sda1.
$ mount -t vfat sda1 /mnt
Unable to load NLS charset cp437
FAT: codepage cp437 not found
mount: mounting sda1 on /mnt failed: Invalid argument
内核缺少cp437字符集. 重新配置内核, 在filesystems-->native language support-> 中选择Codepage 437和其他的一些常用的字符集.
重新mount
root@kevin /
$ mount -t vfat /dev/sda1 /mnt/usb
查看usb目录下被挂载的文件.
root@kevin /
$ ls /mnt/usb
070723_LE
070726_2101_LE
080128_1313_UCOS_44B0 iic pic
080128_1313_UCOS_44B0.rar ldlinux.sys
???????!??.txt le
DVPC3_T002_070621-2.pcb msvcr71.dll
DVPC3_TC002_070606_LAYOUT.DSN pcb footprint.xls
DVPC3_TC003_070609.DSN pcb_lib
DVPC3_TC003_070609_0.DBK rootfs.gz
DVPC3_TC03 GERBER.pcb sr81.exe
GPIO alloc syslinux.cfg
MEDIAPLAYER.DSN test
av test.c
bzImage test.txt
ch375
OK, U盘挂载成功了~~~
hrz20082008-05-15 20:17:29
师兄你好: 我在2.6.24下开发sd卡驱动,老板要求支持4G! 现在驱动编译出现如下错误是怎么回事? 谢谢! [root@192 /]# insmod s3cmci.ko Using s3cmci.ko s3c2410-sdi s3c2410-sdi: powered down. s3c2410-sdi s3c2410-sdi: initialisation done. [root@192 /]# s3c2410-sdi s3c2410-sdi: running at 0kHz (requested: 0kHz). s3c2410-sdi s3c2410-sdi: running at 98kHz (requested: 97kHz). s3c2410-sdi s3c2410-sdi: running at 98kHz (requested: 97kHz). s3c2410-sdi s3c2410-sdi: running at 98kHz (requested: 97kHz). s3c2410-sdi s3c2410-sdi: CMD[FAIL(-110)