VAR-SOM-MX6 Yocto Unit Testing: Difference between revisions

From Variscite Wiki
Line 101: Line 101:
</pre>
</pre>
The output should look like:<br>
The output should look like:<br>
00:00.0 PCI bridge: Device 16c3:abcd (rev 01)
00:00.0 PCI bridge: Device 16c3:abcd (rev 01)<br>
01:00.0 Network controller: Intel Corporation PRO/Wireless 4965 AG or AGN [Kedron] Network Connection (rev 61)
01:00.0 Network controller: Intel Corporation PRO/Wireless 4965 AG or AGN [Kedron] Network Connection (rev 61)



Revision as of 07:52, 9 February 2014

Unit Testing

GPU

Play OpenGLES demo, from Linux shell type:

$ modprobe galcore
$ cd /opt/viv_samples/vdk/ && ./tutorial3 -f 1000

WLAN

List SSIDs, from Linux shell type:

$ ifconfig wlan0 up
$ iwlist wlan0 scan

Connecting to an encrypted network

Find your network from the above scan command.

$ wpa_passphrase <YourAP> <YourPassword> >wpa.conf
$ ps | grep wpa_supplicant
*kill the wpa_supplicant process if exist.
$ wpa_supplicant -Dwext -iwlan0 -c./wpa.conf -B
$ udhcpc -iwlan0
$ ifconfig

Giga Bit Ethernet

On Target:

$ ifconfig
$ iperf -s -u

On Host:

$ iperf -c 192.168.1.189 -u -b1000M -w4KB

Bluetooth

$ hcitool scan
$ l2ping 98:03:D8:C7:1A:96

Video playback

Play video file, from linux shell type:

$ gplay <file>

HDMI, LVDS , LCD boot arguments

All paramters are u-boot enviroment parameters.

Default:

U-Boot # setenv bootargs_base 'setenv bootargs console=ttymxc0,115200'

This will set the LCD to work.

HDMI 1080P:

U-Boot # setenv bootargs_base 'setenv bootargs console=ttymxc0,115200 video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB16 fbmem=48M vmalloc=400 mxc_hdmi.only_cea=1'

mxc_hdmi.only_cea=1 paramter is to work with dvi-hdmi adapter. If you connect it to a TV-HDMI this paramters is not required.

HDMI 720P:

U-Boot # setenv bootargs_base 'setenv bootargs console=ttymxc0,115200 video=mxcfb0:dev=hdmi,1280x720M@60,if=RGB24'

LVDS and LCD Dual display:

U-Boot # setenv bootargs_base 'setenv bootargs console=ttymxc0,115200 ldb=dul0'

LVDS only display:

U-Boot # setenv bootargs_base 'setenv bootargs console=ttymxc0,115200 ldb=sin1'

LVDS only display with screen paramters:

U-Boot # setenv bootargs_base 'setenv bootargs console=ttymxc0,115200 ldb=sin1 video=mxcfb0:dev=ldb,800x600M@60,if=RGB24'

RTC

To set the RTC first set the date from Linux shell, type:

$ date 2013.08.27-15:43

Then set the real time clock from Linux shell, type:

$ hwclock --systohc

Power down your board wait 5 minutes and power up. Check your system with date and the time should be up to date.

Camera

$ modprobe ov5642_camera
$ modprobe mxc_v4l2_capture
$ /etc/rc5.d/S01xserver-nodm stop
$ gst-launch mfw_v4lsrc ! mfw_v4lsink

External Uart

Use minicom to connect. Set the serial to ttymxc2 You can use a loopback or connect to anther computer

SATA

$ cat /proc/scsi/scsi
$ fdisk /dev/sda & print

PCIE

$ lspci 

The output should look like:
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)

USB OTG as host

Plugin Disk on Key Keyboard or Mouse. It will work automaticly.

Use the file manager and the mouse to browse the file system.

You can open terminal and type in Linux commands.

USB OTG as device

Plug a cable to a A linux host.

Folow www.linux-usb.org/gadget/file_storage.html and build the backing_file.

On the Target:

modprobe g_file_storage file=./backing_file

On the Host:

use dmesg and find out your device for example /dev/sdb
sudo dd if=/dev/zero of=/dev/sdb bs=128k count=1000

3 ports USB Host

Plug a DiskOnKey, Mouse or Keyboard to any of the 3 ports.

Canbus

  1. Patch the kernel. Download 0001-can-bus-enable.patch from our ftp site. Place it in VAR-MX6-yocto-dora-v3/sources/meta-fsl-arm-extra/recipes-kernel/linux/linux-variscite-3.0.35. Edit linux-variscite_3.0.35.bb change:
    # SRC_URI += "file://0001-file-rename.patch \
    #"
    into:
    SRC_URI += "file://0001-can-bus-enable.patch \
    "
  2. Add canutils. Edit VAR-MX6-yocto-dora-v3/sources/meta-fsl-demos/recipes-fsl/images/fsl-image-gui.bb. Add canutilis to the image build.
    IMAGE_INSTALL += " \
    ${SOC_IMAGE_INSTALL} \
    cpufrequtils \
    nano \
    packagegroup-fsl-gstreamer \
    packagegroup-fsl-tools-testapps \
    packagegroup-fsl-tools-benchmark \
    packagegroup-qt-in-use-demos \
    qt4-plugin-phonon-backend-gstreamer \
    qt4-demos \
    qt4-examples \
    fsl-gui-extrafiles \
    minicom \
    imx-kobs \
    tcf-agent \
    openssh-sftp-server \
    canutils \
    "
  3. Build and deploy your image.
  4. Connect 2 boards. Each board JP26 connect to the other with the right cable.

Set the 2 boards:

$ canconfig can0 bitrate 125000
$ ifconfig can0 up 

On board 1:

canecho can0 -v

On board 2:

cansend can0 -i0x100 11 22 33 44