[新手指導]imx6開發板 SDHC/SDXC/MMC卡驅動測試
imx6開發板 SDHC/SDXC/MMC卡驅動測試
以下操作基于飛凌嵌入式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使用)。
相關產品 >
-
FETMX6Q-C核心板
i.MX6Q核心板板層出不窮,要如何選擇?飛凌解讀i.mx6Q芯片強性能為您推薦四核A9架構的i.MX6Q產品精選,包含iMX6Q 核心板、i.MX6Q 核心板、iMX6Q工業級核心板,歡迎采購。 i.MX6Q核心板基于NXP(原Freescale)Cortex-A9架構的i.MX6Q四核處理器設計,核心板小尺寸核心板搭配獨特的薄款連接器,讓設計隨心所欲!
了解詳情 -
OKMX6Q-C開發板
雙千兆飛凌嵌入式iMX6Q開發板,板對板連接器,纖薄之際,次底板支持iMX6Q和iMX6DL核心板。i.MX6Q開發板與i.MX6DL開發板資源豐富,原理圖、PCB、軟件資源、硬件資源下載,技術支持等。歡迎選購
了解詳情 -
FETMX6Q-S核心板
NXP iMX6Quad系列具有四個內核,運行頻率達1.2 GHz,帶有1 MB L2緩存和64位DDR3或2通道、32位LPDDR2支持。飛凌提供商業級iMX6Q核心板,工業級iMX6Q核心板,兼容一同底板。具有抗震,抗氧化,抗干擾,更快速升級產品等優勢。保定飛凌嵌入式專注imx6,imx6開發板,飛思卡爾imx6等ARM嵌入式核心控制系統研發、設計和生產,是imx6,imx6開發板,飛思卡爾imx6提供者,imx6系列產品現已暢銷全國,歡迎咨詢!
了解詳情 -
OKMX6Q-S3開發板
飛凌嵌入式提供iMX6Q開發板,iMX6解決方案,iMX6Q核心板,i.MX6Q開發板解決方案。iMX6Q穩定、快速、性價比高,歡迎選購 NXP iMX6系列芯片全支持,升級簡配無憂替換。 了解詳情