以下操作基于 飞凌嵌入式iMX6开发板
命令行测试法
iMX6开发板 支持 SD 卡热插拔。插上 SD 卡后系统会自动将其挂载到 / media 目录。同时终端会打印关于 SD 卡的信息,由于存在很多种卡,显示的信息可能会有差别:

root@freescale ~$ mmc2: new high speed SDHC card at address aaaa

mmcblk1: mmc2:aaaa SS08G 7.40 GiB

mmcblk1: p1

mmcblk1: p1 p2

EXT3-fs: barriers not enabled

kjournald starting. Commit interval 5 seconds

EXT3-fs (mmcblk1p2): using internal journal

EXT3-fs (mmcblk1p2): recovery complete

EXT3-fs (mmcblk1p2): mounted filesystem with writeback data mode

挂载普通 8G SD 卡

root@freescale /$ ls /media

mmcblk0p1 mmcblk1p1 mmcblk1p2

查看 SD 卡中的文件 , 命令如下:

root@freescale /media$ ls -l /media/mmcblk1p1/

drwxr-xr-x 2 root root 4096 May 22 2015 ??

drwxr-xr-x 2 root root 4096 Nov 23 2014 LOST.DIR

-rwxr-xr-x 1 root root 22612 Jan 15 2015 MLO

-rwxr-xr-x 1 root root 3236 Jan 15 2015 app

drwxr-xr-x 2 root root 4096 May 15 2015 ok335-s

root@freescale /media$ ls -l /media/mmcblk1p2/

drwxr-sr-x 2 root root 4096 Sep 22 2013 bin

drwxr-sr-x 2 root root 4096 Apr 5 2013 dev

drwxr-sr-x 26 root root 4096 Jan 13 2015 etc

drwxr-sr-x 7 root root 4096 Jun 16 2014 forlinx

drwxr-sr-x 4 root root 4096 May 20 2014 home

drwxr-sr-x 8 root root 4096 May 20 2014 lib

drwxr-sr-x 13 root root 4096 Jan 13 2015 media

drwxr-sr-x 3 root root 4096 Apr 5 2013 mnt

drwxr-xr-x 3 root root 4096 May 21 2014 opt

drwxr-sr-x 2 root root 4096 Apr 5 2013 proc

drwxr-sr-x 2 root root 4096 May 20 2014 sbin

drwxr-sr-x 2 root root 4096 Jan 2 2014 srv

drwxr-sr-x 2 root root 4096 Apr 5 2013 sys

lrwxrwxrwx 1 root root 8 Sep 17 2013 tmp -> /var/tmp

drwxr-sr-x 9 root root 4096 Jan 2 2014 usr

drwxr-sr-x 8 root root 4096 May 20 2014 var

sdxc 卡设置使用格式话成 ext2 或 ext3 或 ext4

root@freescale /$ mkfs.ext2 /dev/mmcblk1p1

Filesystem label=

OS type: Linux

Block size=4096 (log=2)

Fragment size=4096 (log=2)

3923968 inodes, 15691520 blocks

784576 blocks (5%) reserved for the super user

First data block=0

Maximum filesystem blocks=16777216

479 block groups

32768 blocks per group, 32768 fragments per group

8192 inodes per group

Superblock backups stored on blocks:

    32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,

4096000, 7962624, 11239424

重启iMX6开发板

mmc2: new high speed SDXC card at address 59b4

mmcblk1: mmc2:59b4 SDU1 59.8 GiB

mmcblk1: p1

root@freescale /media$ cd mmcblk1p1/

root@freescale /media/mmcblk1p1$ ls

lost+found

128G 的 sdxc 卡识别

mmc2: new high speed SDXC card at address 59b4

mmcblk1: mmc2:59b4 SDU1 119 GiB

mmcblk1: p1

EXT2-fs (mmcblk1p1): warning: mounting unchecked fs, running e2fsck is recommend

Ed

root@freescale ~$ cd /media/

root@freescale /media$ ls

mmcblk0p1 mmcblk1p1

root@freescale /media$ cd mmcblk1p1/

root@freescale /media/mmcblk1p1$ ls

lost+found

备注: 目前 iMX6开发板 测试支持 最大 32GiB SDHC 卡 ,最大 128GiB SDXC 卡 ( 格式化成 ext2/3/4 使用 ) 。

文章转载飞凌官网,详情请联系飞凌:https://www.forlinx.com/article_view_137.html