Difference between revisions of "iMX6 Rex EMC testing"

From Voipac Wiki
Jump to navigation Jump to search
 
(47 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[Category:iMX6 Rex Development kit]]
+
[[Category:iMX6 Rex Development Kit]]
 
<!-- -->
 
<!-- -->
 
<div style="float:right">__TOC__</div>
 
<div style="float:right">__TOC__</div>
  
Electromagnetic compatibility results for iMX6 Rex Development kit are shown on this page. Test setup and scripts are described in details.<br />
+
Electromagnetic compatibility results for iMX6 Rex Development Kit are shown on this page. Test setup and scripts are described in details.<br />
  
[[image:iMX6_Rex_Development_kit-EMC_measurement_setup.jpg|800px]]
+
[[image:iMX6_Rex_Development_Kit-EMC_measurement_setup.jpg|800px]]
 
<br /><br />
 
<br /><br />
[[image:iMX6_Rex_Development_kit-EMC_measurement_cable_setup.jpg|800px]]
+
The setup in EMC test lab:<br />
 +
[[image:iMX6_Rex_Development_Kit-EMC_measurement_cable_setup.jpg|800px]]
  
 
== Connected cables/devices ==
 
== Connected cables/devices ==
Line 14: Line 15:
 
* '''SD card 2 (the one under heatsink):''' used for read/write testing
 
* '''SD card 2 (the one under heatsink):''' used for read/write testing
 
* '''RTC Battery:''' inserted in the holder
 
* '''RTC Battery:''' inserted in the holder
* '''Ethernet:''' Ethernet loopback cable connected. Forced to 100Mb and used for ping test
+
* '''Ethernet:''' Ethernet [https://kb.juniper.net/InfoCenter/index?page=content&id=KB22174 loopback cable] connected. Forced to 100Mb and used for ping test
 
* '''HDMI monitor:''' during the test, the monitor is connected but turned off
 
* '''HDMI monitor:''' during the test, the monitor is connected but turned off
 
* '''2x USB memory stick:''' each connected through an extension cable. Both used during read/write test
 
* '''2x USB memory stick:''' each connected through an extension cable. Both used during read/write test
Line 25: Line 26:
  
 
== Test description ==
 
== Test description ==
The goal of this test was to check Radiated and Conducted emission of iMX6 Rex Development kit while running at very high load.<br /><br />
+
The goal of this test was to check Radiated and Conducted emission of iMX6 Rex Development Kit while running at very high load.<br /><br />
  
 
Running threads:
 
Running threads:
Line 40: Line 41:
  
 
== Results ==
 
== Results ==
 +
All the results were measured in compliance with the emission limits for FCC Class B (EMC standard EN 55022B). Class B devices are suitable for both residential and industrial applications as the norm standards use more restrictive limits.
  
 
=== Radiated emission ===
 
=== Radiated emission ===
All the results were measured in compliance with the emission limits for FCC Class B (EMC standard EN55022B). Class B devices are suitable for both residential and industrial applications as this standard use more restrictive limits.
 
  
==== Running Linux only - PASS ====
+
==== Running Linux only PASS ====
{|
+
{|style="text-align:center;"
|[[image:iMX6_Rex_Development_kit-EMC_results-Linux_only_vertical.jpg|396px]]
+
| style="width: 47%;" |Vertical polarization
|[[image:iMX6_Rex_Development_kit-EMC_results-Linux_only_horizontal.jpg|396px]]
+
| style="width: 6%;" |<br />
 +
| style="width: 47%;" |Horizontal polarization
 
|-
 
|-
|Vertical polarization
+
|style="width:396px; border:1px solid black;" |<br />[[image:iMX6_Rex_Development_Kit-EMC_results-Linux_only_vertical.png|370px]]
|Horizontal polarization
+
|<br />
 +
|style="width:396px; border:1px solid black;" |<br />[[image:iMX6_Rex_Development_Kit-EMC_results-Linux_only_horizontal.png|370px]]
 
|}
 
|}
 +
 +
==== Heavy testing – PASS ====
 +
{|style="text-align:center;"
 +
| style="width: 47%;" |Vertical polarization
 +
| style="width: 6%;" |<br />
 +
| style="width: 47%;" |Horizontal polarization
 +
|-
 +
|style="width:396px; border:1px solid black;" |<br />[[image:iMX6_Rex_Development_Kit-EMC_results-Heavy_loaded_vertical.png|370px]]
 +
|<br />
 +
|style="width:396px; border:1px solid black;" |<br />[[image:iMX6_Rex_Development_Kit-EMC_results-Heavy_loaded_horizontal.png|370px]]
 +
|}
 +
 +
=== Conducted emission ===
 +
 +
==== Heavy testing – PASS ====
 +
The development kit was powered by [https://uk.farnell.com/xp-power/ver36us120-ja/adaptor-ac-dc-12v-3a/dp/2646341?rpsku=rel3%3AVEP36US12&st=vep36us12 VER Series] AC/DC Adaptor during the tests.
 +
{|style="text-align:center;"
 +
| style="width: 47%;" |Vertical polarization
 +
| style="width: 6%;" |<br />
 +
| style="width: 47%;" |Horizontal polarization
 +
|-
 +
|style="width:396px; border:1px solid black;" |[[image:iMX6_Rex_Development_Kit-EMC_radiated_emmision_power_cable_L.png|370px|link=http://downloads.voipac.com/files/iMX6_Rex_Development_Kit/module/documents/EMC_conducted_emission/iMX6_Rex_Development_Kit-Conducted_Emission_E022EL.pdf]]
 +
|<br />
 +
|style="width:396px; border:1px solid black;" |[[image:iMX6_Rex_Development_Kit-EMC_radiated_emmision_power_cable_N.png|370px|link=http://downloads.voipac.com/files/iMX6_Rex_Development_Kit/module/documents/EMC_conducted_emission/iMX6_Rex_Development_Kit-Conducted_Emission_E022EN.pdf]]
 +
|}
 +
 +
== Preparing the test ==
 +
=== SD card setup ===
 +
[http://downloads.voipac.com/files/iMX6_Rex_Development_Kit/module/software/linux/binaries/old/imx6rex-uImage-gpu-en-audio-fix-03-APR-2014 Linux 4.1] kernel was used for this test. Modified Xubuntu filesystem can be accessed from [http://downloads.voipac.com/files/iMX6_Rex_Development_Kit/module/software/filesystem/filesystem_download.txt here]. To create a new SD card, [[iMX6 Rex Pro Creating Bootable microSD Card|these instructions]] can be followed.
 +
 +
=== Set booting parameters ===
 +
SD card inserted into the edge SD slot will be used as filesystem device. Following U-Boot commands enable SD card booting and set up other parameters:
 +
<syntaxhighlight lang="bash">
 +
setenv bootargs_mmc 'setenv bootargs ${bootargs} ip=192.168.10.91:::255.255.255.0 root=/dev/mmcblk1p1 rootwait video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB666 vmalloc=400M fbmem=28M fbcon=28M'
 +
setenv bootcmd_mmc 'run bootargs_mmc ; mmc dev 1; ext2load mmc 1 0x10800000 imx6rex-uImage-gpu-en-audio-fix-03-APR-2014 3915972; bootm 0x10800000'
 +
saveenv
 +
</syntaxhighlight>
 +
 +
=== Running tests ===
 +
Test scripts are displayed in the section [[#Test scripts|below]] or can be downloaded: [http://downloads.voipac.com/files/iMX6_Rex_Development_Kit/module/documents/EMC_radiated_emission/iMX6_Rex_Development_Kit-EMC_standard_test.sh Standard test] or [http://downloads.voipac.com/files/iMX6_Rex_Development_Kit/module/documents/EMC_radiated_emission/iMX6_Rex_Development_Kit-EMC_heavy_test.sh Heavy test].<br /><br />
 +
 +
Locations of mounted devices are used as script parameters (without ''/dev/'' prefix). The command to start the test has this structure:
 +
<syntaxhighlight lang="bash">
 +
./name-of-the-test.sh SATA_DIR USB0_DIR USB1_DIR MMC0_DIR
 +
</syntaxhighlight>
 +
 +
Running the standard test:
 +
<syntaxhighlight lang="bash">
 +
./emc-test1.sh sda1 sdb1 sdc1 mmcblk0p1
 +
</syntaxhighlight>
 +
 +
Running the heavy test:
 +
<syntaxhighlight lang="bash">
 +
./emc-test-all.sh sda1 sdb1 sdc1 mmcblk0p1
 +
</syntaxhighlight>
 +
 +
To locate directories where the devices are mapped, ''"fdisk -l"'' command can be useful:
 +
<syntaxhighlight lang="bash">
 +
fdisk -l
 +
 +
Disk /dev/sda: 7998 MB, 7998455808 bytes
 +
108 heads, 63 sectors/track, 2296 cylinders, total 15621984 sectors
 +
Units = sectors of 1 * 512 = 512 bytes
 +
Sector size (logical/physical): 512 bytes / 512 bytes
 +
I/O size (minimum/optimal): 512 bytes / 512 bytes
 +
Disk identifier: 0x001c2022
 +
 +
  Device Boot      Start        End      Blocks  Id  System
 +
/dev/sda1            2048    15621983    7809968  83  Linux
 +
 +
Disk /dev/mmcblk0: 3904 MB, 3904897024 bytes
 +
4 heads, 16 sectors/track, 119168 cylinders, total 7626752 sectors
 +
Units = sectors of 1 * 512 = 512 bytes
 +
Sector size (logical/physical): 512 bytes / 512 bytes
 +
I/O size (minimum/optimal): 512 bytes / 512 bytes
 +
Disk identifier: 0xc44e7f69
 +
 +
        Device Boot      Start        End      Blocks  Id  System
 +
/dev/mmcblk0p1            2048    7626751    3812352  83  Linux
 +
 +
Disk /dev/mmcblk1: 1977 MB, 1977614336 bytes
 +
61 heads, 62 sectors/track, 1021 cylinders, total 3862528 sectors
 +
Units = sectors of 1 * 512 = 512 bytes
 +
Sector size (logical/physical): 512 bytes / 512 bytes
 +
I/O size (minimum/optimal): 512 bytes / 512 bytes
 +
Disk identifier: 0x00000000
 +
 +
        Device Boot      Start        End      Blocks  Id  System
 +
/dev/mmcblk1p1              62    3861421    1930680  83  Linux
 +
 +
Disk /dev/sdb: 16.2 GB, 16219373568 bytes
 +
256 heads, 48 sectors/track, 2578 cylinders, total 31678464 sectors
 +
Units = sectors of 1 * 512 = 512 bytes
 +
Sector size (logical/physical): 512 bytes / 512 bytes
 +
I/O size (minimum/optimal): 512 bytes / 512 bytes
 +
Disk identifier: 0xc3072e18
 +
 +
  Device Boot      Start        End      Blocks  Id  System
 +
/dev/sdb1              48    7372799    3686376    6  FAT16
 +
 +
Disk /dev/sdc: 16.0 GB, 16008609792 bytes
 +
255 heads, 63 sectors/track, 1946 cylinders, total 31266816 sectors
 +
Units = sectors of 1 * 512 = 512 bytes
 +
Sector size (logical/physical): 512 bytes / 512 bytes
 +
I/O size (minimum/optimal): 512 bytes / 512 bytes
 +
Disk identifier: 0x00000000
 +
 +
  Device Boot      Start        End      Blocks  Id  System
 +
/dev/sdc1              32    31266815    15633392    c  W95 FAT32 (LBA)
 +
</syntaxhighlight>
 +
 +
'''''Note:''''' In the example above the device /dev/mmcblk1p1 is a filesystem device. This SD card is tested by running the operating system.
 +
 +
=== Test scripts ===
 +
==== Standard test script ====
 +
<syntaxhighlight lang="bash">
 +
#!/bin/sh
 +
 +
mountDevice() {
 +
  mount /dev/$1 /media/$2
 +
  cat /etc/mtab | grep -F "/dev/$1 /media/$2"
 +
  if [ "$?" -eq "0" ]; then
 +
    echo "$2 mounted"
 +
  else
 +
    echo "$2 not mounted"; exit 2
 +
  fi
 +
}
 +
 +
# mount devices a test a status
 +
mountDevice $1 sata
 +
mountDevice $2 usb0
 +
mountDevice $3 usb1
 +
mountDevice $4 mmc0
 +
 +
# tell the X applications where they should run
 +
export DISPLAY=:0
 +
 +
# run X window - wait for the procces
 +
service lightdm start
 +
 +
# connect ethernet loopback and force the ethernet to 100Mbit
 +
mii-tool -F 100baseTx-HD
 +
 +
# play a video file in an infinite loop
 +
echo 0 > /sys/class/graphics/fb2/blank
 +
sudo -u "ubuntu" xfce4-terminal --geometry=70x20+100+10 -x mplayer -vo fbdev2:/dev/fb2 -vf scale -zoom -loop 0 -xy 1024 /home/ubuntu/Clou$
 +
 +
# ping
 +
sudo -u "ubuntu" xfce4-terminal --geometry=70x25+100+600 -x ping 192.168.10.1 &
 +
 +
# top
 +
sudo -u "ubuntu" xfce4-terminal --geometry=90x50+900+10 -x top &
 +
 +
proceed=1
 +
file1="blackbird.wav"
 +
 +
while [ $proceed -eq 1 ]
 +
do
 +
 +
  cp1_done=`ps cax | grep $cp1_pid | grep cp`
 +
  if [ -z "$cp1_done" ]; then # run cp only if previous cp is done
 +
    cp /media/usb0/$file1 /media/sata &
 +
    cp1_pid=$!
 +
    echo "started cp from usb0 to sata"
 +
  fi
 +
 +
  cp2_done=`ps cax | grep $cp2_pid | grep cp`
 +
  if [ -z "$cp2_done" ]; then # run cp only if previous cp is done
 +
    cp /media/usb1/$file1 /media/mmc0 &
 +
    cp2_pid=$!
 +
    echo "started cp from usb1 to mmc0"
 +
  fi
 +
 +
  aud_done=`ps cax | grep $aud_pid | grep aplay`
 +
  if [ -z "$aud_done" ]; then
 +
    aplay -D hw:0,0 /home/ubuntu/blackbird.wav &
 +
    aud_pid=$!
 +
    echo "started play audio"
 +
  fi
 +
 +
done
 +
 +
# kill all procceses if Ctrl+C detected
 +
trap '$precced=0; kill $cp1_pid $cp2_pid &aud_pid;' 2
 +
sleep 10000
 +
</syntaxhighlight>
 +
 +
==== Heavy test script ====
 +
<syntaxhighlight lang="bash">
 +
#!/bin/sh
 +
 +
mountDevice() {
 +
  mount /dev/$1 /media/$2
 +
  cat /etc/mtab | grep -F "/dev/$1 /media/$2"
 +
  if [ "$?" -eq "0" ]; then
 +
    echo "$2 mounted"
 +
  else
 +
    echo "$2 not mounted"; exit 2
 +
  fi
 +
}
 +
 +
# mount devices a test a status
 +
mountDevice $1 sata
 +
mountDevice $2 usb0
 +
mountDevice $3 usb1
 +
mountDevice $4 mmc0
 +
 +
# tell the X applications where they should run
 +
export DISPLAY=:0
 +
 +
# run X windows - wait for the procces
 +
service lightdm start
 +
 +
# connect Ethernet loopback and force the ethernet to 100Mbit
 +
mii-tool -F 100baseTx-HD
 +
 +
# gpu test
 +
cd /root/gpu-viv-bin-mx6q-3.10.9-1.0.0-hfp/opt/viv_samples/vdk
 +
./tutorial7 &
 +
gpu_pid=$!
 +
cd
 +
 +
# play a video file on the lvds display
 +
echo 0 > /sys/class/graphics/fb2/blank
 +
mplayer -vo fbdev2:/dev/fb2 -vf scale -zoom -loop 0 -xy 1024 -really-quiet /home/ubuntu/Clouds.avi &
 +
vid_pid=$!
 +
 +
# stressapptest - testing sata, 2x usb, sd card, 1 thread CPU, 1 thread memory
 +
stressapptest  -f /media/sata/tmp-file1 -f /media/usb0/tmp-file1 -f /media/usb1/tmp-file1 -f /media/mmc0/tmp-file1  -s 600000 -M 50 -m 1 $
 +
str_pid=$!
 +
echo "Stressapptest: " $str_pid
 +
 +
# play a audio file
 +
mplayer -loop 0 -really-quiet /home/ubuntu/blackbird.wav &
 +
aud_pid=$!
 +
 +
# ping
 +
ping 192.168.10.1 &
 +
ping_pid=$!
 +
 +
# top
 +
top
 +
top_pid=$!
 +
 +
 +
# kill all procceses if Ctrl+C detected
 +
trap '$procced=0; kill $gpu_pid $vid_pid $aud_pid $str_pid $ping_pid;' 2
 +
sleep 10000
 +
</syntaxhighlight>
 +
 +
'''''Note:''''' If the LVDS monitor is not included in the setup, these lines need to be comment out:
 +
<syntaxhighlight lang="bash">
 +
# echo 0 > /sys/class/graphics/fb2/blank
 +
# mplayer -vo fbdev2:/dev/fb2 -vf scale -zoom -loop 0 -xy 1024 -really-quiet /home/ubuntu/Clouds.avi &
 +
</syntaxhighlight>
 +
 +
To disable LVDS Interface, following command is required:
 +
<syntaxhighlight lang="bash">
 +
echo 1 > /sys/class/graphics/fb2/blank
 +
</syntaxhighlight>
 +
 +
<br />
 +
The original article can be accessed on the [http://www.imx6rex.com/software/emc-test/ iMX6Rex.com website].

Latest revision as of 07:41, 26 October 2021

Electromagnetic compatibility results for iMX6 Rex Development Kit are shown on this page. Test setup and scripts are described in details.

iMX6 Rex Development Kit-EMC measurement setup.jpg

The setup in EMC test lab:
iMX6 Rex Development Kit-EMC measurement cable setup.jpg

Connected cables/devices

  • Power jack: +12V from an isolated source
  • SD card 1 (the one on the PCB edge): preloaded with filesystem and used for booting
  • SD card 2 (the one under heatsink): used for read/write testing
  • RTC Battery: inserted in the holder
  • Ethernet: Ethernet loopback cable connected. Forced to 100Mb and used for ping test
  • HDMI monitor: during the test, the monitor is connected but turned off
  • 2x USB memory stick: each connected through an extension cable. Both used during read/write test
  • RS232: a null modem cable connected. During the test, the cable was terminated with an RS232 to USB converter
  • SATA CFAST card (without the metal card holder): used for read/write testing
  • Headphones & Microphone: standard headphones connected to the headphones and microphone jack
  • Audio loopback: a cable connected between Line in and Line out
  • Wifi PCIE mini card: inserted, but not actively used. No antennas connected
  • Modem: inserted, but not actively used. No antennas connected, no SIM card inserted

Test description

The goal of this test was to check Radiated and Conducted emission of iMX6 Rex Development Kit while running at very high load.

Running threads:

  • CPU stress test
  • Memory stress test
  • GPU stress test (running a Full HD graphics test at rate 150 frames per second)
  • Linux GUI
  • Playing a video file
  • Playing an audio file
  • SD card test (SD card read & write stress test)
  • 2x USB test (USB memory stick read & write stress test)
  • SATA test (CFAST SSD card read & write stress test)
  • Ethernet ping

Results

All the results were measured in compliance with the emission limits for FCC Class B (EMC standard EN 55022B). Class B devices are suitable for both residential and industrial applications as the norm standards use more restrictive limits.

Radiated emission

Running Linux only – PASS

Vertical polarization
Horizontal polarization

iMX6 Rex Development Kit-EMC results-Linux only vertical.png


iMX6 Rex Development Kit-EMC results-Linux only horizontal.png

Heavy testing – PASS

Vertical polarization
Horizontal polarization

iMX6 Rex Development Kit-EMC results-Heavy loaded vertical.png


iMX6 Rex Development Kit-EMC results-Heavy loaded horizontal.png

Conducted emission

Heavy testing – PASS

The development kit was powered by VER Series AC/DC Adaptor during the tests.

Vertical polarization
Horizontal polarization
iMX6 Rex Development Kit-EMC radiated emmision power cable L.png
iMX6 Rex Development Kit-EMC radiated emmision power cable N.png

Preparing the test

SD card setup

Linux 4.1 kernel was used for this test. Modified Xubuntu filesystem can be accessed from here. To create a new SD card, these instructions can be followed.

Set booting parameters

SD card inserted into the edge SD slot will be used as filesystem device. Following U-Boot commands enable SD card booting and set up other parameters:

setenv bootargs_mmc 'setenv bootargs ${bootargs} ip=192.168.10.91:::255.255.255.0 root=/dev/mmcblk1p1 rootwait video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB666 vmalloc=400M fbmem=28M fbcon=28M'
setenv bootcmd_mmc 'run bootargs_mmc ; mmc dev 1; ext2load mmc 1 0x10800000 imx6rex-uImage-gpu-en-audio-fix-03-APR-2014 3915972; bootm 0x10800000'
saveenv

Running tests

Test scripts are displayed in the section below or can be downloaded: Standard test or Heavy test.

Locations of mounted devices are used as script parameters (without /dev/ prefix). The command to start the test has this structure:

./name-of-the-test.sh SATA_DIR USB0_DIR USB1_DIR MMC0_DIR

Running the standard test:

./emc-test1.sh sda1 sdb1 sdc1 mmcblk0p1

Running the heavy test:

./emc-test-all.sh sda1 sdb1 sdc1 mmcblk0p1

To locate directories where the devices are mapped, "fdisk -l" command can be useful:

fdisk -l
 
Disk /dev/sda: 7998 MB, 7998455808 bytes
108 heads, 63 sectors/track, 2296 cylinders, total 15621984 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x001c2022
 
   Device Boot      Start         End      Blocks   Id  System
/dev/sda1            2048    15621983     7809968   83  Linux
 
Disk /dev/mmcblk0: 3904 MB, 3904897024 bytes
4 heads, 16 sectors/track, 119168 cylinders, total 7626752 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xc44e7f69
 
        Device Boot      Start         End      Blocks   Id  System
/dev/mmcblk0p1            2048     7626751     3812352   83  Linux
 
Disk /dev/mmcblk1: 1977 MB, 1977614336 bytes
61 heads, 62 sectors/track, 1021 cylinders, total 3862528 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
 
        Device Boot      Start         End      Blocks   Id  System
/dev/mmcblk1p1              62     3861421     1930680   83  Linux
 
Disk /dev/sdb: 16.2 GB, 16219373568 bytes
256 heads, 48 sectors/track, 2578 cylinders, total 31678464 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xc3072e18
 
   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1              48     7372799     3686376    6  FAT16
 
Disk /dev/sdc: 16.0 GB, 16008609792 bytes
255 heads, 63 sectors/track, 1946 cylinders, total 31266816 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
 
   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1              32    31266815    15633392    c  W95 FAT32 (LBA)

Note: In the example above the device /dev/mmcblk1p1 is a filesystem device. This SD card is tested by running the operating system.

Test scripts

Standard test script

#!/bin/sh
 
mountDevice() {
  mount /dev/$1 /media/$2
  cat /etc/mtab | grep -F "/dev/$1 /media/$2"
  if [ "$?" -eq "0" ]; then
    echo "$2 mounted"
  else
    echo "$2 not mounted"; exit 2
  fi
}
 
# mount devices a test a status
mountDevice $1 sata
mountDevice $2 usb0
mountDevice $3 usb1
mountDevice $4 mmc0
 
# tell the X applications where they should run
export DISPLAY=:0
 
# run X window - wait for the procces
service lightdm start
 
# connect ethernet loopback and force the ethernet to 100Mbit
mii-tool -F 100baseTx-HD
 
# play a video file in an infinite loop
echo 0 > /sys/class/graphics/fb2/blank
sudo -u "ubuntu" xfce4-terminal --geometry=70x20+100+10 -x mplayer -vo fbdev2:/dev/fb2 -vf scale -zoom -loop 0 -xy 1024 /home/ubuntu/Clou$
 
# ping
sudo -u "ubuntu" xfce4-terminal --geometry=70x25+100+600 -x ping 192.168.10.1 &
 
# top
sudo -u "ubuntu" xfce4-terminal --geometry=90x50+900+10 -x top &
 
proceed=1
file1="blackbird.wav"
 
while [ $proceed -eq 1 ]
do
 
  cp1_done=`ps cax | grep $cp1_pid | grep cp`
  if [ -z "$cp1_done" ]; then # run cp only if previous cp is done
    cp /media/usb0/$file1 /media/sata &
    cp1_pid=$!
    echo "started cp from usb0 to sata"
  fi
 
  cp2_done=`ps cax | grep $cp2_pid | grep cp`
  if [ -z "$cp2_done" ]; then # run cp only if previous cp is done
    cp /media/usb1/$file1 /media/mmc0 &
    cp2_pid=$!
    echo "started cp from usb1 to mmc0"
  fi
 
  aud_done=`ps cax | grep $aud_pid | grep aplay`
  if [ -z "$aud_done" ]; then
    aplay -D hw:0,0 /home/ubuntu/blackbird.wav &
    aud_pid=$!
    echo "started play audio"
  fi
 
done
 
# kill all procceses if Ctrl+C detected
trap '$precced=0; kill $cp1_pid $cp2_pid &aud_pid;' 2
sleep 10000

Heavy test script

#!/bin/sh
 
mountDevice() {
  mount /dev/$1 /media/$2
  cat /etc/mtab | grep -F "/dev/$1 /media/$2"
  if [ "$?" -eq "0" ]; then
    echo "$2 mounted"
  else
    echo "$2 not mounted"; exit 2
  fi
}
 
# mount devices a test a status
mountDevice $1 sata
mountDevice $2 usb0
mountDevice $3 usb1
mountDevice $4 mmc0
 
# tell the X applications where they should run
export DISPLAY=:0
 
# run X windows - wait for the procces
service lightdm start
 
# connect Ethernet loopback and force the ethernet to 100Mbit
mii-tool -F 100baseTx-HD
 
# gpu test
cd /root/gpu-viv-bin-mx6q-3.10.9-1.0.0-hfp/opt/viv_samples/vdk
./tutorial7 &
gpu_pid=$!
cd
 
# play a video file on the lvds display
echo 0 > /sys/class/graphics/fb2/blank
mplayer -vo fbdev2:/dev/fb2 -vf scale -zoom -loop 0 -xy 1024 -really-quiet /home/ubuntu/Clouds.avi &
vid_pid=$!
 
# stressapptest - testing sata, 2x usb, sd card, 1 thread CPU, 1 thread memory
stressapptest  -f /media/sata/tmp-file1 -f /media/usb0/tmp-file1 -f /media/usb1/tmp-file1 -f /media/mmc0/tmp-file1  -s 600000 -M 50 -m 1 $
str_pid=$!
echo "Stressapptest: " $str_pid
 
# play a audio file
mplayer -loop 0 -really-quiet /home/ubuntu/blackbird.wav &
aud_pid=$!
 
# ping
ping 192.168.10.1 &
ping_pid=$!
 
# top
top
top_pid=$!
 
 
# kill all procceses if Ctrl+C detected
trap '$procced=0; kill $gpu_pid $vid_pid $aud_pid $str_pid $ping_pid;' 2
sleep 10000

Note: If the LVDS monitor is not included in the setup, these lines need to be comment out:

# echo 0 > /sys/class/graphics/fb2/blank
# mplayer -vo fbdev2:/dev/fb2 -vf scale -zoom -loop 0 -xy 1024 -really-quiet /home/ubuntu/Clouds.avi &

To disable LVDS Interface, following command is required:

echo 1 > /sys/class/graphics/fb2/blank


The original article can be accessed on the iMX6Rex.com website.