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

PanGu开发板上提供了一个栈式USB Host接口(J6),有两个 USB口。可以连接各类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.


检测到U盘后,需要手动挂载USB设备到"/mnt"目录下。使用mount命令可以查看到相应的挂载目录。

# mount /dev/sda1 /mnt

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

# umount /mnt
  • No labels