wiki:ventana/ubuntu

Version 55 (modified by Tim Harvey, 4 years ago) ( diff )

use version-agnostic kernel install and update kernel version to 5.4

Ubuntu on Ventana

While Gateworks cannot fully support all Linux distros, it is relatively simple to overlay a Gateworks Ventana kernel onto any non-Gateworks third party Linux distro rootfs image. For a full list of Linux BSP's for Ventana see here

This page is dedicated details regarding running Ubuntu on an Gateworks Ventana Board.

For a full Board Support Package providing building a Linux distro from source, please see the OpenWrt, Yocto, or Android BSP from the Ventana BSP page

See also:

Gateworks pre-built Ubuntu Disk Images

Gateworks provides a pre-built Ubuntu firmware images for the Ventana Family:

Login Information (default)

  • Username: root
  • Password: root

Features:

  • Ubuntu arm core (created via debootstrap)
  • Gateworks Ventana Linux kernel (Linux 5.4 based)
  • eth0 dhcp with a 30 second timeout
  • User: root password: root
  • Packages installed on top of core including:
  • first-boot script to grow root filesystem partition and filesystem (useful when putting disk images on removable storage devices)
  • use ifupdown tools instead of netplan (we find them easier to understand and configure)

CollapsibleStart(Old Releases) Old Releases:

CollapsibleEnd

Building the Root Filesystem via debootstrap

A popular way to create a Ubuntu root filesystem is to use the deboostrap utility on a Debian or Ubuntu host. This tool provides a 2-stage install where the second stage is within a chroot environment using qemu-arm.

Gateworks uses a script to do this which you may find at ​http://github.com/Gateworks/ubuntu-rootfs

Requirements:

  • Linux Ubuntu or Debian System with network connection and sudo permissions
  • Linux Kernel
  • Ventana target board with bootloader
  • Boot device with 2GB+ of free space (micro-SD, USB mass storage, mSATA, 1GB/2GB NAND flash)

Important notes:

  • These steps are not always exactly what we do in our script but give you an idea of how you would go about doing it yourself if you wanted to customize something
  • We set and use target and distro env variables in step 2 and use those env variables in the remaining steps to make this tutorial more version-agnostic. Please be aware of this and do not deviate from the steps unless or until you completely understand what you are doing.
  • While operating under the qemu chroot (ie on the host system) you may encounter 'qemu: Unsupported syscall'. Note that messages from QEMU about unsupported syscalls are often harmless, because typically they only appear for relatively new syscalls which QEMU hasn't implemented yet. The guest code will have a fallback path so it works on older kernels which don't implement the syscall, so a message is printed but the application still runs. So if the guest program is failing then it is quite likely to be for an entirely unrelated reason to the missing syscalls.

Host specific notes:

  • Ubuntu 16.04:
    • qemu: Unsupported syscall: 373: an update to initramfs-tools adds a 'sync -f' which isn't supported on qemu-2.5 used by Xenial 16.04. This is fixed in qemu-2.11 (used on Ubuntu 18.04 and beyond). This will cause initramfs updates to fail which may be used if you are trying to use a kernel needing an initramfs. To work around the issue you can comment out the 'sync -f' call in update-initramfs:
      sed -i 's/sync/#sync/' /usr/sbin/update-initramfs
      dpkg --configure -a # re-run any halted postinst scripts
      

Steps:

  1. Install pre-requisites:
    sudo apt-get install qemu-user-static debootstrap binfmt-support
    
  1. Perform first stage install of minimal filesystem:
    target=rootfs
    distro=bionic
    sudo debootstrap --arch=armhf --foreign $distro $target
    # copy qemu-arm-static binary for the binfmt packages to find it and copy in resolv.conf from host
    sudo cp /usr/bin/qemu-arm-static $target/usr/bin
    
    • See http://ports.ubuntu.com/ubuntu-ports/dists/ and https://wiki.ubuntu.com/Releases for a list of Ubuntu releases. For example: 18.04=bionic (latest LTS), 16.04=xenial, 14.04=trusty
    • this minimal rootfs is still missing some core packages and configuration before it can be booted. These steps are taken care of in a 2nd stage install within a chroot shell
    • the chroot shell below will provide network support (inherited from the host)
  1. we now have a minimal Ubuntu rootfs - chroot to it and perform the 2nd stage install:
    sudo chroot $target
    # now we are in the chroot
    distro=bionic
    export LANG=C
    # setup second stage
    /debootstrap/debootstrap --second-stage
    
    • this is the most minimal rootfs we would recommend
  1. (optional) add additional apt package repos:
    cat <<EOT > /etc/apt/sources.list
    deb http://ports.ubuntu.com/ubuntu-ports $distro main restricted universe multiverse
    deb http://ports.ubuntu.com/ubuntu-ports $distro-updates main restricted universe multiverse
    deb http://ports.ubuntu.com/ubuntu-ports $distro-security main restricted universe multiverse
    EOT
    
    • you may want to customize the above list, depending on your needs. See below for more detail on Ubuntu package feeds
  1. (optional) update package database and setup locales (do not skip this step if you are needing to install any packages for the steps below or otherwise)
    apt-get update
    apt-get -f install # fixup missing package dependencies
    apt-get install locales dialog
    dpkg-reconfigure locales
    
  1. set hostname:
    echo ${distro}-armhf > /etc/hostname
    
  1. create a default fstab:
    cat <<EOT > /etc/fstab
    /dev/root            /                    auto       defaults              1  1
    EOT
    
    • Note that this not required if you pass in 'rw' on the kernel cmdline. However while that is the default for the Ventana bootscripts for removeable storage it is not for NAND boot, therefore we will add a default fstab that will re-mount the kernel mounted rootfs as read-write
    • /dev/root in /etc/fstab will refer to the rootfs mounted by the kernel, thus the above entry simply re-mounts rootfs as read-write
  1. set a root passwd so you can login
    passwd
    
    • or consider adding a user via adduser:
      adduser myuser
      usermod -a -G tty myuser # add to tty group for tty access
      usermod -a -G dialout myuser # add to dialout group for UART access
      usermod -a -G sudo myuser # add to sudo group for root access
      
  1. (optional) configure networking:
    • wired ethernet with DHCP on eth0
      apt-get install net-tools ifupdown
      cat <<EOF >> /etc/network/interfaces
      allow-hotplug eth0
      auto eth0
      iface eth0 inet dhcp
      
      EOF
      
    • or static IP:
      apt-get install net-tools ifupdown
      cat <<EOF >> /etc/network/interfaces
      allow-hotplug eth0
      auto eth0
      iface eth0 inet static
      address 192.168.1.1
      netmask 255.255.255.0
      gateway 192.168.1.254
      
      EOF
      
    • or wireless (requires ~3MB of additional packages):
      apt-get install wpasupplicant iw
      cat << EOF >> /etc/network/interfaces
      # Wireless interface
      auto wlan0
      iface wlan0 inet dhcp
              wireless_mode managed
              wireless_essid any
              wpa-driver nl80211
              wpa-conf /etc/wpa_supplicant.conf
      
      EOF
      wpa_passphrase <myssid> <mypass> >> /etc/wpa_supplicant.conf
      
  1. (optional) install some useful packages
    apt-get install openssh-server # ssh server for remote access
    apt-get install can-utils i2c-tools usbutils pciutils # cmdline tools for various Ventana hardware support
    
    • Note that by default root ssh access is disabled for security. See this link for info on enabling it
  1. install a kernel and kernel support (kernel+dtbs+modules+firmware+initrd). You have several options here (see above for more details). Gateworks recomends using a Gateworks pre-built kernel:
    1. (recommended) Gateworks Pre-built kernel (includes the same kernel drivers typically found on Ubuntu kernels including video capture/display and is built by Gateworks):
      cd /
      wget http://dev.gateworks.com/ventana/images/linux-ventana.tar.xz
      tar -xvf linux-ventana.tar.xz --keep-directory-symlink
      depmod $(ls /lib/modules/) # create module dependencies
      rm linux-ventana.tar.xz
      
      • the depmod trick above is to run depmod with the exact kernel version (which will be the subdir in /lib/modules). An alternative is to run depmod after the first boot
      • this kernel is recommended over the Ubuntu built kernel because it a) enables some drivers/features that Ubuntu leaves out, such as video capture b) may have patches for features that are not yet in mainline linux c) enables everything needed to boot from a Gateworks board static so that you do not need an initrd.
    2. Build your own kernel and install it as above with proper bootscript - see linux/kernel for more info (you can do this on a development host with a cross-toolchain or even even install development tools via the build-essential meta-package and build and install sources such as the kernel below (adds appx 180MB))
    3. Ubuntu Pre-built kernel (includes the most kernel drivers and is built by and supported by Ubuntu):
      # disable flash-kernel as its not needed and will otherwise error out
      echo "FLASH_KERNEL_SKIP=1" >> /etc/environment
      export FLASH_KERNEL_SKIP=1 # and export it for current operations
      # install kernel/firmware/headers
      apt-get install linux-generic
      # install mkimage
      apt-get install u-boot-tools
      # create u-boot image for kernel
      mkimage -A arm -O linux -T kernel -C none \
        -a 0x10008000 -e 0x10008000 -n "linux" \
        -d /boot/vmlinuz-*-generic /boot/uImage
      # install device-tree blobs
      cp /lib/firmware/*-generic/device-tree/imx6*-gw*.dtb /boot
      #blacklist imx rtc driver, Gateworks board uses GSC RTC, and does not use imx RTC
      echo "blacklist rtc_snvs" > /etc/modprobe.d/blacklist-rtc.conf
      
    4. Gateworks pre-built downstream vendor kernel: 3.14 kernel containing Vivante drivers (which is not currently in upstream Linux) - Not recommended
      cd /
      wget http://dev.gateworks.com/ventana/images/gateworks-linux-imx6-3.14.48.tar.gz
      tar -xvf gateworks-linux-imx6-3.14.48.tar.gz --keep-directory-symlink
      depmod $(ls /lib/modules/) # create module dependencies
      rm gateworks-linux-imx6-3.14.48.tar.gz
      
      • the depmod trick above is to run depmod with the exact kernel version (which will be the subdir in /lib/modules). An alternative is to run depmod after the first boot
    5. Build your own kernel and install it as above with proper bootscript - see linux/kernel for more info (you can do this on a development host with a cross-toolchain or even even install development tools via the build-essential meta-package and build and install sources such as the kernel below (adds appx 180MB))
  1. exit the chroot shell and remove files we no longer need
    exit
    sudo rm $target/usr/bin/qemu-arm-static
    
    • You may wish to move this file else place for later use should you wish to chroot again.
  1. install to bootable media:
    • For a removable block storage device supported by your board such as a USB Mass Storage device, a microSD, an mSATA SSD the example below will create a single ext4 rootfs partition on a removable block storage device. Ensure you set DEVICE properly for your system.
      DEVICE=/dev/sdc # adjust per your system!
      MNT=/mnt # adjust per your system!
      # unmount all auto-mounted partitions for this device
      sudo umount ${DEVICE}?
      # partition disk - single ext partition
      printf ",,L,,\n" | sudo sfdisk -uS ${DEVICE}
      sync
      sudo mkfs.ext4 -O ^64bit -L rootfs ${DEVICE}1
      # mount partition
      sudo mount ${DEVICE}1 $MNT
      # copy the root filesystem
      sudo cp -rupv $target/*  $MNT/
      # unmount the disk
      sudo umount ${DEVICE}1
      
    • To create a ubifs filesystem image and ubi image for flashing onto raw NAND see linux/ubi

Kernel

While a kernel is not specifically part of a root filesystem it usually resides on the root filesystem. There are several kernel sources you can choose from:

  • Gateworks pre-built 5.4 kernel (recommended)
  • Gateworks pre-built 3.14 kernel
  • Ubuntu built kernel
  • Kernel built by hand

Gateworks built kernel

Gateworks periodically updates their pre-built IMX6 kernel release and it is easy to install on a running system:

wget http://dev.gateworks.com/ventana/images/linux-ventana.tar.xz
tar -C / -xvf linux-ventana.tar.xz --keep-directory-symlink
rm linux-ventana.tar.xz

If you want to clean out old kernels no longer used, you can remove the directory of modules in /lib/modules/<kernel-version>

Benefits of using the Gateworks kernel:

  • contains all drivers 'static' required to boot off boot devices supported by Gateworks boards (ie NAND, SATA, MMC, USB Mass storage all static in kernel) removing requirement for an 'inital ramdisk' (initrd) that Ubuntu Built kernels require
  • contains kernel patches that may not be in mainline yet
  • tested and supported by Gateworks

Ubuntu built kernel

Ubuntu releases are based on a specific major kernel version. However over time the Ubuntu team releases new major kernel version updates for specific distro versions. An apt-get install linux-image will not change the kernel major version and you have to specifically install a new major version to switch to it.

It is recommended that you use the Gateworks kernel above for the following reasons:

  • Ubuntu built kernels can require initrd for some boot devices complicating things (ie NAND and USB Mass Storage are kernel modules)
  • Ubuntu built kernels may be configured in ways not appropriate for Gateworks boards (ie the DS1672 RTC driver is not static which complicates restoring system time on boot from the GSC provided RTC)

If you wish to use an Ubuntu built kernel here are some notes but Gateworks can not support you if you run into issues as we don't maintain this kernel.

To install a specific kernel image search for available packages and pick the version you want. For example if wanting the 4-15.0-34-generic kernel:

apt-get update
apt-get install linux-image-4.15.0-34-generic
# install mkimage
apt-get install u-boot-tools
# create u-boot image for kernel
mkimage -A arm -O linux -T kernel -C none \
  -a 0x10008000 -e 0x10008000 -n "linux" \
  -d /boot/vmlinuz-4.15.0-34-generic /boot/uImage
# install device-tree blobs
cp /lib/firmware/4.15.0-34-generic/device-tree/imx6*-gw*.dtb /boot
#blacklist imx rtc driver, Gateworks board uses GSC RTC, and does not use imx RTC
echo "blacklist rtc_snvs" > /etc/modprobe.d/blacklist-rtc.conf
# create u-boot image for initrd
mkimage -A arm -O linux -T ramdisk \
  -a 0x0 -e 0x0 -n "initrd" \
  -d /boot/initrd.img-4.15.0-34-generic /boot/uramdisk
  • use apt-cache search linux-image to determine what Ubuntu kernel versions are available

If you want to clean out old kernels no longer used you can use apt list --installed | grep linux to list installed packages and remove them (remove linux-headers, linux-image, linux-modules for example). For example if you want to remove the 4.15.0-42-generic packages:

apt purge linux-image-4.15.0-42-generic linux-modules-4.15.0-42-generic linux-headers-4.15.0-42
  • modify the above to remove the specific version(s) you want to remove

If booting from boot media that requires kernel modules you need to create an initrd:

  • The default Ubuntu kernel supports booting a microSD/SATA rootfs directly, but lacks nand/ubifs/ubi/usb-storage support. If you need that (and have a large enough flash to boot from that) you will need to use the Ubuntu initrd:
    • add NAND/ubifs/usb-storage modules to the initrd:
      cat << EOF >> /etc/initramfs-tools/modules
      # for NAND/ubi
      gpmi_nand
      ubi mtd=2
      ubifs
      
      # for usb-storage
      ci_hdrc_imx
      usb-storage
      EOF
      update-initramfs -u # press 'Enter' when prompted
      # create u-boot image for initrd
      mkimage -A arm -O linux -T ramdisk \
        -a 0x0 -e 0x0 -n "initrd" \
        -d /boot/initrd.img-*-generic /boot/uramdisk
      

You will need to create a boot script that sets kernel cmdline properly based on boot device and loads the Ubuntu initrd if needed. You can do this on the target board:

# The Gateworks bootscript is a good starting point
wget https://raw.githubusercontent.com/Gateworks/linux-imx6/gateworks_5.4.45/gwventana_bootscript -O /boot/6x_bootscript-ventana.txt
# re-enable ramdisk when its needed
sed -i 's/^setenv rd_addr$/#setenv rd_addr/' /boot/6x_bootscript-ventana.txt 
mkimage -A arm -O linux -T script -n bootscript -d /boot/6x_bootscript-ventana.txt /boot/6x_bootscript-ventana

version-specific notes

Here are some version specific notes

trusty (14.04) LTS

  • An extra step is needed for serial console configuration:
    cat << EOT >> /etc/init/serial.conf
    start on stopped rc RUNLEVEL=[2345]
    stop on runlevel [!2345]
    respawn
    exec /sbin/getty 115200 ttymxc1
    EOT
    

Adding GStreamer IPU/VPU/GPU support via gstreamer-imx (Trusty)

Note: This section pertains only to the Gateworks downstream vendor 3.14 kernel with proprietary Freescale Drivers (Trusty Prebuilt image)

If using the Gateworks downstream vendor 3.14 kernel with proprietary Freescale drivers you can easily add IMX6 IPU, VPU, and GPU support via GStreamer and Gstreamer-imx plugins. Many of the pieces needed (firmware and source-code) are from Freescale and not freely redistributable thus must be downloaded from their mirror and extracted from a shell script that forces you to read and agree to their End User License Agreement (EULA).

This support requires that you are using the Gateworks downstream vendor kernel as it has the necessary driver support that is not in the mainline Linux kernel. This procedure has not been proven on versions newer than Trusty.

There are several pre-requisites you will need to install and/or build using the instructions below:

  • Gateworks downstream vendor kernel (containing non-upstreamed IPU/VPU/GPU drivers) with kernel headers. See here for instructions on building, or here for a pre-built kernel tarball
  • gstreamer and libs
  • firmware-imx-3.14.28-1.0.0.bin - Freescale VPU firmware (EULA required)
  • imx-vpu-5.4.31.bin - Freescale lib_vpu (EULA required) - this is the low-level documented API that works with the (undocumented) VPU kernel driver API. You can think of this as a kernel driver in userspace
  • libfslcodec-4.0.3.bin - Freescale Codec Library (EULA required)
  • imx-gpu-viv-5.0.11.p4.5-hfp.bin - Freescale libg2d (EULA required) - this is the low-level documented API that works with the (undocumented) Vivante Galcore GPU kernel driver API. You can think of this as a kernel driver in userspace
  • libimxvpuapi - community based open-source high-level library over the low-level imx-vpu API
  • gstreamer-imx - community based open-source GStreamer plugins to utilize hardware accellerated capture, display, transforms, compositing, decode, encode capabilities of the IMX6.

The following instructions can be used on top of the debootstrap created rootfs but should work on other sources of Ubuntu or other Linux distributions root filesystems as well.

  1. install build deps (~165MB):
    apt-get install build-essential autoconf libtool wget python pkg-config git
    
  1. install gstreamer1.x (~200MB):
    apt-get install gstreamer1.0-x gstreamer1.0-tools
    # install videoparserbad for video parsers like h264parse, mpegvideoparse and mpeg4videoparse
    apt-get install gstreamer1.0-plugins-good gstreamer1.0-plugins-bad
    # install alsa plugin
    apt-get install gstreamer1.0-alsa
    
    • note that the gstreamer1.0-plugins-bad meta-package is in the multiverse package feed
    • at this point you could use 'gst-launch-1.0 videotestsrc ! fbdevsink' but it will not stretch to the display, and will not be hardware accelerated
  1. install Freescale VPU firmware (firmware-imx) (EULA required)
    wget http://www.freescale.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-3.14.28-1.0.0.bin
    /bin/sh firmware-imx-*.bin
    # install firmware
    mkdir -p /lib/firmware/vpu
    cp firmware-imx-*/firmware/vpu/vpu_fw_imx6*.bin /lib/firmware/vpu
    
  1. build and install Freescale lib_vpu (EULA required)
    wget http://www.freescale.com/lgfiles/NMG/MAD/YOCTO/imx-vpu-5.4.31.bin
    /bin/sh imx-vpu-*.bin
    cd imx-vpu-*
    make PLATFORM=IMX6Q all
    make install # installs vpu_lib.h and vpu_io.h in /usr/include and libvpu.* in /usr/lib
    cd ..
    
  1. (optional) build and install Freescale Codec Library (libfslcodec) (EULA required)
    wget http://www.freescale.com/lgfiles/NMG/MAD/YOCTO/libfslcodec-4.0.3.bin
    /bin/sh libfslcodec-*.bin
    cd libfslcodec-*
    ./autogen.sh --prefix=/usr --enable-fhw --enable-vpu
    make all
    make install
    # move the libs where gstreamer plugins will find them
    mv /usr/lib/imx-mm/video-codec/* /usr/lib
    mv /usr/lib/imx-mm/audio-codec/* /usr/lib
    rm -rf /usr/lib/imx-mm/
    cd ..
    
    • this is optional and is needed if you want the audio codec support in gstreamer-imx
    • Note the Makefile will install the libs into $prefix/lib/imx-mm which is undesirable so we move them after 'make install'
  1. (optional) install Freescale libg2d (EULA required)
    wget http://www.freescale.com/lgfiles/NMG/MAD/YOCTO/imx-gpu-viv-5.0.11.p4.5-hfp.bin
    /bin/sh imx-gpu-viv-*.bin
    cd imx-gpu-viv-*
    # install just the g2d headers/libs
    cp g2d/usr/include/* /usr/include/
    cp -d g2d/usr/lib/* /usr/lib/
    # install gpu-core headers/libs
    cp -d gpu-core/usr/lib/*.so* /usr/lib/
    cp -Pr gpu-core/usr/include/* /usr/include/
    # optional: install demos
    cp -r gpu-demos/opt /
    # optional: install gpu tools
    cp -axr gpu-tools/gmem-info/usr/bin/* /usr/bin/
    cd ..
    
    • this is part of the Freescale Vivante GPU driver and apps (imx-gpu-viv) package which provides libgl/libgles1/libgles2/wayland-egl/libgal-x11/egl/libopenvg/libg2d
    • it comes in soft-float (sfp) and hard-float (hfp) - we want the hard-float as we are using an armhf rootfs
    • this is not required but needed for the gstreamer-imx g2d transform and sink plugins
  1. build and install libimxvpuapi library:
    • This library provides a community based open-source API to the Freescale imx-vpu library (the low-level IMX6 VPU interface). It is a replacement for Freescale's closed-development libfslvapwrapper library.
      git clone git://github.com/Freescale/libimxvpuapi.git
      cd libimxvpuapi
      ./waf configure --prefix=/usr
      ./waf
      ./waf install
      cd ..
      
  1. build and install gstreamer-imx:
    apt-get install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-good1.0-dev # +70MB
    git clone git://github.com/Freescale/gstreamer-imx.git
    cd gstreamer-imx
    ln -s /usr/lib/arm-linux-gnueabihf/gstreamer-1.0/ /usr/lib/gstreamer-1.0
    ./waf configure --prefix=/usr --kernel-headers=/include
    ./waf
    ./waf install
    cd ..
    
    • note './waf install' installs artifacts to its prefix + /lib/gstreamer-1.0 but they need to be installed to /usr/lib/arm-linux-gnueabihf/gstreamer-1.0 which is why we created a symlink above before installing
    • note the uniaudio decoder codecs are from Freescale (found in the fsl-mm-codeclib package) and you do not need these unless you want to use FSL's audio codecs instead of the GStreamer ones
    • note g2d lib required to build G2D
    • note that linux kernel headers are required to build PxP and IPU
    • note that libfslaudiocodec is required to build audio plugins
    • After this step you should be able to see several plugins with gst-inspect-1.0:
      # gst-inspect-1.0 | grep imx
      imxv4l2videosrc:  imxv4l2videosrc: V4L2 CSI Video Source
      imxipu:  imxipucompositor: Freescale IPU video compositor
      imxipu:  imxipuvideosink: Freescale IPU video sink
      imxipu:  imxipuvideotransform: Freescale IPU video transform
      imxpxp:  imxpxpvideotransform: Freescale PxP video transform
      imxpxp:  imxpxpvideosink: Freescale PxP video sink
      imxvpu:  imxvpuenc_mjpeg: Freescale VPU motion JPEG video encoder
      imxvpu:  imxvpuenc_mpeg4: Freescale VPU MPEG-4 video encoder
      imxvpu:  imxvpuenc_h264: Freescale VPU h.264 video encoder
      imxvpu:  imxvpuenc_h263: Freescale VPU h.263 video encoder
      imxvpu:  imxvpudec: Freescale VPU video decoder
      imxg2d:  imxg2dcompositor: Freescale G2D video compositor
      imxg2d:  imxg2dvideotransform: Freescale G2D video transform
      imxg2d:  imxg2dvideosink: Freescale G2D video sink
      
  1. install a U-Boot bootscript to setup kernel parameters for your display output:
    apt-get install u-boot-tools
    wget https://github.com/Freescale/meta-freescale-3rdparty/raw/master/recipes-bsp/u-boot/u-boot-script-gateworks-imx/6x_bootscript-yocto.txt
    mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n "boot script" -d 6x_bootscript-yocto.txt /boot/6x_bootscript-ventana
    reboot # reboot to setup bootargs for display
    
    • The Freescale IMX6 display drivers use kernel parameters to configure what display outputs to enable and in what format. What displays, resolutions, and formats affect how much contiguous memory is needed (CMA) as well. The Gateworks Yocto BSP has a bootscript that configures connected displays based on various rules and we will use this here. See http://trac.gateworks.com/wiki/Yocto/Video_Out#DisplaysDevices for more info

Now you will be able to use Gstreamer and Gstreamer-imx to tap the full potential of the IMX IPU/VPU/GPU hardware.

Examples:

  • show gstreamer-imx plugins:
    # gst-inspect-1.0 | grep imx
    imxvpu:  imxvpuenc_mjpeg: Freescale VPU motion JPEG video encoder
    imxvpu:  imxvpuenc_mpeg4: Freescale VPU MPEG-4 video encoder
    imxvpu:  imxvpuenc_h264: Freescale VPU h.264 video encoder
    imxvpu:  imxvpuenc_h263: Freescale VPU h.263 video encoder
    imxvpu:  imxvpudec: Freescale VPU video decoder
    imxv4l2videosrc:  imxv4l2videosrc: V4L2 CSI Video Source
    imxg2d:  imxg2dcompositor: Freescale G2D video compositor
    imxg2d:  imxg2dvideotransform: Freescale G2D video transform
    imxg2d:  imxg2dvideosink: Freescale G2D video sink
    imxipu:  imxipucompositor: Freescale IPU video compositor
    imxipu:  imxipuvideosink: Freescale IPU video sink
    imxipu:  imxipuvideotransform: Freescale IPU video transform
    imxpxp:  imxpxpvideotransform: Freescale PxP video transform
    imxpxp:  imxpxpvideosink: Freescale PxP video sink
    
  • imxipuvideosink:
    gst-launch-1.0 videotestsrc ! imxipuvideosink
    
  • imxg2dvideosink:
    gst-launch-1.0 videotestsrc ! imxg2dvideosink
    

See the Gstreamer wiki page for more details.

Note: See TracWiki for help on using the wiki.