Chinaunix首页 | 论坛 | 博客
  • 博客访问: 32430
  • 博文数量: 12
  • 博客积分: 1400
  • 博客等级: 上尉
  • 技术积分: 130
  • 用 户 组: 普通用户
  • 注册时间: 2009-12-22 20:05
文章分类
文章存档

2010年(4)

2009年(8)

我的朋友

分类: 嵌入式

2009-12-23 20:25:03

一、开发平台

·   机:VMWare--Fedora 8

·  开发板:utu2440--64MB Nand

·  编译器:arm-linux-gcc-4.3.2

 

二、移植步骤

一、USB Mass Storage驱动移植

在移植好内核和根文件系统的基础上,进行USB驱动的移植。S3C2440集成了USB控制器支持USB1.1版本,支持USB主机和USB设备主机符合OHCI1.0版本,Linux2.6.29.1的内核支持USB控制器,只需在内核中配置即可。

 

# make menuconfig

 

Device Drivers  --->

    SCSI device support  --->

       <*> SCSI device support

       [*] legacy /proc/scsi/ support

       <*> SCSI disk support

       <*> SCSI CDROM support

       <*> SCSI generic support

    [*] HID Devices  --->

       <*>   USB Human Interface Device (full HID) support

       [*]   /dev/hiddev raw HID device support

    [*] USB support  --->

       <*>   Support for Host-side USB

       [*]     USB device filesystem

       [*]     USB device class-devices (DEPRECATED)

       <*>     USB Monitor

       <*>     OHCI HCD support

       <*>   USB Mass Storage support

       [*]   The shared table of common (or usual) storage devices

       <*>   USB Serial Converter support  --->

 

编译内核,把编译好的内核和根文件系统映像文件下载到开发板,启动开发板后插入U盘,终端出现如下信息:

[root@liuzg]\$ usb 1-1: new full speed USB device using s3c2410-ohci and address 5

usb 1-1: configuration #1 chosen from 1 choice

scsi3 : SCSI emulation for USB Mass Storage devices

scsi 3:0:0:0: Direct-Access     ONDA     MP3 PLAYER       2.00 PQ: 0 ANSI: 0 CCS

sd 3:0:0:0: [sdc] 3996593 512-byte hardware sectors: (2.04 GB/1.90 GiB)

sd 3:0:0:0: [sdc] Write Protect is off

sd 3:0:0:0: [sdc] Assuming drive cache: write through

sd 3:0:0:0: [sdc] 3996593 512-byte hardware sectors: (2.04 GB/1.90 GiB)

sd 3:0:0:0: [sdc] Write Protect is off

sd 3:0:0:0: [sdc] Assuming drive cache: write through

 sdc:

sd 3:0:0:0: [sdc] Attached SCSI removable disk

sd 3:0:0:0: Attached scsi generic sg0 type 0

 

使用命令mount挂载U盘:

[root@liuzg]\$ mount /dev/sdc /mnt/udisk/

[root@liuzg]\$ ls /mnt/udisk

doc         music       music2      music4      music6      record

download    music1      music3      music5      readme.txt  test

[root@liuzg]\$ umount /mnt/udisk

[root@liuzg]\$ usb 1-1: USB disconnect, address 5      

 

参考资料:

[1] http://blog.chinaunix.net/u3/104286/showart_2066587.html

 

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