August 29, 2012

i.MX6Q Linux Release 3.0.35_1208 – Beta

In addition to the the Android release, Freescale has also released a Beta for Linux, and it appears that we’re two for two today: it also just works on Sabre Lite and Nitrogen6X.

In addition to sources, the release images contain a pre-built kernel and LTIB-based filesystem in typical Freescale fashion.

As with the Android release, I tested it out by copying the uImage file into /tftpboot and extracted the filesystem into an NFS share.

The filesystem is provided as both an ext2 image and a jffs2 image. The ext2 image is easier to use, and I extracted it like so:
~/$ gunzip rootfs.ext2.gz
~/$ mkdir rootfs
~/$ sudo mount -o loop rootfs.ext2 rootfs
~/$ ls rootfs
bin  etc   lib         mnt  proc  sbin   sys  unit_tests  var
dev  home  lost+found  opt  root  share  tmp  usr
~/$ sudo mkdir -p /L3.0.35_MX6DQ_ER_1208-Beta/
~/$ sudo cp -ravf rootfs/* /L3.0.35_MX6DQ_ER_1208-Beta/
Then I added a line to the file /etc/exports:
And booted like so:
U-Boot> set bootargs console=ttymxc1,115200 video=mxcfb0:dev=ldb,1024x600M@60,if=RGB666
U-Boot> set bootargs $bootargs video=mxcdi1fb:off
U-Boot> set bootargs $bootargs ip=dhcp root=/dev/nfs
U-Boot> set bootargs $bootargs nfsroot=
U-Boot> set bootargs $bootargs rootwait
U-Boot> dhcp 12000000
U-Boot> bootm 12000000
The system came right up into the almost pointless Gnome U/I, but also provided a shell on the serial port where it was easy to confirm that:

Networking is up:
root@freescale ~$ ifconfig -a
can0      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
          NOARP  MTU:16  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:10
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

eth0      Link encap:Ethernet  HWaddr 00:19:B8:00:E2:45
          inet addr:  Bcast:  Mask:
          RX packets:222576 errors:6324 dropped:0 overruns:6324 frame:6324
          TX packets:116339 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:302047471 (288.0 MiB)  TX bytes:12850928 (12.2 MiB)

lo        Link encap:Local Loopback
          inet addr:  Mask:
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

Video playback also works:
root@freescale /unit_tests$ ./mxc_vpu_test.out -D '-i akiyo.mp4'
[INFO]	VPU test program built on Aug 28 2012 14:15:08
[INFO]	Product Info: i.MX6Q/D/S
[INFO]	VPU firmware version: 2.1.5_r32515
[INFO]	VPU library version: 5.4.5
[INFO]	Format: STD_MPEG4
[INFO]	MPEG4 class: MPEG4
[INFO]	Input file "akiyo.mp4" opened.
[INFO]	bitstreamMode 0, chromaInterleave 0, mapType 0, tiled2LinearEnable 0
[INFO]	Mpeg4 Profile: 0 Level: 3 Interlaced: 0
[INFO]	Aspect Ratio Table index: 1
[INFO]	Decoder: width = 176, height = 144, frameRateRes = -1, frameRateDiv = -1, count = 4
[INFO]	CROP left/top/right/bottom 0 0 0 0
[INFO]	Display fps will be 0
[INFO]	v4l output to /dev/video17
[INFO]	Display to 1024 600, top offset 0, left offset 0
Even with gstreamer:
root@freescale ~$ gplay serenity.avi
playbin2 is employed!
fsl_player_init(): Successfully initialize!
fsl_player_set_media_location(): filename=serenity.avi
[Stopped  ][Vol=01][00:00:00/00:00:00][fps:0][INFO]	Product Info: i.MX6Q/D/S
vpudec versions 🙂
	plugin: 3.0.1
	wrapper: 1.0.24(VPUWRAPPER_ARM_LINUX Build on Aug 28 2012 14:16:03)
	vpulib: 5.4.5
    video codec: FFmpeg MPEG-4
    audio codec: MPEG-1 layer 2
        encoder: Lavf52.64.2
container format: AVI
get GST_MESSAGE_ELEMENT missing-plugin, type=(string)decoder, detail=(GstCaps)audio/mpeg, mpegversion=(int)1, mpegaudioversion=(int)1, layer=(int)2, parsed=(boolean)true, name=(string)"MPEG-1 Layer 2 (MP2) decoder";
this is powerful mx6q
MFW_GST_V4LSINK_PLUGIN 3.0.1 build on Aug 28 2012 14:16:53.
    audio codec: MPEG 1 Audio, Layer 2
nominal bitrate: 64000
        has crc: FALSE
   channel mode: stereo
[INFO]	bitstreamMode 1, chromaInterleave 1, mapType 0, tiled2LinearEnable 0
>>V4L_SINK: Actually buffer status:
	hardware buffer : 10
	software buffer : 0
full screen size:1024x600
[V4L Update Display]: left=0, top=0, width=1024, height=600

FSL_PLAYER_01.00_LINUX build on Aug 28 2012 14:17:30
	[h]display the operation Help
	[a]Pause when playing, play when paused
	[m]Switch to mute or not
	[>]Play next file
	[<]Play previous file
	[r]Switch to repeated mode or not
	[f]Set full screen or not
	[z]resize the width and height
	[c]Setting play rate
	[i]Display the metadata
get GST_MESSAGE_ELEMENT prepare-xwindow-id;
get GST_MESSAGE_ELEMENT playbin2-stream-changed, uri=(string)file:///root/serenity.avi;
minimum bitrate: 64000
        bitrate: 64000
maximum bitrate: 64000
[Playing  ][Vol=01][00:00:14/00:01:30][fps:25]q
[Playing  ][Vol=01][00:00:16/00:01:30][fps:24]x
Running time 0:00:17.291078169 render fps 23.943
Total rendered:414
[--->FINALIZE v4l_sink
player_exit(): No more multimedia files, exit.
g_main_loop_thread_fun() quit!
The kernel modules aren’t present to allow GPU testing and some work will be required to get touch screens working and audio on Nitrogen6x, but this is a lot of functionality for so little effort.

Thanks Freescale!

As with Android, we’ve added the kernel tree to our Github repository.
We’ll be running additional tests in the coming days. Stay tuned for announcements about these releases.

Comments 27

    1. Post
    2. Post
  1. michal

    I try to set up Nitrogen6X evaluation board with OV5642 camera. Right now I’m struggling with not working auto-focus on that setup. Do you support AF functionality for that camera?

    1. Post
  2. Post

    Quick note on testing the Wi-Fi with this release and the 2012-08-Beta kernel:

    root@freescale ~$ modprobe ov5642_camera && modprobe mxc_v4l2_capture
    root@freescale ~$ lsmod
    Module                  Size  Used by
    mxc_v4l2_capture       21588  1
    ipu_fg_overlay_sdc      4788  1 mxc_v4l2_capture
    ipu_csi_enc             2949  1 mxc_v4l2_capture
    ipu_prp_enc             4661  1 mxc_v4l2_capture
    ipu_still               1743  1 mxc_v4l2_capture
    ipu_bg_overlay_sdc      3953  1 mxc_v4l2_capture
    ov5642_camera          73604  0
    camera_sensor_clock      689  1 ov5642_camera
    root@freescale ~$ gst-launch mfw_v4lsrc fps-n=30  capture-mode=4 ! mfw_v4lsink
  3. Post

    Quick notes on testing Wi-Fi with the 2012-08-Beta kernel on a Nitrogen6X board with WiFi option:

    root@freescale ~$ modprobe wl12xx_sdio
    root@freescale ~$ ifconfig wlan0 up
    wl1271: firmware booted (Rev
    root@freescale ~$
    root@freescale ~$ iwlist wlan0 scan
    wlan0     Scan completed :
              Cell 01 - Address: 00:19:70:86:8C:31
                        Frequency:2.462 GHz (Channel 11)
                        Quality=35/70  Signal level=-75 dBm
                        Encryption key:on
                        Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s
                                  9 Mb/s; 12 Mb/s; 18 Mb/s
                        Bit Rates:24 Mb/s; 36 Mb/s; 48 Mb/s; 54 Mb/s
                        Extra: Last beacon: 1650ms ago
                        IE: Unknown: 0008576972656C657373
                        IE: Unknown: 010882848B960C121824
                        IE: Unknown: 03010B
                        IE: Unknown: 2A0100
                        IE: Unknown: 32043048606C
                        IE: Unknown: DD180050F2020101820003A4000027A4000042435E0062322F00
                        IE: Unknown: DD0900037F01010000FF7F
                        IE: Unknown: DD0A00037F04010000004000
    root@freescale ~$ iwconfig wlan0 mode managed essid Wireless key HEXVALUE
    root@freescale ~$ wl1271: Association completed.
    root@freescale ~$ udhcpc -f -q -n -i wlan0
    udhcpc (v1.20.2) started
    Sending discover...
    Sending select for
    Lease of obtained, lease time 86400
    Deleting routers
    adding dns
    adding dns
      1. Post
          1. Post
  4. Post

    Quick notes on testing PCIe:

    root@freescale ~$ lspci -mk
    00:00.0 "Class 0604" "16c3" "abcd" "0000" "0000"
    01:00.0 "Class 0280" "8086" "4235" "8086" "1121"
    root@freescale ~$ ls -l /sys/bus/pci/
    drwxr-xr-x    2 root     root             0 Sep  4 22:33 devices
    drwxr-xr-x    3 root     root             0 Sep  4 22:33 drivers
    -rw-r--r--    1 root     root          4096 Sep  4 22:34 drivers_autoprobe
    --w-------    1 root     root          4096 Sep  4 22:34 drivers_probe
    --w--w----    1 root     root          4096 Sep  4 22:34 rescan
    -rw-r--r--    1 root     root          4096 Sep  4 22:34 resource_alignment
    drwxr-xr-x    2 root     root             0 Sep  4 22:34 slots
    --w-------    1 root     root          4096 Sep  4 22:33 uevent
    root@freescale ~$ ls -l /sys/bus/pci/devices
    lrwxrwxrwx    1 root     root             0 Sep  4 22:33 0000:00:00.0 -> ../../../devices/pci0000:00/0000:00:00.0
    lrwxrwxrwx    1 root     root             0 Sep  4 22:33 0000:01:00.0 -> ../../../devices/pci0000:00/0000:00:00.0/0000:01:00.0
  5. Post

    Note that the Bluetooth implementation on Nitrogen6X requires a newer version of Bluez than is distributed with this LTIB release. In particular, you need one that includes support for the ‘texasalt’ protocol.

    We’ve tested it against an Ubuntu 10.04 userspace like so:

    root@ubuntu:~# echo 176 > /sys/class/gpio/export
    root@ubuntu:~# echo 1 > /sys/class/gpio/gpio176/value
    root@ubuntu:~# hciattach /dev/ttymxc2 texas 3000000 flow
    Found a Texas Instruments' chip!
    Firmware file : /lib/firmware/TIInit_7.2.31.bts
    Loaded BTS script version 1
    texas: changing baud rate to 3000000, flow control to 1
    Device setup complete
    root@ubuntu:~# hcitool scan
    Scanning ...
    	00:21:4F:B8:A3:C9	ericsony-0
  6. Post

    In my earlier testing, I saw some issues with audio playback.
    In particular, MP3 files weren’t being played, and the video files
    I threw at gplay didn’t play the audio track.

    I validated the audio (SGTL5000) path using aplay:

    root@freescale ~$ aplay < /dev/urandom

    Looking at things this morning, I saw the somewhat cryptic message
    from gplay when handing it an MP3 file:

    get GST_MESSAGE_ELEMENT missing-plugin, ...
    "MPEG-1 Layer 2 (MP2) decoder";

    I couldn't recall whether I had copied in the MP3 decoder separately
    or not, so I rm'd my .gstreamer registry cache.

    root@freescale ~$ rm -rf .gstreamer-0.10/

    After doing so, I noticed that the next attempt at gplay gave me
    this message:

    Failed to load plugin '/usr/lib/gstreamer-0.10/'

    Looking through the /usr/lib directory, I found that library present
    but found that it has dependencies on some libraries in /usr/lib/imx-mm/.
    To resolve the issue, I needed to add the video-codec, audio-codec and
    parser libraries to my LD_LIBRARY_PATH:

    root@freescale ~$ export LD_LIBRARY_PATH='/usr/lib/:/usr/local/lib:/usr/lib/imx-mm/video-codec:/usr/lib/imx-mm/audio-codec:/usr/lib/imx-mm/parser'

    After that, both MP3 and video files with MP3 audio played just fine using gplay.

  7. Ron

    I followed these instructions and it booted but it froze near end of boot:
    Mounting filesystems
    Running sysctl
    Setting up networking on loopback device:
    Setting up networking on eth0:
    udhcpc (v1.20.2) started
    Sending discover…
    Sending select for…
    Lease of obtained, lease time 600
    nfs: server not responding, still trying

    Any help or clue would be greatly appreciated.

    1. Post

      Sorry Ron,

      It looks like I left a bit out of my notes. If you check in the /etc/rc.d/rc.conf file, I suspect that you
      don’t have a line that says:


      Without this, the system startup scripts are trying to initialize the network using udhcpc and losing
      the root filesystem in the process. See /etc/rc.d/init.d/network for details.

      Note that there are multiple ways to tackle this issue. It appears that I simply removed the word network
      from the cfg_services variable. This skips the network script entirely.

      1. Ron

        Thanks that did the trick. Next is the keyboard. It is recognized and I see

        input: Dell Dell QuietKey Keyboard as /devices/platform/fsl-ehci.1/usb2/2-1/2-1.
        generic-usb 0003:413C:2106.0001: input,hidraw0: USB HID v1.10 Keyboard [Dell Del
        l QuietKey Keyboard] on usb-fsl-ehci.1-1.1/input0
        But later I get

        (EE) XKB: Couldn’t open rules file /usr/share/X11/xkb/rules
        (EE) XKB: No components provided for device Virtual core keyboard
        unrecognised device identifier!
        (EE) config/hal: NewInputDeviceRequest failed (2)
        unrecognised device identifier!
        (EE) config/hal: NewInputDeviceRequest failed (2)
        unrecognised device identifier!
        (EE) config/hal: NewInputDeviceRequest failed (2)
        matchbox: keyboard does not appear to have a key.
        matchbox: ignoring key shortcut n=next

        And if I open a terminal I have no keyboard input. The mouse works.


        1. Post

          Hi Ron,

          You’re getting into some tricky X-Windows config stuff here…
          I do recall seeing something in startx once.

          Yep. This is probably it. If you cat /usr/bin/startx, you’ll
          see the startup of Xfbdev. If I’m reading it right, you’ll need to
          modify this to add a --keybd clause.

          Can you try adding this to the Xfbdev command-line?

          -keybd keyboard,,device=/dev/input/event0
          1. Ron

            Once again thanks. Not sure why no one else sees this. My setup should be identical. Same HW, save OS, same boot params.

            The keyboard is set in that startx based on “grep Babbage /proc/cpuinfo > /dev/null 2>&1 if [ $? = 0 ]; then” But the result of /proc/cpuinfo is “Permission denied”. Not sure why. Perhaps could be key to
            many other errors I get.

            But I added in your suggestion later in script and the keyboard works. I still get many
            errors after boot, related to keyboard (see log below) but it types in xterm so it is a step forward.

            Also no touchscreen /dev/input/ts0. Is that not supported in this release? No biggie for me.

            (EE) XKB: Couldn’t open rules file /usr/share/X11/xkb/rulee
            (EE) XKB: No components provided for device Virtual core keyboard
            (EE) XKB: Couldn’t open rules file /usr/share/X11/xkb/rules/base
            (EE) XKB: No components provided for device (unnamed keyboard)
            unrecognised device identifier!
            (EE) config/hal: NewInputDeviceRequest failed (2)
            unrecognised device identifier!
            (EE) config/hal: NewInputDeviceRequest failed (2)
            unrecognised device identifier!
            (EE) config/hal: NewInputDeviceRequest failed (2)
            matchbox: keyboard does not appear to have a key.
            matchbox: ignoring key shortcut n=next

          2. Post

            Hi Ron,

            The same command-line is likely the issue for touch as well. /dev/input/ts0 is certainly not the right device name.
            To use touch, you’ll need to change this based on /proc/bus/input/devices and probably run ts_calibrate like so:

            ~/$ export TSLIB_TSDEVICE=/dev/input/event2
            ~/$ killall Xfbdev
            ~/$ ts_calibrate
        2. pravalika

          hello sir for me also same error my board is unable to detect the key board the error is same like what your getting can u please let me know what is the problem i am working for imx53 quicksort board

  8. Girisha

    Hi Ericn,

    To test WiFi on Nitrogen6:

    $ iwconfig wlan0 mode managed essid Wireless key HEXVALUE.
    In the above command, what do you mean by “HEXVALUE” or from where shall I get that HEXVALUE from my network or system?.
    Could you please help me… in completing wifi connection?

  9. K Saravanan

    In linux kernel 2.6.35, I use IMX53 & SGTL5000 Audio codec.

    root@freescale ~$ lspci
    it display “no device found ”

    is this SGTL5000 driver will be listed in this lspci command?

    1. Post
    1. Post

      You can list dynamically loaded drivers using “lsmod”. You can also see the complete list of drivers by zcat’ing /proc/config.gz.

      ~/# zcat /proc/config.gz

Leave a Reply