Difference between revisions of "iMX6 TinyRex Ultra Accessing and Testing Peripherals"

From Voipac Wiki
Jump to navigation Jump to search
Line 1: Line 1:
 
[[Category:iMX6 TinyRex Development kit]]
 
[[Category:iMX6 TinyRex Development kit]]
 
[[Category:iMX6 TinyRex Ultra]]
 
[[Category:iMX6 TinyRex Ultra]]
[[Category:Yocto]]
 
 
<!-- -->
 
<!-- -->
 
<div style="float:right">__TOC__</div>
 
<div style="float:right">__TOC__</div>

Revision as of 13:40, 14 March 2021

Elemental operations of iMX6 TinyRex Development kit interfaces in Ultra configuration are shown on this page. For more specified information such as HDMI Input port or Wireless operation refer to the dedicated Peripheral sections.

Prerequisites

Hardware

  • DC power supply (5V 2A)
  • iMX6 TinyRex Module Ultra
  • iMX6 TinyRex Baseboard

Peripherals and Accessories

  • 1x FullHD monitor with Audio output
  • 1x HDMI signal generator (such as PC with HDMI interface or GoPro camera)
  • 1x MicroSD card
  • 1x MiniPCIe WiFi card
  • 1x RPi camera module
  • 1x SATA HDD drive
  • 2x USB FLASH drive

Cables

  • Ethernet cable
  • HDMI cable
  • Micro HDMI cable
  • Micro USB cable
  • USB to UART cable

User button

Input: Press the USER button
Output: Button events 1 and 0 are generated

root@imx6-tinyrexultra:~# evtest /dev/input/by-path/platform-gpio-keys*-event
Input driver version is 1.0.1
Input device ID: bus 0x19 vendor 0x1 product 0x1 version 0x100pio-keys.16-event .
Input device name: "gpio-keys.16"
Supported events:
  Event type 0 (EV_SYN)
  Event type 1 (EV_KEY)
    Event code 116 (KEY_POWER)
Properties:
Testing ... (interrupt to exit)
Event: time 1453240251.571826, type 1 (EV_KEY), code 116 (KEY_POWER), value 1
Event: time 1453240251.571826, -------------- EV_SYN ------------
Event: time 1453240251.711820, type 1 (EV_KEY), code 116 (KEY_POWER), value 0
Event: time 1453240251.711820, -------------- EV_SYN ------------

Reset button

Input: Press the RESET button
Output: Module will execute bootloader immediately with "Reset cause: POR"
Note: Module should never freeze or hang after the reset button was pressed. Testing the operation 10 times gives a reliable result

U-Boot 2014.10 (Jan 19 2016 - 20:37:48)

CPU:   Freescale i.MX6SOLO rev1.1 at 792 MHz
Reset cause: POR
Board: MX6 TinyRex - basic
I2C:   ready
DRAM:  512 MiB
MMC:   FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   FEC [PRIME]
Hit any key to stop autoboot:  0

CAN

Input: None
Output: Device driver is available

root@imx6-tinyrexultra:~# ip addr show dev can0
2: can0: <NOARP,ECHO> mtu 16 qdisc noop state DOWN group default qlen 10
    link/can


Input: Connect a pair of iMX6 TinyRex Development boards and a couple of dedicated CAN evaluation modules
Output: Boards communicate between each other. Sent messages are received successfully

Board 1 (receiver) commands and outputs:

root@imx6-tinyrexultra:~# ip link set can0 type can bitrate 1000000
root@imx6-tinyrexultra:~# ip link set can0 up
flexcan 2090000.flexcan can0: writing ctrl=0x01232054
root@imx6-tinyrexultra:~# candump can0 &
[1] 833
root@imx6-tinyrexultra:~#   can0  123   [4]  DE AD BE EF

Board 2 (transmitter and receiver) commands and outputs:

root@imx6-tinyrexultra:~# ip link set can0 type can bitrate 1000000
root@imx6-tinyrexultra:~# ip link set can0 up
flexcan 2090000.flexcan can0: writing ctrl=0x01232054
root@imx6-tinyrexultra:~# candump can0 &
[1] 847
root@imx6-tinyrexultra:~# cansend can0 123#DEADBEEF
root@imx6-tinyrexultra:~#   can0  123   [4]  DE AD BE EF

Camera Input

Input: Connect RPi camera module into CSI interface and check if it is detected on I2C bus
Output: I2C address 0x36 is occupied and under use

root@imx6-tinyrexultra:~# i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- UU -- -- -- 3a -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: 50 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --


Input: Connect RPi camera module into CSI interface and check kernel modules
Output: Device driver ov5647_camera_mipi_int(or ov5647_camera_mipi) is loaded

root@imx6-tinyrexultra:~# lsmod
Module                  Size  Used by
mxc_v4l2_capture       28532  2 
ipu_bg_overlay_sdc      5401  1 mxc_v4l2_capture
ipu_still               2528  1 mxc_v4l2_capture
ipu_prp_enc             5943  1 mxc_v4l2_capture
ipu_csi_enc             3863  1 mxc_v4l2_capture
ipu_fg_overlay_sdc      6217  1 mxc_v4l2_capture
ov5647_camera_mipi     30980  0 
adv7610_video           6270  0 
v4l2_int_device         2930  3 ov5647_camera_mipi_int,adv7610_video,mxc_v4l2_capture
mxc_dcic                6569  0 
evbug                   1875  0


Input: Connect RPi camera module into CSI interface and capture image
Output: The image is displayed on HDMI monitor

root@imx6-tinyrexultra:~# echo 2 > /sys/bus/i2c/devices/1-0036/ov5647_mode 
root@imx6-tinyrexultra:~# gst-launch-1.0 v4l2src device="/dev/video1" ! video/x-bayer,width=1920,height=1080,framerate=30/1 ! queue ! bayer2rgb ! videoconvert ! fbdevsink
display(/dev/fb0) resolution is (1920x1080).
ipu_csi_window_size_crop: Error left=0 top=56595559
ERROR: unrecognized std! 0 (PAL=ff, NTSC=b000

(gst-plugin-scanner:1175): GStreamer-CRITICAL **: gst_caps_simplify: assertion 'GST_IS_CAPS (caps)' failed

(gst-plugin-scanner:1175): GStreamer-CRITICAL **: gst_caps_append: assertion 'GST_IS_CAPS (caps2)' failed

(gst-plugin-scanner:1175): GStreamer-CRITICAL **: gst_caps_simplify: assertion 'GST_IS_CAPS (caps)' failed

(gst-plugin-scanner:1175): GStreamer-CRITICAL **: gst_caps_append: assertion 'GST_IS_CAPS (caps2)' failed
ipu_csi_window_size_crop: Error left=0 top=56595559
ipu_csi_window_size_crop: Error left=0 top=56595559
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
ERROR: v4l2 capture: unsupported ioctrl!
WARNING: from element /GstPipeline:pipeline0/GstFBDEVSink:fbdevsink0: A lot of buffers are being dropped.
Additional debug info:
/home/marek/workdir/imx6/yocto/fsl-release-bsp-tinyrex/build-x11/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/gstreamer1.0/1.4.1-r0/gstreamer-1.4.1/libs/gst/base/gstbasesin:
There may be a timestamping problem, or this computer is too slow.
power_down_callback: ipu0/csi0
^Chandling interrupt.
Interrupt: Stopping pipeline ...
Execution ended after 0:00:19.269515335
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
power_down_callback: ipu0/csi1


Software integration and additional commands or settings of CSI camera interface are available on separate iMX6 TinyRex Camera page.

Ethernet

Input: None
Output: Device driver is available
Note: MAC address should be identical with the address on the sticker placed on module

root@imx6-tinyrexultra:~# ip addr show dev eth0
3: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
    link/ether 00:0d:15:00:db:b6 brd ff:ff:ff:ff:ff:ff

Input: Plug Ethernet cable into connector and issue DHCP command
Output: IPv4 address is assigned

root@imx6-tinyrexultra:~# dmesg | tail
...
libphy: 2188000.ethernet:03 - Link is Up - 1000/Full
IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
root@imx6-tinyrexultra:~# udhcpc -i eth0
udhcpc (v1.22.1) started
Sending discover...
Sending select for 192.168.0.115...
Lease of 192.168.0.115 obtained, lease time 356

HDMI Input

Input: Plug HD signal generator (1280x720p) (e.g. HDMI output from a PC or GoPro camera) into micro HDMI Input connector and capture input signal
Output: Input signal is visible on the connected monitor

root@imx6-tinyrexultra:~# gst-launch-1.0 v4l2src device="/dev/video0" ! video/x-raw,width=1280,height=720,framerate=30/1 ! videoconvert ! autovideosink
Setting pipeline to PAUSED ...
display(/dev/fb0) resolution is (1920x1080).
====== OVERLAYSINK: 4.1.4 build on Jan 23 2017 13:24:12. ======
display(/dev/fb0) resolution is (1920x1080).
display(/dev/fb0) resolution is (mxc_v4l2_output v4l2_out: Bypass IC.
1920x1080).
mxc_v4l2_output v4l2_out: Bypass IC.
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
ERROR: v4l2 capture: unsupported ioctrl!
ERROR: v4l2 capture: unsupported ioctrl!
^Chandling interrupt.
Interrupt: Stopping pipeline ...
Execution ended after 0:00:09.216782001
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Total showed frames (256), display master blited (256), playing for (0:00:09.217285001), fps (27.774).
Setting pipeline to NULL ...
Freeing pipeline ...

or

root@imx6-tinyrexultra:~# gst-launch imxv4l2src ! autovideosink
ipu_csi_window_size_crop: Error left=0 top=56595559
MAX resolution 1920x1080

(gst-plugin-scanner:1024): GLib-GObject-WARNING **: cannot register existing type 'GstVorbisDec'

(gst-plugin-scanner:1024): GLib-CRITICAL **: g_once_init_leave: assertion 'result != 0' failed

(gst-plugin-scanner:1024): GStreamer-CRITICAL **: gst_element_register: assertion 'g_type_is_a (type, GST_TYPE_ELEMENT)' failed
power_down_callback: ipu0/csi0
MFW_GST_V4LSRC_PLUGIN 4.0.3 build on Jan 19 2016 21:47:11.
Setting pipeline to PAUSED ...
ipu_csi_window_size_crop: Error left=0 top=56595559
MFW_GST_V4LSINK_PLUGIN 4.0.3 build on Jan 19 2016 21:46:56.
ipu_csi_window_size_crop: Error left=0 top=56595559
ipu_csi_window_size_crop: Error left=0 top=56595559
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
full screen size:1920x1080
[V4L Update Display]: left=0, top=0, width=1920, height=1080
set v4l display crop sucessfully
set v4l rotate sucessfully
>>V4L_SINK: Actually buffer status:
        hardware buffer : 12
        software buffer : 0
power_down_callback: ipu0/csi1
imx-ipuv3 2400000.ipu: IPU Warning - IPU_INT_STAT_10 = 0x00080000
imx-ipuv3 2400000.ipu: IPU Warning - IPU_INT_STAT_10 = 0x00080000
imx-ipuv3 2400000.ipu: IPU Warning - IPU_INT_STAT_10 = 0x00080000
imx-ipuv3 2400000.ipu: IPU Warning - IPU_INT_STAT_10 = 0x00080000
imx-ipuv3 2400000.ipu: IPU Warning - IPU_INT_STAT_10 = 0x00080000
imx-ipuv3 2400000.ipu: IPU Warning - IPU_INT_STAT_10 = 0x00080000
Caught interrupt -- handling interrupt.
Interrupt: Stopping pipeline ...

(gst-launch-0.10:1023): GLib-CRITICAL **: Source ID 16 was not found when attempting to remove it
Execution ended after 186220685689 ns.
Setting pipeline to PAUSED ...
Running time 0:03:06.221020022 render fps 16.131
Setting pipeline to READY ...
Setting pipeline to NULL ...
Total rendered:3004
[--->FINALIZE v4l_sink
Freeing pipeline ...
power_down_callback: ipu0/csi0


Software integration of HDMI Receiver ADV7610, additional commands and operation options are available on separate iMX6 TinyRex HDMI Input page.

HDMI Output

Input: Connect LCD monitor to baseboard
Output: Desktop UI is correctly displayed
600px

I2C

Input: Scan I2C bus 0
Output: Available devices:

  • HDMI Output EDID (0x50)
  • EEPROM (0x56)
root@imx6-tinyrexultra:~# i2cdetect -y 0
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: 30 -- -- -- -- -- -- 37 -- -- 3a -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: UU -- -- -- -- -- -- 57 -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --

Input: Scan I2C bus 1
Output: Available devices:

  • CSI Camera (0x36)
  • HDMI Input HDCP (0x3a)
  • HDMI Input EDID (0x50)
root@imx6-tinyrexultra:~# i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- UU -- -- -- 3a -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: 50 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --

Input: Scan I2C bus 2
Output: Available devices:

  • HDMI Input chip(0x22 0x26 0x32 0x34 0x36 0x3e 0x40 0x4c)
root@imx6-tinyrexultra:~# i2cdetect -y 2
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- UU -- -- -- UU -- -- -- -- -- -- -- -- -- 
30: -- -- UU -- UU -- UU -- -- -- -- -- -- -- UU -- 
40: UU -- -- -- -- -- -- -- -- -- -- -- UU -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --

Input: Trigger I2C EEPROM detection
Output: I2C EEPROM is detected

root@imx6-tinyrexultra:~# echo -n "0-0056" > /sys/bus/i2c/drivers/at24/unbind
root@imx6-tinyrexultra:~# echo -n "0-0056" > /sys/bus/i2c/drivers/at24/bind 
at24 0-0056: 131072 byte 24c1024 EEPROM, writable, 1 bytes/write

Input: Write and Read data from I2C EEPROM
Output: If successful, console text 'Data are the same' should appear

root@imx6-tinyrexultra:~# echo -n "0123" > eeprom_in
root@imx6-tinyrexultra:~# cat eeprom_in > /sys/bus/i2c/devices/0-0056/eeprom
root@imx6-tinyrexultra:~# head -c 4 /sys/bus/i2c/devices/0-0056/eeprom > eeprom_out
root@imx6-tinyrexultra:~# diff eeprom_in eeprom_out && echo "Data are the same"
Data are the same

User LED

Input: None
Output: Red LED assembled on module switches from ON to OFF with heartbeat pulses afterwards

root@imx6-tinyrexultra:~# echo -n "none" > /sys/devices/soc0/leds*/leds/module-led/trigger 
root@imx6-tinyrexultra:~# echo -n "1" > /sys/devices/soc0/leds*/leds/module-led/brightness
root@imx6-tinyrexultra:~# echo -n "0" > /sys/devices/soc0/leds*/leds/module-led/brightness
root@imx6-tinyrexultra:~# echo -n "heartbeat" >  /sys/devices/soc0/leds*/leds/module-led/trigger

DDR memory

Input: None
Output: Memory test passes without any error

root@imx6-tinyrexultra:~# memtester 2G 1
memtester version 4.1.3 (32-bit)
Copyright (C) 2010 Charles Cazabon.
Licensed under the GNU General Public License version 2 (only).

pagesize is 4096
pagesizemask is 0xfffff000
want 2048MB (2147483648 bytes)
got  267MB (280412160 bytes), trying mlock ...locked.
Loop 1/1:
  Stuck Address       : ok         
  Random Value        : ok
  Compare XOR         : ok
  Compare SUB         : ok
  Compare MUL         : ok
  Compare DIV         : ok
  Compare OR          : ok
  Compare AND         : ok
  Sequential Increment: ok
  Solid Bits          : ok         
  Block Sequential    : ok         
  Checkerboard        : ok         
  Bit Spread          : ok         
  Bit Flip            : ok         
  Walking Ones        : ok         
  Walking Zeroes      : ok         

Done.


Further information about DDR3 memories and its calibration can be accessed in Memory Calibration details.

PCI Express

The procedure uses to test PCIe interface using a WiFi wireless card. More details concerning wireless cards are located on WiFi and Bluetooth Cards page .

Input: Plug Wireless WiFi Link 4965AGN mini PCIe card into mini PCIe slot
Output: Card is detected by system

root@imx6-tinyrexultra:~# lspci 
00:00.0 PCI bridge: Device 16c3:abcd (rev 01)
01:00.0 Network controller: Intel Corporation PRO/Wireless 4965 AG or AGN [Kedron] Network Connection (rev 61)

Input: Plug Wireless WiFi Link 4965AGN mini PCIe card into mini PCIe slot
Output: Wireless WiFi card firmware is loaded

root@imx6-tinyrexultra:~# dmesg | grep iwl4965
iwl4965: Intel(R) Wireless WiFi 4965 driver for Linux, in-tree:
iwl4965: Copyright(c) 2003-2011 Intel Corporation
iwl4965 0000:01:00.0: Detected Intel(R) Wireless WiFi Link 4965AGN, REV=0x4
iwl4965 0000:01:00.0: device EEPROM VER=0x36, CALIB=0x5
iwl4965 0000:01:00.0: Tunable channels: 13 802.11bg, 19 802.11a channels
iwl4965 0000:01:00.0: loaded firmware version 228.61.2.24

Input: Plug Wireless WiFi Link 4965AGN mini PCIe card into mini PCIe slot
Output: Card scans neighbour networks

root@imx6-tinyrexultra:~# rfkill unblock wlan
root@imx6-tinyrexultra:~# ip link set wlan0 up
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
root@imx6-tinyrexultra:~# iw dev wlan0 scan
BSS 20:aa:4b:7e:21:97(on wlan0)
        TSF: 4605781864521 usec (53d, 07:23:01)
        freq: 5220
        beacon interval: 100 TUs
        capability: ESS Privacy ShortPreamble (0x0031)
        signal: -76.00 dBm
        last seen: 0 ms ago
        SSID: OpenWrt5g
        Supported rates: 6.0* 9.0 12.0* 18.0 24.0* 36.0 48.0 54.0 
        DS Parameter set: channel 44
        Country: CZ     Environment: Indoor/Outdoor
                Channels [36 - 48] @ 23 dBm
        RSN:     * Version: 1
                 * Group cipher: CCMP
                 * Pairwise ciphers: CCMP
                 * Authentication suites: PSK
                 * Capabilities: 16-PTKSA-RC 1-GTKSA-RC (0x000c)
        WPA:     * Version: 1
                 * Group cipher: CCMP
                 * Pairwise ciphers: CCMP
                 * Authentication suites: PSK
        Extended capabilities: 6
        WMM:     * Parameter version 1
                 * BE: CW 15-1023, AIFSN 3
                 * BK: CW 15-1023, AIFSN 7
                 * VI: CW 7-15, AIFSN 2, TXOP 3008 usec
                 * VO: CW 3-7, AIFSN 2, TXOP 1504 usec

SATA

Input: Power off the baseboard, connect HDD to SATA connector, provide power for the hard drive and turn on the board
Output: HDD is detected

root@imx6-tinyrexultra:~# dmesg | grep -i -e sata -e ata1
ahci-imx 2200000.sata: fsl,transmit-level-mV not specified, using 00000024
ahci-imx 2200000.sata: fsl,transmit-boost-mdB not specified, using 00000480
ahci-imx 2200000.sata: fsl,transmit-atten-16ths not specified, using 00002000
ahci-imx 2200000.sata: fsl,receive-eq-mdB not specified, using 05000000
ahci-imx 2200000.sata: SSS flag set, parallel bus scan disabled
ahci-imx 2200000.sata: AHCI 0001.0300 32 slots 1 ports 3 Gbps 0x1 impl platform mode
ahci-imx 2200000.sata: flags: ncq sntf stag pm led clo only pmp pio slum part ccc apst 
ata1: SATA max UDMA/133 mmio [mem 0x02200000-0x02203fff] port 0x100 irq 71
ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata1.00: ATA-8: WDC WD1600BEVT-22ZCT0, 11.01A11, max UDMA/133
ata1.00: 312581808 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata1.00: configured for UDMA/133

Input: Generate a dummy file and copy this file into HDD and compare checksums
Output: Both file are identical and have the same checksum

root@imx6-tinyrexultra:~# umount /dev/sda[1-9]
root@imx6-tinyrexultra:~# dd if=/dev/zero of=/dev/sda bs=512 count=1
1+0 records in
1+0 records out
512 bytes (512 B) copied, 0.361743 s, 1.4 kB/s
root@imx6-tinyrexultra:~# fdisk /dev/sda
...


The number of cylinders for this disk is set to 19457.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-19457, default 1): Using default value 1
Last cylinder or size or sizeM or sizeK (1-19457, default 19457): Using default value 19457

Command (m for help): t
Selected partition 1
Hex code (type L to list codes): c
Changed system type of partition 1 to c (Win95 FAT32 (LBA))

Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table
 sda: sda1
root@imx6-tinyrexultra:~# umount /dev/sda1
root@imx6-tinyrexultra:~# mkfs.vfat -F32 /dev/sda1
root@imx6-tinyrexultra:~# mount /dev/sda1 /media/
root@imx6-tinyrexultra:~# rm -f file.txt /media/file.txt
root@imx6-tinyrexultra:~# dd if=/dev/urandom of=file.txt count=1024 bs=1024
1024+0 records in
1024+0 records out
1048576 bytes (1.0 MB) copied, 0.434573 s, 2.4 MB/s
root@imx6-tinyrexultra:~# cp file.txt /media/
root@imx6-tinyrexultra:~# md5sum file.txt /media/file.txt
b8e8141b61813fcc08a6164833729e3b  file.txt
b8e8141b61813fcc08a6164833729e3b  /media/file.txt
root@imx6-tinyrexultra:~# rm -f file.txt /media/file.txt
root@imx6-tinyrexultra:~# umount /dev/sda1


SATA device can be used as a default bootlader and filesystem source. SATA Interface page contains detailed steps to follow.

SD card

Input: SD card is plugged in
Output: Files stored on SD card are listed

root@imx6-tinyrexultra:~# dmesg | grep mmc
mmc0: new high speed SD card at address aaaa
mmcblk1: mmc0:aaaa SU02G 1.84 GiB
 mmcblk1: p1
root@imx6-tinyrexultra:~# mount /dev/mmcblk1p1 /media/
root@imx6-tinyrexultra:~# ls -la /media
total 118084
drwxr-xr-x  4 root root        8192 Jan  1  1970 .
drwxr-xr-x 22 root linaro      4096 Dec 20 09:30 ..
-rwxr-xr-x  1 root root   120886176 Dec 22 15:11 78.avi
drwxr-xr-x  8 root root        8192 Oct 10 16:48 Pictures processed
drwxr-xr-x  2 root root        8192 Oct 10 16:44 iMX6 Rex Moduel Layout videos