Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

i2C-B6ULL开发套件上提供了两个USB Host接口(J5),可以连接各类USB设备。这里以USB存储设备为例,插入USB存储设备到USB端口,系统中会提示有发现USB设备,同时还显示了当前设备在Linux系统中的设备名称为sda。并且该设备有一个分区,对应的设备为sda1。

usb 1-1.1: new high-speed USB device number 4 using ci_hdrc
usb-storage 1-1.1:1.0: USB Mass Storage device detected
scsi host1: usb-storage 1-1.1:1.0
scsi 1:0:0:0: Direct-Access     SanDisk  Ultra Fit        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
random: nonblocking pool is initialized
 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.

默认系统会自动挂载USB设德至"/run/media"目录下。使用mount命令可以查看到相应的挂载目录。

# mount
/dev/root on / type ext4 (rw,relatime,data=ordered)
devtmpfs on /dev type devtmpfs (rw,relatime,size=89168k,nr_inodes=22292,mode=755)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755)
tmpfs on /var/volatile type tmpfs (rw,relatime)
devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620)
/dev/sda1 on /run/media/sda1 type vfat (rw,relatime,gid=6,fmask=0007,dmask=0007,allow_utime=0020,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)

这里可以对/run/media/sda1目录进行读写文件操作,操作完成后可以使用umount命令对设备卸载后再拔出。

# umount /run/media/sda1


  • No labels