Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1223108
  • 博文数量: 322
  • 博客积分: 10010
  • 博客等级: 上将
  • 技术积分: 3276
  • 用 户 组: 普通用户
  • 注册时间: 2009-12-17 09:21
文章分类

全部博文(322)

文章存档

2010年(155)

2009年(167)

我的朋友

分类: 嵌入式

2010-01-10 17:35:37

Linux 2.6.24.4移植到S3C2410(nano2410)之:USB

 

 

 

【平台信息】

目标板(Nano2410)------------------------

CPU:        S3C2410X

SDRAM:    HY57V561620(32MB)

FLASH:    K9F1208(64MB)

NET:         CS8900

 

HOST---------------------------------------

Linux Realse Version:       Fecora Cor 8 (FC8)

CrossCompiler:                 gcc-4.1.1/glibc-2.3.2

 

 

 

问题的提出:

 

内核配置时使用smdk2410的默认配置. U盘不能挂载!

 

    插拔U盘提示信息为:

$ usb 1-1: USB disconnect, address 2

usb 1-1: new full speed USB device using s3c2410-ohci and address 3

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 s3c2410-ohci and address 3

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_LE20C3.rar              dvpc3_tc003_070609.opj

070726_2101_LE20C3.rar         icebox.hex

080128_1313_UCOS_44B0          iic pic

080128_1313_UCOS_44B0.rar      ldlinux.sys

???????!??.txt                 le20c3.rar

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盘挂载成功了~~~

阅读(815) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~