我们测试使用的内核版本为2.6.27,平台为SOM9G20。
//-----------------------------------------------------
1.插入U盘,内核已经能够识别。
~ # usb 1-2: new full speed USB device using at91_ohci and address 2
usb 1-2: configuration #1 chosen from 1 choice
scsi0 : SCSI emulation for USB Mass Storage devices
scsi 0:0:0:0: Direct-Access aigo USB DISK 1100 PQ: 0 ANSI: 0 CCS
sd 0:0:0:0: [sda] 506880 512-byte hardware sectors (260 MB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Assuming drive cache: write through
sd 0:0:0:0: [sda] 506880 512-byte hardware sectors (260 MB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Assuming drive cache: write through
sda: sda1
sd 0:0:0:0: [sda] Attached SCSI removable disk
2.在/dev目录下建立节点
/dev # mknod sda b 8 0
/dev # mknod sda1 b 8 1
/dev # mknod sda2 b 8 2
/dev # mknod sda3 b 8 3
3.测试
~ # hdparm -Tt /dev/sda1
/dev/sda1:
Timing buffer-cache reads: 484 MB in 3.01 seconds = 161.03 MB/sec
Timing buffered disk reads: 3 MB in 3.15 seconds = 976.40 kB/sec
~ #
结论:在SOM9G20的根文件系统中,我们已经给用户提供了hdparm工具。
在连续读写的情况下,AT91SAM9G20的USB接口可以获得大约976.38 kB/sec的速度。 |