TQIMX6ULL測試 儲存裝置

2021-08-20 08:59:30 字數 3713 閱讀 3824

由於系統使用的是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

sd1:0:0:0: [sda] 60062500

512-byte logical blocks: (30.7

gb/28.6

gib)

sd1:0:0:0: [sda] write

protect is off

sd1:0:0:0: [sda] write cache: disabled, read cache: enabled, doesn't support dpo or fua

sda: sda1

sd1: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

TQIMX6UL新增ADC功能

這裡使用天嵌的tqimx6ul平台,tqimx6ul核心板引出的4個adc引腳預設留空,如果要使用adc功能,需要自行將gpio 0 gpio 9的任意引腳配置成adc,這裡將擴充套件介面的pwm2 out為例配置成adc功能 pwm2 out對應gpio為gpio 9 配置方法如下 1 開啟裝置樹...

IMX6ULL啟動流程

假設板子設定為sd tf卡啟動,boot rom程式會做什麼?把程式從sd tf卡讀出來,執行。從 讀?從sd tf卡讀,這需要先初始化sd tf卡 根據efuse或gpio的設定初始化sd tf卡。讀到 去?讀到記憶體即ddr去,這需要先初始化ddr。除了初始化啟動裝置 初始化ddr,還需要初始化...

IMX6ULL學習筆記(一)

imx6ull裸機開發學習 以下內容是我在學習正點原子imx6ull開發板alpha中記錄的筆記,部分摘錄自正點原子imx6ull開發手冊。bin檔案前面要新增頭部 ivt boot data dcd資料 由官方手冊可知要燒寫到sd卡中的load.imx檔案在sd卡中的起始位址是0x400,也就是1...