Embedsky007的个人空间 https://www.eechina.com/space-uid-114045.html [收藏] [复制] [分享] [RSS]

博客

天嵌i.MX6UL开发平台存储设备的测试方法

已有 2057 次阅读2017-10-16 17:30 |个人分类:技术文章| 天嵌科技, 开发板测试, 存储设备测试

      天嵌科技工业级i.MX6UL_B版配有4路Usb Host (2路双层USB接口,USB2/USB4与扩展接口/4PIN排针复用,可通过电阻选择,默认使用双层USB接口)和1路Usb OTG;由于系统使用的是ubi文件系统。所以在对文件系统进行写操作后,如果要断电、复位、重启等,请先执行sync,否则有可能写入的数据丢失。

1、tf卡

接上tf卡,系统会类似的打印以下信息:

# mmc0: host does not support reading read-only switch, assuming write-enable

mmc0: new high speed SDHC card at address 0001

mmcblk0: mmc0:0001 SD8GB 7.27 GiB

mmcblk0: p1 p2 #生成2个节点mmcblk0p1 mmcblk0p2

      可以通过mount 查看卡的挂载目录。可以像正常文件系统一样操作卡内的文件。另外,在修改数据过后,拔出卡时请先执行sync,否则会有低概率等造成数据修改失败。以下是笔者使用tf 启动卡进行测试的过程:


#

# mmc0: host does not support reading read-only switch, assuming write-enable

mmc0: new high speed SDHC card at address 0001

mmcblk0: mmc0:0001 SD8GB 7.27 GiB

mmcblk0: p1 p2

EXT3-fs (mmcblk0p2): error: couldn't mount because of unsupported optional features (240)

FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.

EXT2-fs (mmcblk0p2): error: couldn't mount because of unsupported optional features (244)

EXT4-fs (mmcblk0p2): recovery complete

EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)


# mount

ubi0:rootfs on / type ubifs (rw,relatime)

devtmpfs on /dev type devtmpfs (rw,relatime,size=89476k,nr_inodes=22369,mode=755)

proc on /proc type proc (rw,relatime)

devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620)

tmpfs on /dev/shm type tmpfs (rw,relatime,mode=777)

tmpfs on /tmp type tmpfs (rw,relatime)

tmpfs on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755)

sysfs on /sys type sysfs (rw,relatime)

/dev/mmcblk0p2 on /run/media/mmcblk0p2 type ext4 (rw,relatime,data=ordered)

/dev/mmcblk0p1 on /run/media/mmcblk0p1 type vfat

(rw,relatime,gid=6,fmask=0007,dmask=0007,allow_utime=0020,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)

#

# ls /run/media/mmcblk0p1

imx6ul-14x14-evk.dtb zImage

# echo 1234 > /run/media/mmcblk0p1/tmp.txt

# cat /run/media/mmcblk0p1/tmp.txt

1234

# sync

# mmc0: card 0001 removed

#

2、U盘

      测试U 盘的方法和SD 卡的方法一样,只不过命令行中的mmcblk1p1 换成sda1 。

# usb 1-1.4: new high-speed USB device number 4 using ci_hdrc

usb-storage 1-1.4:1.0: USB Mass Storage device detected

scsi host1: usb-storage 1-1.4:1.0

scsi 1:0:0:0: Direct-Access SanDisk Ultra 1.00 PQ: 0 ANSI: 6

sd 1:0:0:0: [sda] 60062500 512-byte logical blocks: (30.7 GB/28.6 GiB)

sd 1:0:0:0: [sda] Write Protect is off

sd 1:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA

sda: sda1

sd 1:0:0:0: [sda] Attached SCSI removable disk

FAT-fs (sda1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.

# mount

ubi0:rootfs on / type ubifs (rw,relatime)

devtmpfs on /dev type devtmpfs (rw,relatime,size=89476k,nr_inodes=22369,mode=755)

proc on /proc type proc (rw,relatime)

devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620)

tmpfs on /dev/shm type tmpfs (rw,relatime,mode=777)

tmpfs on /tmp type tmpfs (rw,relatime)

tmpfs on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755)

sysfs on /sys type sysfs (rw,relatime)

/dev/sda1 on /run/media/sda1 type fuseblk

(rw,relatime,user_id=0,group_id=0,allow_other,blksize=4096)

# ls /run/media/sda1

1G_file SanDiskSecureAccess

# usb 1-1.4: USB disconnect, device number 4

      天嵌工控板i.MX6UL_B版,拥有丰富的Usb接口,可满足客户产品各种要求。上文介绍的测试方法您掌握了没有?如有不明白之处请浏览:http://www.embedsky.com/index.php?g=home&m=news&a=show&id=37



路过

鸡蛋

鲜花

握手

雷人

评论 (0 个评论)

facelist

您需要登录后才可以评论 登录 | 立即注册

关于我们  -  服务条款  -  使用指南  -  站点地图  -  友情链接  -  联系我们
电子工程网 © 版权所有   京ICP备16069177号 | 京公网安备11010502021702
返回顶部